Re: Nvidia Optimus Crash When Starting Xorg

From: Theron <theron.tarigo_at_gmail.com>
Date: Wed, 08 Jun 2022 03:15:36 UTC
On 6/7/22 10:42, Pete Wright wrote:
> On Tue, Jun 07, 2022 at 09:04:33AM +0300, Gleb Popov wrote:
>> Hi Pete, I also have this problem. Did you manage to debug this further?
> hey there, Theron and I had a chat privately

Oops, I had meant to respond on the list:
> I see roughly the same:
>
> nvidia-secondary-driver-510.60.02_1
>
> [   222.989] (EE) Backtrace:
> [   222.990] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41853a]
> [   222.991] (EE) unw_get_proc_name failed: no unwind info found [-10]
> [   222.991] (EE) 1: /lib/libthr.so.3 (?+0x0) [0x8273185be]
> [   222.992] (EE) unw_get_proc_name failed: no unwind info found [-10]
> [   222.992] (EE) 2: /lib/libthr.so.3 (?+0x0) [0x827317b6f]
> [   222.992] (EE) 3: ? (?+0x0) [0x7ffffffff2d3]
> [   222.993] (EE) 4: ? (?+0x0) [0x0]
> [   222.994] (EE) 5: /usr/local/lib/xorg/modules/drivers/nvidia_drv.so 
> (?+0x0) [0x83cca750f]
> [   222.995] (EE) 6: ? (?+0x0) [0x0]
> [   222.995] (EE) unw_step failed: unspecified (general) error [-1]
> [   222.995] (EE)
> [   222.995] (EE) Segmentation fault at address 0x0
> [   222.995] (EE)
> Fatal server error:
> [   222.995] (EE) Caught signal 11 (Segmentation fault). Server aborting
> [   222.995] (EE)
> [   222.995] (EE)
>
> $ uname -a
> FreeBSD theron-xps 14.0-CURRENT FreeBSD 14.0-CURRENT #44 main-809922b010
>
> The same kernel and Xorg build work with the Nvidia port reverted to 
> 470.86_1. 

On 6/7/22 10:42, Pete Wright wrote:
> and the workaround seems to be to
> use the older Nvidia 470 driver. I think what happened is that support 
> to my
> Optimus card was dropped in the 5xx series, as once I loaded this older
> driver dmesg reported the card as detected and Xorg-headless no longer 
> crashes.
In my case (GTX 960M / PCI ID: 139B) the chip is still officially 
supported in the 510.60.02 readme, yet I see the same crash (up to 0x0 
vs. 0x5A5A... difference, but I believe that is merely different alloc 
debug configuration: the driver and/or stack tracer is reading junk 
either way).

Nvidia driver download website recommends 515.48.07 for my chip - I'll 
try to update to that and test if the crash is fixed.

https://us.download.nvidia.com/XFree86/FreeBSD-x86_64/510.60.02/README/supportedchips.html
https://us.download.nvidia.com/XFree86/FreeBSD-x86_64/515.48.07/README/supportedchips.html

> i can share pkg's if you'd like, i'm hoping today, time permitting to 
> submit a bug
> report with diff to add a 470 flavor to nvidia-hybrid-graphics along 
> with a
> nvidia-secondary-driver-470 pkg.
If I recall correctly, everything's in place since there is already a 
-390 flavor for the oldest Optimus systems, adding -470 should be trivial.