Nvidia Xorg page fault in kernel mode 14-STABLE/amd64

From: Pontus Bramberg <pontus_at_bramberg.net>
Date: Fri, 02 Aug 2024 16:24:30 UTC
Hello,

I'm not entirely sure if this is the right place to ask about this. I 
apologise if not.

I recently updated the UEFI BIOS on my laptop. Immediately after this, 
Xorg would not start when using the Nvidia driver. I attempted to 
downgrade the BIOS but the laptop would not flash an earlier version of 
the BIOS. I therefore instead tried to rebuild kernel and world from the 
latest stable/14 git commit (b37a6d41a046dbb46ee1d6bf00c710c03c944a24) 
as well as uninstalling and reinstalling x11/nvidia-driver from the 
latest ports collection (version 550.54.14). This did not help so I 
rebuilt the same kernel and world after 'make clean' and 'make 
cleanworld' and reinstalled the same version of x11/nvidia-driver. I at 
first thought this might be related to the similar issue discussed July 
2 to 5 on this mailing list but the workaround from then (rebuilding 
kernel, world, and driver) does not work for me and the BIOS update make 
me think this is a different issue. Xorg works perfectly well if I 
switch to the integrated Intel graphics (using the i915kms module) so I 
think the problem is related to the discrete GPU. I do not normally use 
nvidia-drm-kmod but I have tried using both graphics/nvidia-drm-kmod and 
graphics/nvidia-drm-61-kmod with the same result, except the system 
crashes on boot rather than when starting Xorg (I use startx if that 
matters). The laptop is a Lenovo Thinkpad P16 with an Nvidia RTX 3500 
Ada Generation Laptop GPU if that is helpful. If there are any logs or 
anything else that would be useful, please let me know. I would be very 
grateful if anybody knows how to resolve this or has any pointers for 
further troubleshooting.

The output before the system crashes:

ACPI Warning: \134_SB.PC00.PEG1.PEGP._DSM: Argument #4 type mismatch - 
Found [Buffer], ACPI requires [Package] (20221020/nsarguments-212)
NVRM: GPU at PCI:0000:01:00: GPU-58d85fdb-6f45-87c1-fe0f-9a26e92647c9
NVRM: Xid (PCI:0000:01:00): 62, pid='', name=, 2022a7a6 2028a6fc 
2027a696 2027a1b2 20250cf2 2025084c 00000000 00000000


Fatal trap 12: page fault while in kernel mode
cpuid = 18; apic id = 44
fault virtual address = 0x0
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff861c1354
stack pointer = 0x28:0xfffffe02ebc316b0
frame pointer = 0x28:0xfffffe02eff26e10
code segment = base 0x0, limit 0xfffff, type 0x1b
             = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 2380 (Xorg)
rdi: 0000000000000000 rsi: 0000000000000040 rdx: 0000000000000007
rcx: 0000000000000007 r8: 00000000000000c0 r9: 0000000000000066
rax: 0000000000000000 rbx: fffffe02f051c000 rbp: fffffe02eff26e10
r10: 00000000100d96f8 r11: 0000000066ace8f2 r12: fffffe02eff2d000
r13: 0000000000000000 r14: 0000000000000055 r15: 0000000000000000
trap number     = 12
panic: page fault
cpuid = 18
time = 1722607858
KDB: stack backtrace:
#0 0xffffffff80b86d7d at kdb_backtrace+0x5d
#1 0xffffffff80b399a1 at vpanic+0x131
#2 0xffffffff80b39863 at panic+0x43
#3 0xffffffff8101a93b at trap_fatal+0x40b
#4 0xffffffff8101a986 at trap_pfault+0x46
#5 0xffffffff80ff0c98 at calltrap+0x8
Uptime: 39s
Automatic reboot in 15 seconds - press a key on the console to abort
--> Press a key on the console to reboot,
--> or switch off the system now.

Best wishes,
Pontus Bramberg <pontus@bramberg.net>