[BUG ON] while using xfwm4 and nvidia-drm.modeset=1

I’m a XFCE4 user and with the kernel 4.19.1 (or any 4.19), nvidia-drm BUGs ON while starting xfwm4

Nov 16 13:32:12 xxxx kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
Nov 16 13:32:12 xxxx kernel: PGD 0 P4D 0 
Nov 16 13:32:12 xxxx kernel: Oops: 0000 [#1] PREEMPT SMP PTI
Nov 16 13:32:12 xxxx kernel: CPU: 0 PID: 804 Comm: xfwm4 Tainted: P           OE     4.19.1-arch1-1-ARCH #1
Nov 16 13:32:12 xxxx kernel: Hardware name: System manufacturer System Product Name/P9X79, BIOS 4701 05/06/2014
Nov 16 13:32:12 xxxx kernel: RIP: 0010:drm_lease_owner+0xd/0x20 [drm]
Nov 16 13:32:12 xxxx kernel: Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 a4 9a f6 c0 0f 1f 40 00 66 66 66 66 90 48 89 f8 eb 03 48 89 d0 <48> 8b 90 >
Nov 16 13:32:12 xxxx kernel: RSP: 0018:ffffa43f02c9fbb0 EFLAGS: 00010202
Nov 16 13:32:12 xxxx kernel: RAX: 0000000000000000 RBX: ffff9aeac2b9b600 RCX: ffff9aeac2b9b688
Nov 16 13:32:12 xxxx kernel: RDX: ffff9aeaa6ca8000 RSI: 0000000000000000 RDI: 0000000000000000
Nov 16 13:32:12 xxxx kernel: RBP: ffff9aeac6a7c800 R08: 0000000000000000 R09: 0000000000000000
Nov 16 13:32:12 xxxx kernel: R10: ffffd8ce4f5b1680 R11: ffffd8ce4f5bc608 R12: ffff9aeac6a7c888
Nov 16 13:32:12 xxxx kernel: R13: 0000000000000000 R14: dead000000000200 R15: ffff9aeac2b9b6c8
Nov 16 13:32:12 xxxx kernel: FS:  00007f24a3d72180(0000) GS:ffff9aeadfc00000(0000) knlGS:0000000000000000
Nov 16 13:32:12 xxxx kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 13:32:12 xxxx kernel: CR2: 0000000000000080 CR3: 00000003e6f8a001 CR4: 00000000000606f0
Nov 16 13:32:12 xxxx kernel: Call Trace:
Nov 16 13:32:12 xxxx kernel:  drm_is_current_master+0x1a/0x30 [drm]
Nov 16 13:32:12 xxxx kernel:  drm_master_release+0x3e/0x130 [drm]
Nov 16 13:32:12 xxxx kernel:  drm_file_free.part.0+0x2be/0x2d0 [drm]
Nov 16 13:32:12 xxxx kernel:  drm_open+0x1ba/0x1e0 [drm]
Nov 16 13:32:12 xxxx kernel:  drm_stub_open+0xaf/0xe0 [drm]
Nov 16 13:32:12 xxxx kernel:  chrdev_open+0xa3/0x1b0
Nov 16 13:32:12 xxxx kernel:  ? cdev_put.part.0+0x20/0x20
Nov 16 13:32:12 xxxx kernel:  do_dentry_open+0x132/0x340
Nov 16 13:32:12 xxxx kernel:  path_openat+0x2d1/0x14e0
Nov 16 13:32:12 xxxx kernel:  ? mem_cgroup_commit_charge+0x7a/0x520
Nov 16 13:32:12 xxxx kernel:  do_filp_open+0x93/0x100
Nov 16 13:32:12 xxxx kernel:  ? __check_object_size+0x102/0x189
Nov 16 13:32:12 xxxx kernel:  ? _raw_spin_unlock+0x16/0x30
Nov 16 13:32:12 xxxx kernel:  do_sys_open+0x186/0x210
Nov 16 13:32:12 xxxx kernel:  do_syscall_64+0x5b/0x170
Nov 16 13:32:12 xxxx kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Nov 16 13:32:12 xxxx kernel: RIP: 0033:0x7f24a63668ef
Nov 16 13:32:12 xxxx kernel: Code: 52 89 f0 25 00 00 41 00 3d 00 00 41 00 74 44 8b 05 be e8 00 00 85 c0 75 65 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 >
Nov 16 13:32:12 xxxx kernel: RSP: 002b:00007ffc5d0cc800 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
Nov 16 13:32:12 xxxx kernel: RAX: ffffffffffffffda RBX: 000055d9f6059080 RCX: 00007f24a63668ef
Nov 16 13:32:12 xxxx kernel: RDX: 0000000000000002 RSI: 000055d9f519c69c RDI: 00000000ffffff9c
Nov 16 13:32:12 xxxx kernel: RBP: 0000000000000024 R08: 0000000000000000 R09: 0000000000000000
Nov 16 13:32:12 xxxx kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000024
Nov 16 13:32:12 xxxx kernel: R13: 0000000000000012 R14: 000055d9f6055830 R15: 0000000000000012
Nov 16 13:32:12 xxxx kernel: Modules linked in: tun bridge stp llc devlink fuse nct6775 hwmon_vid raid456 async_raid6_recov async_memcpy libcrc32c intel_rapl async_pq async>
Nov 16 13:32:12 xxxx kernel:  pcspkr input_leds mxm_wmi i2c_algo_bit snd_timer media mei_me ttm e1000e mousedev i2c_i801 joydev snd mei lpc_ich soundcore wmi evdev pcc_cpuf>
Nov 16 13:32:12 xxxx kernel: CR2: 0000000000000080
Nov 16 13:32:12 xxxx kernel: ---[ end trace 02b4304977ef7752 ]---
Nov 16 13:32:12 xxxx kernel: RIP: 0010:drm_lease_owner+0xd/0x20 [drm]
Nov 16 13:32:12 xxxx kernel: Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 a4 9a f6 c0 0f 1f 40 00 66 66 66 66 90 48 89 f8 eb 03 48 89 d0 <48> 8b 90 >
Nov 16 13:32:12 xxxx kernel: RSP: 0018:ffffa43f02c9fbb0 EFLAGS: 00010202
Nov 16 13:32:12 xxxx kernel: RAX: 0000000000000000 RBX: ffff9aeac2b9b600 RCX: ffff9aeac2b9b688
Nov 16 13:32:12 xxxx kernel: RDX: ffff9aeaa6ca8000 RSI: 0000000000000000 RDI: 0000000000000000
Nov 16 13:32:12 xxxx kernel: RBP: ffff9aeac6a7c800 R08: 0000000000000000 R09: 0000000000000000
Nov 16 13:32:12 xxxx kernel: R10: ffffd8ce4f5b1680 R11: ffffd8ce4f5bc608 R12: ffff9aeac6a7c888
Nov 16 13:32:12 xxxx kernel: R13: 0000000000000000 R14: dead000000000200 R15: ffff9aeac2b9b6c8
Nov 16 13:32:12 xxxx kernel: FS:  00007f24a3d72180(0000) GS:ffff9aeadfc00000(0000) knlGS:0000000000000000
Nov 16 13:32:12 xxxx kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 16 13:32:12 xxxx kernel: CR2: 0000000000000080 CR3: 00000003e6f8a001 CR4: 00000000000606f0

I am getting the same bug. I can login via KDE Plasma but starting any web browser (firefoc, chrome, konqueror) fails and system locks up requiring power down/up. This is with any 4.19.2 kernel. Setting nvidia-drm.modeset=0 in the kernel boot line results in a working system. Also, the BUG message does not appear.

The kernel log message is:
kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
kernel: PGD 0 P4D 0
kernel: Oops: 0000 [#1] SMP PTI
kernel: CPU: 11 PID: 6759 Comm: gst-plugin-scan Tainted: P OE 4.19.2-300.fc29.x86_64 #1
kernel: Hardware name: Dell Inc. Precision 7920 Tower/0RN4PJ, BIOS 1.8.4 10/05/2018
kernel: RIP: 0010:drm_lease_owner+0xd/0x20 [drm]
kernel: Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 b4 79 55 c8 0f 1f 40 00 0f 1f 44 00 00 48 89 f8 eb 03 48 89 d0 <48> 8b 90 80 00 00 00 48 85 d2 75 f1 c3 66 0f 1f 44 00 00 0f 1f 44
kernel: RSP: 0018:ffff9db20fbcfb90 EFLAGS: 00010202
kernel: RAX: 0000000000000000 RBX: ffff88adf1db0200 RCX: ffff88adf1db02c8
kernel: RDX: ffff88adf47a0000 RSI: 0000000000000000 RDI: 0000000000000000
kernel: RBP: ffff88ae5b93d800 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffea2ba0bcf300 R11: 0000000000000002 R12: ffff88ae5b93d888
kernel: R13: 0000000000000000 R14: ffff88adf1db02c8 R15: dead000000000100
kernel: FS: 00007f70496cd740(0000) GS:ffff88a65fec0000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 0000000000000080 CR3: 0000000806ef4002 CR4: 00000000007606e0
kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kernel: PKRU: 55555554
kernel: Call Trace:
kernel: drm_is_current_master+0x1a/0x30 [drm]
kernel: drm_master_release+0x3e/0x140 [drm]
kernel: drm_file_free.part.4+0x2db/0x2e0 [drm]
kernel: drm_open+0x1e5/0x200 [drm]
kernel: ? drm_dev_enter+0x19/0x50 [drm]
kernel: drm_stub_open+0xaf/0xf0 [drm]
kernel: chrdev_open+0xa2/0x1c0
kernel: ? cdev_put.part.0+0x20/0x20
kernel: do_dentry_open+0x132/0x340
kernel: path_openat+0x33a/0x1610
kernel: ? sprintf+0x56/0x70
kernel: ? uevent_show+0xde/0x100
kernel: do_filp_open+0x93/0x100
kernel: ? __check_object_size+0xa3/0x181
kernel: do_sys_open+0x186/0x210
kernel: do_syscall_64+0x5b/0x160
kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9
kernel: RIP: 0033:0x7f704992859f
kernel: Code: 52 89 f0 25 00 00 41 00 3d 00 00 41 00 74 44 8b 05 b6 ee 00 00 85 c0 75 65 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 0f 87 9d 00 00 00 48 8b 4c 24 28 64 48 33 0c 25
kernel: RSP: 002b:00007ffe430966a0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
kernel: RAX: ffffffffffffffda RBX: 000055dd3ee2f170 RCX: 00007f704992859f
kernel: RDX: 0000000000080002 RSI: 000055dd3ee31ec0 RDI: 00000000ffffff9c
kernel: RBP: 000055dd3ee2f210 R08: 00007f7049276a60 R09: 0048544150564544
kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 000055dd3ee33250
kernel: R13: 000055dd3ee2f170 R14: 000055dd3ee31be0 R15: 000055dd3ee31420
kernel: Modules linked in: fuse ip6t_REJECT nf_reject_ipv6 ip6table_filter ip6_tables xt_state xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c sunrpc vfat fat nvidia_drm(POE) usblp nvidia_modeset(POE) nvidia_uvm(POE) snd_hda_codec_hdmi intel_rapl skx_edac nfit x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel nvidia(POE) kvm irqbypass snd_hda_codec_realtek crct10dif_pclmul crc32_pclmul snd_hda_codec_generic ghash_clmulni_intel mei_wdt intel_cstate iTCO_wdt iTCO_vendor_support snd_hda_intel snd_usb_audio snd_hda_codec dell_smm_hwmon snd_hda_core snd_usbmidi_lib snd_rawmidi uvcvideo snd_hwdep drm_kms_helper snd_seq videobuf2_vmalloc videobuf2_memops snd_seq_device videobuf2_v4l2 videobuf2_common snd_pcm drm dell_wmi intel_uncore videodev snd_timer dell_smbios sparse_keymap
Nov 15 07:28:04 compsci kernel: dcdbas snd mei_me ipmi_devintf media video intel_rapl_perf wmi_bmof dell_wmi_descriptor intel_wmi_thunderbolt ipmi_msghandler e1000e soundcore mei lpc_ich ioatdma i2c_i801 dca pcc_cpufreq binfmt_misc crc32c_intel uas usb_storage vmd ata_generic pata_acpi wmi
kernel: CR2: 0000000000000080
kernel: —[ end trace 933d11f6746e2b1a ]—
kernel: RIP: 0010:drm_lease_owner+0xd/0x20 [drm]
kernel: Code: 83 c4 18 5b 5d c3 b8 ea ff ff ff eb e2 b8 ed ff ff ff eb db e8 b4 79 55 c8 0f 1f 40 00 0f 1f 44 00 00 48 89 f8 eb 03 48 89 d0 <48> 8b 90 80 00 00 00 48 85 d2 75 f1 c3 66 0f 1f 44 00 00 0f 1f 44
kernel: RSP: 0018:ffff9db20fbcfb90 EFLAGS: 00010202
kernel: RAX: 0000000000000000 RBX: ffff88adf1db0200 RCX: ffff88adf1db02c8
kernel: RDX: ffff88adf47a0000 RSI: 0000000000000000 RDI: 0000000000000000
kernel: RBP: ffff88ae5b93d800 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: ffffea2ba0bcf300 R11: 0000000000000002 R12: ffff88ae5b93d888
kernel: R13: 0000000000000000 R14: ffff88adf1db02c8 R15: dead000000000100
kernel: FS: 00007f70496cd740(0000) GS:ffff88a65fec0000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 0000000000000080 CR3: 0000000806ef4002 CR4: 00000000007606e0
kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kernel: PKRU: 55555554

PS: This is with driver version 410.78.
nvidia-bug-report.log.gz (80.9 KB)

I had the issue described by the OP (xfwm4, 4.19.2) and this kernel patch fixed it for me: https://lore.kernel.org/patchwork/patch/1015988/

Does anyone know how to update the kernel 4.19.4-300.fc29.x86_64 on Fedora 29 with this patch (beginner level)? Thanks!

Fedora has included the patch in 4.19.5-300 and 4.19.6-300 kernels.