Nvidia driver 384.59 trigger kernel 4.12.6 panic when using gnome 3.24 + drm KMS

Hello,

I’m trying to make gnome+wayland work on Nvidia drivers on my archlinux.

However, on booting before showing the login screen the kernel panics. I’ve enable nvidia nvidia_drm nvidia_modeset nvidia_uvm modules. I’ve also added

nvidia-drm.modeset=1

to the kernel boot options. Here’s the log:

Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres dbus[480]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.7" (uid=0 pid=482 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.UnknownMethod" requested_reply="0" destination=":1.25" (uid=120 pid=632 comm="/usr/bin/gnome-shell ")
Aug 13 20:28:27 moltres gnome-shell[632]: Failed to apply DRM plane transform 0: Invalid argument
Aug 13 20:28:27 moltres kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
Aug 13 20:28:27 moltres kernel: IP: drm_atomic_helper_disable_plane+0x49/0xa0 [drm_kms_helper]
Aug 13 20:28:27 moltres kernel: PGD 0 
Aug 13 20:28:27 moltres kernel: P4D 0 
Aug 13 20:28:27 moltres kernel: 
Aug 13 20:28:27 moltres kernel: Oops: 0000 [#1] PREEMPT SMP
Aug 13 20:28:27 moltres kernel: Modules linked in: ctr ccm btrfs xor arc4 snd_hda_codec_hdmi intel_rapl iwlmvm x86_pkg_temp_thermal intel_powerclamp coretemp mac80211 snd_hda_codec_realtek uvcvideo snd_hda_codec_generic kvm_intel videobuf2_vmalloc videobuf2_memops kvm snd_hda_intel videobuf2_v4l2 btusb irqbypass iTCO_wdt asus_nb_wmi crct10dif_pclmul snd_hda_codec btrtl asus_wmi crc32_pclmul ghash_clmulni_intel raid6_pq iTCO_vendor_support sparse_keymap pcbc videobuf2_core btbcm snd_hda_core btintel r8169 iwlwifi snd_hwdep aesni_intel aes_x86_64 snd_pcm crypto_simd glue_helper cfg80211 snd_timer mii cryptd bluetooth intel_cstate mei_me evdev videodev ecdh_generic snd intel_rapl_perf joydev mousedev pcspkr input_leds media rfkill soundcore mei psmouse shpchp mac_hid i2c_i801 lpc_ich ie31200_edac thermal wmi asus_wireless
Aug 13 20:28:27 moltres kernel:  led_class battery ac video tpm_tis tpm_tis_core tpm button sch_fq_codel ip_tables x_tables ext4 crc16 jbd2 fscrypto mbcache hid_generic dm_mod dax usbhid hid sr_mod cdrom sd_mod serio_raw atkbd xhci_pci libps2 ahci ehci_pci xhci_hcd ehci_hcd libahci libata usbcore crc32c_intel scsi_mod usb_common i8042 serio nvidia_drm(PO) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm nvidia_uvm(PO) nvidia_modeset(PO) nvidia(PO)
Aug 13 20:28:27 moltres kernel: CPU: 5 PID: 632 Comm: gnome-shell Tainted: P           O    4.12.6-1-ARCH #1
Aug 13 20:28:27 moltres kernel: Hardware name: ASUSTeK COMPUTER INC. G751JT/G751JT, BIOS G751JT.210 08/10/2015
Aug 13 20:28:27 moltres kernel: task: ffff970d658363c0 task.stack: ffffac6842810000
Aug 13 20:28:27 moltres kernel: RIP: 0010:drm_atomic_helper_disable_plane+0x49/0xa0 [drm_kms_helper]
Aug 13 20:28:27 moltres kernel: RSP: 0018:ffffac6842813b98 EFLAGS: 00010282
Aug 13 20:28:27 moltres kernel: RAX: ffff970d61cd8080 RBX: ffff970d66cfe800 RCX: 000000000000001e
Aug 13 20:28:27 moltres kernel: RDX: 0000000000000000 RSI: 0000000000000010 RDI: ffffffffc1373e40
Aug 13 20:28:27 moltres kernel: RBP: ffffac6842813bb0 R08: ffff970d6c6dd5b0 R09: ffff970d67d32800
Aug 13 20:28:27 moltres kernel: R10: ffffac6842813ae0 R11: 0000000000000000 R12: ffff970d68b31c08
Aug 13 20:28:27 moltres kernel: R13: ffffac6842813d08 R14: ffffac6842813d08 R15: ffff970d65020a00
Aug 13 20:28:27 moltres kernel: FS:  00007feb64b559c0(0000) GS:ffff970d7f140000(0000) knlGS:0000000000000000
Aug 13 20:28:27 moltres kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 13 20:28:27 moltres kernel: CR2: 0000000000000088 CR3: 0000000465440000 CR4: 00000000001406e0
Aug 13 20:28:27 moltres kernel: Call Trace:
Aug 13 20:28:27 moltres kernel:  __setplane_internal+0x4f/0x260 [drm]
Aug 13 20:28:27 moltres kernel:  drm_mode_cursor_universal+0xf7/0x1d0 [drm]
Aug 13 20:28:27 moltres kernel:  drm_mode_cursor_common+0x177/0x1e0 [drm]
Aug 13 20:28:27 moltres kernel:  drm_mode_cursor2_ioctl+0xe/0x10 [drm]
Aug 13 20:28:27 moltres kernel:  drm_ioctl+0x213/0x4d0 [drm]
Aug 13 20:28:27 moltres kernel:  ? drm_mode_cursor_ioctl+0x60/0x60 [drm]
Aug 13 20:28:27 moltres kernel:  do_vfs_ioctl+0xa5/0x600
Aug 13 20:28:27 moltres kernel:  ? handle_mm_fault+0xde/0x220
Aug 13 20:28:27 moltres kernel:  ? __fget+0x6e/0x90
Aug 13 20:28:27 moltres kernel:  SyS_ioctl+0x79/0x90
Aug 13 20:28:27 moltres kernel:  entry_SYSCALL_64_fastpath+0x1a/0xa5
Aug 13 20:28:27 moltres kernel: RIP: 0033:0x7feb61c1a8b7
Aug 13 20:28:27 moltres kernel: RSP: 002b:00007ffd3b663188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Aug 13 20:28:27 moltres kernel: RAX: ffffffffffffffda RBX: 00000000000000c6 RCX: 00007feb61c1a8b7
Aug 13 20:28:27 moltres kernel: RDX: 00007ffd3b6631c0 RSI: 00000000c02464bb RDI: 0000000000000008
Aug 13 20:28:27 moltres kernel: RBP: 00000000000024a1 R08: 0000000000000000 R09: 0000000000000000
Aug 13 20:28:27 moltres kernel: R10: ffffffffffffffa0 R11: 0000000000000246 R12: 00007feb61ed5ad8
Aug 13 20:28:27 moltres kernel: R13: 0000000000001030 R14: 000000e79eb2a430 R15: 00007feb61ed5a80
Aug 13 20:28:27 moltres kernel: Code: c0 74 75 4c 89 68 38 48 89 de 48 89 c7 49 89 c4 e8 ad 6a f8 ff 48 3d 00 f0 ff ff 77 4d 48 83 78 08 00 74 10 48 8b 93 90 00 00 00 <48> 39 9a 88 00 00 00 74 3a 48 89 df 48 89 c6 e8 43 ff ff ff 85 
Aug 13 20:28:27 moltres kernel: RIP: drm_atomic_helper_disable_plane+0x49/0xa0 [drm_kms_helper] RSP: ffffac6842813b98
Aug 13 20:28:27 moltres kernel: CR2: 0000000000000088
Aug 13 20:28:27 moltres kernel: ---[ end trace 32483cca3397d4be ]---

Please find the bug report attached

Thanks a lot!
nvidia-bug-report.log.gz (195 KB)

Do you have the required device nodes?

$ ls -al /dev |grep nvidia
crw-rw-rw-.  1 root root    195,   0 Aug 16 11:20 nvidia0
crw-rw-rw-.  1 root root    195, 255 Aug 16 11:20 nvidiactl
crw-rw-rw-.  1 root root    195, 254 Aug 16 11:20 nvidia-modeset

https://devtalk.nvidia.com/default/topic/1003294/linux/nvidia-modeset-error-when-trying-to-run-egl-streams-enabled-mutter-/

Aug 13 20:27:37 moltres kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 248
Aug 13 20:27:37 moltres kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  384.59  Wed Jul 19 23:53:34 PDT 2017 (using threaded interrupts)
Aug 13 20:27:37 moltres kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  384.59  Wed Jul 19 23:46:42 PDT 2017
Aug 13 20:27:37 moltres kernel: nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 247
Aug 13 20:27:37 moltres kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Aug 13 20:27:37 moltres kernel: nvidia-modeset: Allocated GPU:0 (GPU-5b770b7a-8b0f-f274-3e03-d5a0c1493aa2) @ PCI:0000:01:00.0
Aug 13 20:27:37 moltres kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Aug 13 20:28:27 moltres kernel: [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object

When ndivia-drm modeset is not activated, everything boots normally and I do have the required device nodes.

When I activate nvidia-drm modeset and disable gdm to boot to tty, the device nodes are not there, is that expected behavior?

Nevertheless I added the suggested udev rules (made sure the devices are created while booting to tty) and it didn’t really help, the kernel keeps panicking on boot :/

I don’t know if it’s relevant information but my notebook uses G-Sync

Thanks a lot for your help !

Sorry my bad, you need to patch mutter (see link for patches)

http://copr-dist-git.fedorainfracloud.org/cgit/mvicomoya/mutter-eglstream/mutter.git/tree/?id=cc8df0d436c549f2faf00a6ca50a8760b5d70e6e

I patched mutter with the three proposed patch and it didn’t help unfortunately.

You are compiling mutter with --enable-egl-device option?

Yes mutter is compiled with --enable-egl-device

Confirming, exactly the same bug with kernel 4.12.8, Fedora 26.

KMS/Wayland/GNOME worked on kernel 4.11.

(Double-checked patched mutter — it is patched, doesn’t help. Enabling KMS works, but trying to enable Wayland in GDM causes the bug).

Please see https://github.com/NVIDIA/egl-wayland/issues/6
Related to https://bugs.archlinux.org/task/54980