06:13 fbagnato: Hello all, I have just installed Ubuntu 24.04 on a MacBook Pro (Mid-2010) with a NVIDIA GeForce GT 330M adapter and am experiencing freezing. Using nomodeset in grub avoids the freezing so it is the nouveau driver that seems to be causing the freezing. Is there any nouveau parameters that I can pass to nouveau to see if I can fix the freezing. ie. NvClkMode? I would like to avoid using nomodeset as it will diminish the adapter
06:13 fbagnato: ties
06:22 fbagnato: Just looked into NvClkMode and it is not supported on the NVIDIA GeForce GT 330M.
06:23 fbagnato: Is there any other parameters I can try to resolving the freezing?
15:06 friendlyinvader[d]: Wow that an ancient chip
15:14 fbagnato: yup....Ubuntu 24.04 is running well on the laptop
15:14 fbagnato: shame I can't get nouveau to play ball nicely :'(
15:15 friendlyinvader[d]: fbagnato: Just out of curiosity, have you tried running an older LTS on it?
15:15 fbagnato: No I haven't. Was hoping to run a current release
15:16 fbagnato: As I said it is running well except for the freezing]
15:17 fbagnato: shame
15:17 friendlyinvader[d]: Hmm
15:17 friendlyinvader[d]: Does it freeze on anything specific?
15:18 fbagnato: Nope, completely random. Did make it happen by rapidly moving a window around
15:20 fbagnato: Without nouveau it's rock solid, no freezing no matter how many things I have open or running
15:23 friendlyinvader[d]: Hmm
15:24 friendlyinvader[d]: Does anything show up in kernlog or syslog?
15:24 fbagnato: I was hoping that I could pass some parameters I haven't tried to nouveau. Most are over my head. As mentioned I have alread tried nouveau.noaccel=1, nouveau.nofbaccel=1 and nouveau.modeset=0
15:25 fbagnato: Sorry but I am not a Linux expert. I have only checked dmesg but before the crashes as I believe dmesg is replaced every boot
15:25 fbagnato: I see repeated messages of nouveau 0000:01:00.0: gr: 00100000 [] ch 3 [001fa70000 gnome-shell[1509]] subc 3 class 8597 mthd 1304 data 1d1c1b1a followed by...... nouveau 0000:01:00.0: gr: DATA_ERROR 00000012 [RT_LINEAR_WITH_ZETA]
15:26 fbagnato: But these are before lock ups. These 2 messages are repeated a lot
15:26 fbagnato: Isn't there a dmesg.n for previous logs?
15:30 fbagnato: /var/log/dmesg.0 ? I think
15:31 fbagnato: Last boot : journalctl -o short-precise -k -b -1
15:31 fbagnato: Just found that on Google
15:32 friendlyinvader[d]: I'd check syslog for the errors
15:32 friendlyinvader[d]: Just grep /var/log/syslog.log for nouveau
15:33 fbagnato: oh ok...will do that :)
15:35 fbagnato: Any idea on any other parameters I can pass to nouveau that may fix the problem? NvI2C, NvMSI, NvMXMDCB, etc.
15:38 fbagnato: These are the only ones that I haven't tried that may relate but as I said they are over my head.
15:43 friendlyinvader[d]: I wouldn't worry about passing parameters yet until the problem is determined
15:44 fbagnato: ok..I will go and cause it and check the syslog as you advised
16:13 fbagnato: friendlyinvader: Did the grep on the syslog after a freeze but it only had messages way earlier than the freeze, however running journalctl -o short-precise -k -b -1 shows tons of the messages I mentioned earlier up until the freeze occurred.
16:13 fbagnato: The messages are nouveau 0000:01:00.0: gr: 00100000 [] ch 3 [001fa70000 gnome-shell[1509]] subc 3 class 8597 mthd 1304 data 1d1c1b1a followed by...... nouveau 0000:01:00.0: gr: DATA_ERROR 00000012 [RT_LINEAR_WITH_ZETA]
16:14 karolherbst: ahh.. that error
16:14 karolherbst: I've tried looking into this one, but so far my hardware wasn't able to trigger it
16:15 fbagnato: Any ideas?
16:15 karolherbst: mesa bug
16:15 fbagnato: and it would cause freezing?
16:15 karolherbst: mhh though..
16:15 karolherbst: uhh
16:15 karolherbst: that's a different one
16:15 karolherbst: are you on wayland?
16:15 karolherbst: I think this happens when a linear buffer with a depth buffer gets passed to nouveau
16:15 fbagnato: dont know, default DE on Ubuntu 24.04
16:15 karolherbst: and the hardware can't deal with it
16:16 fbagnato: is there anything I can do to stop the freezing?
16:16 fbagnato: I have tried a few of the parameters for nouveau but with no joy
16:17 karolherbst: nah, this is a userspace problem
16:17 fbagnato: so unresolvable?
16:18 fbagnato: by me anyways?
16:18 karolherbst: yeah, not by you
16:18 karolherbst: well..
16:18 karolherbst: using Xorg instead of wayland might help here
16:18 karolherbst: but it kinda depends what's doing what
16:18 fbagnato: ok.
16:18 karolherbst: but in any case, the nouveau GL driver _should_ workaround this
16:19 karolherbst: the question is rather, who is in the mood to do the work
16:19 fbagnato: ok.
16:19 fbagnato: I am currently running with nomodeset in grub but that totally disables both the NVIDIA and Core video drivers
16:20 karolherbst: right...
16:20 fbagnato: not ideal
16:20 karolherbst: you can use `nouveau.modeset=0`
16:20 karolherbst: to only disable nouveau
16:21 fbagnato: nope, causes a blank screen before displaying the login screen (with a functional mouse)
16:21 karolherbst: huh...
16:21 karolherbst: if that's not working, that's not our bug...
16:22 karolherbst: might be the compositor making some assumptions it shouldn't make or so
16:23 fbagnato: I have seen reports of the blank screen with functioning mouse with nouveau so could I be seeing that with nouveau.modeset=0`
16:23 karolherbst: mhhh
16:23 karolherbst: do you have one or two GPUs?
16:23 fbagnato: 2
16:24 karolherbst: and what's the main one?
16:24 fbagnato: NVIDIA GeForce GT 330M and the 2nd video adapter "Core Processor Integrated Graphics Controller"
16:25 karolherbst: okay.. so the main one I'd figure should be the intel one
16:25 fbagnato: It is listed second
16:25 karolherbst: maybe the compositor decides the nvidia one is the main one and then does weird things?
16:25 karolherbst: yeah.. but like...
16:25 fbagnato: dunno
16:25 karolherbst: the NVIDIA one has discrete VRAM and all that, no?
16:25 fbagnato: I believe so
16:25 karolherbst: I think you have one of those laptops where something thinks the primary GPU is the wrong one
16:26 karolherbst: and that can also cause other issues
16:26 fbagnato: ok
16:26 karolherbst: and it might also resolve the RT_LINEAR_WITH_ZETA error above
16:26 fbagnato: ok
16:27 fbagnato: So what is your advice?
16:28 karolherbst: maybe shared your entire dmesg for now. Maybe I can spot why the wrong GPU is choosen
16:28 karolherbst: there are multiple places where that decision is made sadly
16:32 fbagnato: ok sending it to you now
16:32 karolherbst: not sure if that ever worked for me
16:33 fbagnato: oh. how would I do it then? It would be a ton to post
16:33 karolherbst: could use some pastebin service
16:44 fbagnato: ok it's at https://pastebin.mozilla.org/wa6PEPAw
16:46 karolherbst: "Jun 13 01:52:00.932064 MacBook-Pro6-A1297 kernel: pci 0000:00:02.0: vgaarb: setting as boot VGA device"
16:46 karolherbst: "Jun 13 01:52:00.932955 MacBook-Pro6-A1297 kernel: pci 0000:01:00.0: vgaarb: setting as boot VGA device (overriding previous)"
16:46 karolherbst: mhhhhh
16:47 karolherbst: yeah.. that's not right
16:47 fbagnato: what is it?
16:47 karolherbst: well.. I mean vgaarb is doing something wrong here
16:48 karolherbst: it just assigns a new primary device
16:48 karolherbst: so yeah.. I think this is a kernel bug of how vgaarb is dealing with your laptop here specifically
16:48 fbagnato: ok. Can I do anything about it?
16:49 karolherbst: I don't know..
16:51 karolherbst: airlied: where should vgaarb bugs be reported to?
16:51 karolherbst: fbagnato: in any case, you should probably file a bug against ubuntu, because if you don't, even if it gets fixed upstream, you might not get it backported, if there is no bug reported against ubunutu
16:52 karolherbst: anyway, the high-level overview of your issue is, that the kernel sets the wrong GPU as the primary device
16:52 karolherbst: _but_
16:52 karolherbst: the reason might also be that you have one of those machines where it's flipable at runtime
16:53 fbagnato: ok..and do I just explain the freezing, not mention nouveau and include those two dmesg lines?
16:53 karolherbst: you should have a `/sys/kernel/debug/vgaswitcheroo/switch` file
16:53 fbagnato: I will have a look for that
16:53 karolherbst: it might only show with nouveau loaded properly though
16:53 fbagnato: ok
16:54 karolherbst: https://www.kernel.org/doc/html/v4.10/gpu/vga-switcheroo.html#modes-of-use
16:54 karolherbst: but I don't know if yours is one of those macbooks which can do that stuff
16:54 karolherbst: could be old enough so it's a firmware flip toggable between reboots
16:54 karolherbst: do you know how that part worked in macos?
16:57 fbagnato: No I don't sorry
16:57 fbagnato: Are you saying that the Core Processor adapter should be the primary device and the NVIDIA second?
17:00 karolherbst: shouldn't it be called "Core Processor Integrated Graphics Controller" or something?
17:00 fbagnato: Yes that one
17:00 karolherbst: but yeah
17:01 fbagnato: ok. Does that mean that the problem is not the nouveau driver causing the freezing?
17:01 karolherbst: well.. that's a different issue, but you shouldn't hit this, if the correct primary device is selected
17:01 fbagnato: ok.
17:02 karolherbst: it's only really useful for systems where the nvidia gpu is main and something else is the secondary one
17:02 karolherbst: which...... doesn't really exist
17:02 karolherbst: desktops can be setup like that though
17:02 fbagnato: thanks for all your help karolherbst and friendlyinvader
17:03 fbagnato: I will do some more reading and see what I can do
17:05 fbagnato: It's time for bed I thinks, my head hurts :P
17:05 karolherbst: heh
17:05 karolherbst: good night
17:06 fbagnato: good night to you karolherbst, friendlyinvader and the rest of the people!