amshafer / nvidia-driver

Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
43 stars 5 forks source link

kernel panic/Hyprland crash at start since 0.41.1 #24

Open Canvis-Me opened 2 weeks ago

Canvis-Me commented 2 weeks ago

Describe the bug Since the port hyprland updated to 0.41.1, I can't run it at start. The situation is the same with 0.41.1_1 and 0.41.1_2. Other ports are up to date.

FreeBSD version FreeBSD 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 1401000 1401000

PCI Info

pciconf -lv ``` hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1480 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Root Complex' class = bridge subclass = HOST-PCI amdiommu0@pci0:0:0:2: class=0x080600 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1481 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse IOMMU' class = base peripheral subclass = IOMMU hostb1@pci0:0:1:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI pcib1@pci0:0:1:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1483 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse GPP Bridge' class = bridge subclass = PCI-PCI pcib2@pci0:0:1:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1483 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse GPP Bridge' class = bridge subclass = PCI-PCI hostb2@pci0:0:2:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI hostb3@pci0:0:3:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI pcib11@pci0:0:3:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1483 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse GPP Bridge' class = bridge subclass = PCI-PCI hostb4@pci0:0:4:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI hostb5@pci0:0:5:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI hostb6@pci0:0:7:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI pcib12@pci0:0:7:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1484 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]' class = bridge subclass = PCI-PCI hostb7@pci0:0:8:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1482 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Host Bridge' class = bridge subclass = HOST-PCI pcib13@pci0:0:8:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1484 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]' class = bridge subclass = PCI-PCI intsmb0@pci0:0:20:0: class=0x0c0500 rev=0x61 hdr=0x00 vendor=0x1022 device=0x790b subvendor=0x1043 subdevice=0x87c0 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'FCH SMBus Controller' class = serial bus subclass = SMBus isab0@pci0:0:20:3: class=0x060100 rev=0x51 hdr=0x00 vendor=0x1022 device=0x790e subvendor=0x1043 subdevice=0x87c0 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'FCH LPC Bridge' class = bridge subclass = PCI-ISA hostb8@pci0:0:24:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1440 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 0' class = bridge subclass = HOST-PCI hostb9@pci0:0:24:1: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1441 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 1' class = bridge subclass = HOST-PCI hostb10@pci0:0:24:2: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1442 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 2' class = bridge subclass = HOST-PCI hostb11@pci0:0:24:3: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1443 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 3' class = bridge subclass = HOST-PCI hostb12@pci0:0:24:4: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1444 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 4' class = bridge subclass = HOST-PCI hostb13@pci0:0:24:5: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1445 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 5' class = bridge subclass = HOST-PCI hostb14@pci0:0:24:6: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1446 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 6' class = bridge subclass = HOST-PCI hostb15@pci0:0:24:7: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1447 subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse/Vermeer Data Fabric: Device 18h; Function 7' class = bridge subclass = HOST-PCI nvme0@pci0:1:0:0: class=0x010802 rev=0x01 hdr=0x00 vendor=0x1e0f device=0x0008 subvendor=0x1e0f subdevice=0x0001 vendor = 'KIOXIA Corporation' device = 'RD500/Exceria Plus/Exceria Plus G2 NVMe SSD' class = mass storage subclass = NVM pcib3@pci0:2:0:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57ad subvendor=0x0000 subdevice=0x0000 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse Switch Upstream' class = bridge subclass = PCI-PCI pcib4@pci0:3:1:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a3 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib5@pci0:3:3:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a3 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib6@pci0:3:4:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a3 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib7@pci0:3:5:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a3 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib8@pci0:3:8:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a4 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib9@pci0:3:9:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a4 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI pcib10@pci0:3:10:0: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x57a4 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse PCIe GPP Bridge' class = bridge subclass = PCI-PCI nvme1@pci0:4:0:0: class=0x010802 rev=0x03 hdr=0x00 vendor=0x1e49 device=0x0001 subvendor=0x1e49 subdevice=0x1e49 vendor = 'Yangtze Memory Technologies Co.,Ltd' device = 'ZHITAI PC005 NVMe SSD' class = mass storage subclass = NVM iwlwifi0@pci0:5:0:0: class=0x028000 rev=0x1a hdr=0x00 vendor=0x8086 device=0x2723 subvendor=0x8086 subdevice=0x0084 vendor = 'Intel Corporation' device = 'Wi-Fi 6 AX200' class = network re0@pci0:6:0:0: class=0x020000 rev=0x00 hdr=0x00 vendor=0x10ec device=0x8125 subvendor=0x1043 subdevice=0x879b vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8125 2.5GbE Controller' class = network subclass = ethernet igb0@pci0:7:0:0: class=0x020000 rev=0x03 hdr=0x00 vendor=0x8086 device=0x1539 subvendor=0x1043 subdevice=0x85f0 vendor = 'Intel Corporation' device = 'I211 Gigabit Network Connection' class = network subclass = ethernet none0@pci0:8:0:0: class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1485 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Reserved SPP' class = non-essential instrumentation xhci0@pci0:8:0:1: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x149c subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse USB 3.0 Host Controller' class = serial bus subclass = USB xhci1@pci0:8:0:3: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x149c subvendor=0x1022 subdevice=0x148c vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse USB 3.0 Host Controller' class = serial bus subclass = USB ahci0@pci0:9:0:0: class=0x010601 rev=0x51 hdr=0x00 vendor=0x1022 device=0x7901 subvendor=0x1022 subdevice=0x7901 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'FCH SATA Controller [AHCI mode]' class = mass storage subclass = SATA ahci1@pci0:10:0:0: class=0x010601 rev=0x51 hdr=0x00 vendor=0x1022 device=0x7901 subvendor=0x1022 subdevice=0x7901 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'FCH SATA Controller [AHCI mode]' class = mass storage subclass = SATA vgapci0@pci0:11:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2489 subvendor=0x7377 subdevice=0x140a vendor = 'NVIDIA Corporation' device = 'GA104 [GeForce RTX 3060 Ti Lite Hash Rate]' class = display subclass = VGA hdac0@pci0:11:0:1: class=0x040300 rev=0xa1 hdr=0x00 vendor=0x10de device=0x228b subvendor=0x7377 subdevice=0x140a vendor = 'NVIDIA Corporation' device = 'GA104 High Definition Audio Controller' class = multimedia subclass = HDA none1@pci0:12:0:0: class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x148a subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse PCIe Dummy Function' class = non-essential instrumentation none2@pci0:13:0:0: class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1485 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Reserved SPP' class = non-essential instrumentation none3@pci0:13:0:1: class=0x108000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1486 subvendor=0x1043 subdevice=0x8808 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse Cryptographic Coprocessor PSPCPP' class = encrypt/decrypt xhci2@pci0:13:0:3: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x149c subvendor=0x1043 subdevice=0x87c0 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Matisse USB 3.0 Host Controller' class = serial bus subclass = USB hdac1@pci0:13:0:4: class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1487 subvendor=0x1043 subdevice=0x87c5 vendor = 'Advanced Micro Devices, Inc. [AMD]' device = 'Starship/Matisse HD Audio Controller' class = multimedia subclass = HDA ```

DRM KMOD version

drm-515-kmod 5.15.160
nvidia-drm-515-kmod 550.54.14_1
nvidia-drm-kmod 550.54.14

To Reproduce Steps to reproduce the behavior:

Install hyprland 0.41.1_2. After logging in TTY and entering Hyprland, the screen seems to power off(lose video info) and the machine restarts.

Additional context The hyprland conf file is hyprland.conf.txt

The kernel debug info is

kgdb /boot/kernel/kernel /var/crash/vmcore.0 ``` GNU gdb (GDB) 14.1 [GDB v14.1 for FreeBSD] Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd14.1". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /boot/kernel/kernel... Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug... Unread portion of the kernel message buffer: Fatal trap 9: general protection fault while in kernel mode cpuid = 14; apic id = 12 instruction pointer = 0x20:0xffffffff806a3dd4 stack pointer = 0x0:0xfffffe01929dbaa0 frame pointer = 0x0:0xfffffe01929dbaa0 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 = 25723 (Hyprland) rdi: 75e3ba3d79a3ba51 rsi: 0000000000000010 rdx: 0000000000000400 rcx: 0000000000000002 r8: fffffe01929dbc00 r9: fffffe01929dbc18 rax: 0000000000000000 rbx: fffffe00054a1b80 rbp: fffffe01929dbaa0 r10: 000000811d38afff r11: 000000811d38afff r12: 75e3ba3d79a3ba51 r13: 0000000000000001 r14: 0000000000000010 r15: 75e3ba3d79a3ba39 trap number = 9 panic: general protection fault cpuid = 14 time = 1718473936 KDB: stack backtrace: #0 0xffffffff806f636d at kdb_backtrace+0x5d #1 0xffffffff806a90d1 at vpanic+0x131 #2 0xffffffff806a8f93 at panic+0x43 #3 0xffffffff80a6011b at trap_fatal+0x40b #4 0xffffffff80a385d8 at calltrap+0x8 #5 0xffffffff809d1fdd at vm_page_busy_acquire+0x8d #6 0xffffffff8090ec41 at lkpi_vmf_insert_pfn_prot_locked+0xb1 #7 0xffffffff828889d5 at __nv_drm_gem_nvkms_handle_vma_fault+0x75 #8 0xffffffff80908ea2 at linux_cdev_pager_populate+0x122 #9 0xffffffff809bba67 at vm_fault_allocate+0x397 #10 0xffffffff809ba456 at vm_fault+0x376 #11 0xffffffff809b9fcd at vm_fault_trap+0x4d #12 0xffffffff80a602de at trap_pfault+0x1be #13 0xffffffff80a5f90b at trap+0x4ab #14 0xffffffff80a385d8 at calltrap+0x8 Uptime: 2m23s Dumping 1439 out of 32647 MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..91% Reading symbols from /boot/kernel/zfs.ko... Reading symbols from /usr/lib/debug//boot/kernel/zfs.ko.debug... Reading symbols from /boot/kernel/xdr.ko... Reading symbols from /usr/lib/debug//boot/kernel/xdr.ko.debug... Reading symbols from /boot/modules/if_re.ko... (No debugging symbols found in /boot/modules/if_re.ko) Reading symbols from /boot/kernel/fusefs.ko... Reading symbols from /usr/lib/debug//boot/kernel/fusefs.ko.debug... Reading symbols from /boot/kernel/opensolaris.ko... Reading symbols from /usr/lib/debug//boot/kernel/opensolaris.ko.debug... Reading symbols from /boot/kernel/fdescfs.ko... Reading symbols from /usr/lib/debug//boot/kernel/fdescfs.ko.debug... Reading symbols from /boot/kernel/amdtemp.ko... Reading symbols from /usr/lib/debug//boot/kernel/amdtemp.ko.debug... Reading symbols from /boot/kernel/amdsmn.ko... Reading symbols from /usr/lib/debug//boot/kernel/amdsmn.ko.debug... Reading symbols from /boot/modules/nvidia-modeset.ko... (No debugging symbols found in /boot/modules/nvidia-modeset.ko) Reading symbols from /boot/modules/nvidia.ko... (No debugging symbols found in /boot/modules/nvidia.ko) Reading symbols from /boot/kernel/linux.ko... Reading symbols from /usr/lib/debug//boot/kernel/linux.ko.debug... Reading symbols from /boot/kernel/linux_common.ko... Reading symbols from /usr/lib/debug//boot/kernel/linux_common.ko.debug... Reading symbols from /boot/modules/nvidia-drm.ko... (No debugging symbols found in /boot/modules/nvidia-drm.ko) Reading symbols from /boot/modules/drm.ko... (No debugging symbols found in /boot/modules/drm.ko) Reading symbols from /boot/kernel/iic.ko... Reading symbols from /usr/lib/debug//boot/kernel/iic.ko.debug... Reading symbols from /boot/kernel/linuxkpi_hdmi.ko... Reading symbols from /usr/lib/debug//boot/kernel/linuxkpi_hdmi.ko.debug... Reading symbols from /boot/modules/dmabuf.ko... (No debugging symbols found in /boot/modules/dmabuf.ko) Reading symbols from /boot/kernel/lindebugfs.ko... Reading symbols from /usr/lib/debug//boot/kernel/lindebugfs.ko.debug... Reading symbols from /boot/kernel/acpi_wmi.ko... Reading symbols from /usr/lib/debug//boot/kernel/acpi_wmi.ko.debug... Reading symbols from /boot/kernel/ahci.ko... Reading symbols from /usr/lib/debug//boot/kernel/ahci.ko.debug... Reading symbols from /boot/kernel/if_iwlwifi.ko... Reading symbols from /usr/lib/debug//boot/kernel/if_iwlwifi.ko.debug... Reading symbols from /boot/kernel/intpm.ko... Reading symbols from /usr/lib/debug//boot/kernel/intpm.ko.debug... Reading symbols from /boot/kernel/smbus.ko... Reading symbols from /usr/lib/debug//boot/kernel/smbus.ko.debug... Reading symbols from /boot/kernel/uhid.ko... --Type for more, q to quit, c to continue without paging-- Reading symbols from /usr/lib/debug//boot/kernel/uhid.ko.debug... Reading symbols from /boot/kernel/usbhid.ko... Reading symbols from /usr/lib/debug//boot/kernel/usbhid.ko.debug... Reading symbols from /boot/kernel/hidbus.ko... Reading symbols from /usr/lib/debug//boot/kernel/hidbus.ko.debug... Reading symbols from /boot/kernel/wmt.ko... Reading symbols from /usr/lib/debug//boot/kernel/wmt.ko.debug... Reading symbols from /boot/kernel/ums.ko... Reading symbols from /usr/lib/debug//boot/kernel/ums.ko.debug... Reading symbols from /boot/kernel/ng_ubt.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_ubt.ko.debug... Reading symbols from /boot/kernel/netgraph.ko... Reading symbols from /usr/lib/debug//boot/kernel/netgraph.ko.debug... Reading symbols from /boot/kernel/ng_hci.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_hci.ko.debug... Reading symbols from /boot/kernel/ng_bluetooth.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_bluetooth.ko.debug... Reading symbols from /boot/kernel/ng_l2cap.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_l2cap.ko.debug... Reading symbols from /boot/kernel/ng_btsocket.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_btsocket.ko.debug... Reading symbols from /boot/kernel/ng_socket.ko... Reading symbols from /usr/lib/debug//boot/kernel/ng_socket.ko.debug... Reading symbols from /boot/kernel/vmm.ko... Reading symbols from /usr/lib/debug//boot/kernel/vmm.ko.debug... Reading symbols from /boot/kernel/nmdm.ko... Reading symbols from /usr/lib/debug//boot/kernel/nmdm.ko.debug... Reading symbols from /boot/kernel/if_bridge.ko... Reading symbols from /usr/lib/debug//boot/kernel/if_bridge.ko.debug... Reading symbols from /boot/kernel/bridgestp.ko... Reading symbols from /usr/lib/debug//boot/kernel/bridgestp.ko.debug... __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 57 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, (kgdb) (kgdb) c The program is not being run. (kgdb) list *0xffffffff806a3dd4 0xffffffff806a3dd4 is in _rw_wowned (/usr/src/sys/kern/kern_rwlock.c:268). 263 264 int 265 _rw_wowned(const volatile uintptr_t *c) 266 { 267 268 return (rw_wowner(rwlock2rw(c)) == curthread); 269 } 270 271 void 272 _rw_wlock_cookie(volatile uintptr_t *c, const char *file, int line) (kgdb) backtrace #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=) at /usr/src/sys/kern/kern_shutdown.c:405 #2 0xffffffff806a8c67 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:523 #3 0xffffffff806a913e in vpanic (fmt=0xffffffff80ad1d54 "%s", ap=ap@entry=0xfffffe01929db950) at /usr/src/sys/kern/kern_shutdown.c:967 #4 0xffffffff806a8f93 in panic (fmt=) at /usr/src/sys/kern/kern_shutdown.c:891 #5 0xffffffff80a6011b in trap_fatal (frame=0xfffffe01929db9e0, eva=0) at /usr/src/sys/amd64/amd64/trap.c:952 #6 #7 _rw_wowned (c=c@entry=0x75e3ba3d79a3ba51) at /usr/src/sys/kern/kern_rwlock.c:268 #8 0xffffffff809d1fdd in vm_page_busy_acquire (m=0xfffffe00054a1b80, allocflags=allocflags@entry=16) at /usr/src/sys/vm/vm_page.c:890 #9 0xffffffff8090ec41 in lkpi_vmf_insert_pfn_prot_locked (vma=0xfffff803aa7c7d00, addr=, pfn=, prot=27) at /usr/src/sys/compat/linuxkpi/common/src/linux_page.c:314 #10 0xffffffff828889d5 in __nv_drm_gem_nvkms_handle_vma_fault () from /boot/modules/nvidia-drm.ko #11 0xffffffff80908ea2 in linux_cdev_pager_populate (vm_obj=0xfffff803aa7c7d00, pidx=, fault_type=, max_prot=, first=0xfffffe01929dbc00, last=0xfffffe01929dbc18) at /usr/src/sys/compat/linuxkpi/common/src/linux_compat.c:516 #12 0xffffffff809bba67 in vm_pager_populate (object=0x75e3ba3d79a3ba51, object@entry=0xfffffe01929dbb80, pidx=16, fault_type=1024, first=0xfffffe01929dbc00, last=0xfffffe01929dbc18, max_prot=) at /usr/src/sys/vm/vm_pager.h:187 #13 vm_fault_populate (fs=0xfffffe01929dbca0) at /usr/src/sys/vm/vm_fault.c:515 #14 vm_fault_allocate (fs=fs@entry=0xfffffe01929dbca0) at /usr/src/sys/vm/vm_fault.c:1240 #15 0xffffffff809ba456 in vm_fault_object (fs=0xfffffe01929dbca0, behindp=0xfffffe01929dbc94, aheadp=0xfffffe01929dbc98) at /usr/src/sys/vm/vm_fault.c:1504 #16 vm_fault (map=, vaddr=36335472640, fault_type=2 '\002', fault_flags=, m_hold=m_hold@entry=0x0) at /usr/src/sys/vm/vm_fault.c:1638 #17 0xffffffff809b9fcd in vm_fault_trap (map=, vaddr=, fault_type=, fault_flags=fault_flags@entry=0, signo=0xfffffe01929dbf00, ucode=0xfffffe01929dbf04) at /usr/src/sys/vm/vm_fault.c:712 #18 0xffffffff80a602de in trap_pfault (frame=frame@entry=0xfffffe01929dbf40, usermode=true, signo=0xfffffe01929dbc00, signo@entry=0xfffffe01929dbf00, ucode=0xfffffe01929dbc18, ucode@entry=0xfffffe01929dbf04) at /usr/src/sys/amd64/amd64/trap.c:845 #19 0xffffffff80a5f90b in trap (frame=0xfffffe01929dbf40) at /usr/src/sys/amd64/amd64/trap.c:384 #20 #21 0x0000000834f3b33a in ?? () Backtrace stopped: Cannot access memory at address 0x82157cfe8 (kgdb) q ```
Contincast commented 2 weeks ago

I was having the same problem. Installing wlroots-hyprland and uninstalling wlroots-devel has stopped the kernel panic, although I still can't launch Hyprland. It seems to be crashing at initDRMFormats()

amshafer commented 2 weeks ago

I assume sway works fine? It does for me. What's the initDrmFormats error?

I think this is something that hyprland does that is some sort of invalid operation/fault. I haven't figured out exactly why yet but it isn't handled correctly by nvidia-drm's fault handler and triggers the panic.

Canvis-Me commented 2 weeks ago

sway works fine, but I cannot solve the flickering problem, so does the dwl. Use the old version now.

Canvis-Me commented 2 weeks ago

Find the def of initDrmFormats on https://github.com/hyprwm/Hyprland/blob/d1340bd1d8eedd274283e0cb2568a3ed67b58c81/src/render/OpenGL.cpp#L124

amshafer commented 2 weeks ago

I believe the flickering with sway goes away if you use the vulkan renderer. I haven't tested that myself in a bit though.

Find the def of initDrmFormats on..

Was more so asking what line it crashes on, are there any error messages, etc. I only see the panic on my machine not whatever this crash is.

Canvis-Me commented 2 weeks ago

I believe the flickering with sway goes away if you use the vulkan renderer.

The problem is solved now.

Contincast commented 2 weeks ago

What's the initDrmFormats error?

Sorry, here's the log I get from Hyprland.

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
I don't feel so good...

Hyprland received signal 11(SEGV)
Version: 9e781040d9067c2711ec2e9f5b47b76ef70762b3
Tag: v0.41.1

System info:
    System name: FreeBSD
    Node name: sally.desktop.local
    Release: 14.1-RELEASE
    Version: FreeBSD 14.1-RELEASE MYKERNEL

GPU:
    vgapci0@pci0:6:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2489 subvendor=0x196e subdevice=0x13a6
    vendor     = 'NVIDIA Corporation'
    device     = 'GA104 [GeForce RTX 3060 Ti Lite Hash Rate]'
    class      = display
    subclass   = VGA

os-release:
    NAME=FreeBSD
    VERSION="14.1-RELEASE"
    VERSION_ID="14.1"
    ID=freebsd
    ANSI_COLOR="0;31"
    PRETTY_NAME="FreeBSD 14.1-RELEASE"
    CPE_NAME="cpe:/o:freebsd:freebsd:14.1"
    HOME_URL="https://FreeBSD.org/"
    BUG_REPORT_URL="https://bugs.FreeBSD.org/"
Backtrace:
    # | 0x5cacb1 <_Z12getBacktracev+0x41> at /usr/local/bin/Hyprland
        getBacktrace()
        ??:0
    #1 | 0x537c4c <_ZN13CrashReporter18createAndSaveCrashEi+0x1dec> at /usr/local/bin/Hyprland
        CrashReporter::createAndSaveCrash(int)
        ??:0
    #2 | 0x4baf41 <_Z25handleUnrecoverableSignali+0x51> at /usr/local/bin/Hyprland
        handleUnrecoverableSignal(int)
        ??:0
    #3 | 0x83310d410 <pthread_sigmask+0x540> at /lib/libthr.so.3
        ??
        ??:0
    #4 | 0x83310c9cb <pthread_setschedparam+0x84b> at /lib/libthr.so.3
        ??
        ??:0
    #5 | 0x82188e2d3 <???> at ???
        ??
        ??:0
    #6 | 0x833d24af1 <memchr+0x101> at /lib/libc.so.7
        ??
        ??:0
    #7 | 0x7c41a1 <_ZN15CHyprOpenGLImpl13getDRMFormatsEv+0xcb1> at /usr/local/bin/Hyprland
        ??
        ??:0
    #8 | 0x7c3fa3 <_ZN15CHyprOpenGLImpl13getDRMFormatsEv+0xab3> at /usr/local/bin/Hyprland
        ??
        ??:0
    #9 | 0x7afd3b <_ZN15CHyprOpenGLImpl14initDRMFormatsEv+0x5fb> at /usr/local/bin/Hyprland
        CHyprOpenGLImpl::initDRMFormats()
        ??:0
    #1 | 0x7aebe3 <_ZN15CHyprOpenGLImplC2Ev+0xd93> at /usr/local/bin/Hyprland
        CHyprOpenGLImpl::CHyprOpenGLImpl()
        ??:0
    #11 | 0x4bd611 <_ZN11CCompositor12initManagersE18eManagersInitStage+0x9d1> at /usr/local/bin/Hyprland
        CCompositor::initManagers(eManagersInitStage)
        ??:0
    #12 | 0x4bca3f <_ZN11CCompositor10initServerEv+0x37f> at /usr/local/bin/Hyprland
        CCompositor::initServer()
        ??:0
    #13 | 0x6006b3 <main+0x593> at /usr/local/bin/Hyprland
        main
        ??:0
    #14 | 0x833c51a6a <__libc_start1+0x12a> at /lib/libc.so.7
        ??
        ??:0

Log tail:
[LOG] EGL: GPU Supports Format AB24 (0x34324241)
amshafer commented 2 weeks ago

Thanks. This looks like it's just a regular crash in Hyprland then, it's not crashing in the NVIDIA driver. Given it's in memchr it's probably some indexing or array issue, probably a better question for the Hyprland devs.

The panic is definitely something wrong with how nvidia-drm handles things though, so I'll keep looking into that. Glad it sounds like there's a way to work around this in the meantime.