Freeze on boot with Wayland and NVIDIA proprietary driver
Affected version
Fedora 32, Wayland, mutter-3.36.3-2.fc32.x86_64, gnome-shell-3.36.3-3.fc32.x86_64, gdm-3.36.2-2.fc32.x86_64
Bug summary
I have two GPUs plugged in (NVIDIA GTX 970 and AMD RX 580). Normally I have my screens plugged into the AMD GPU with NVIDIA only used for CUDA, this works fine. Today I've decided to try running Wayland on the NVIDIA GPU as an experiment, and I couldn't get it to work, the system would freeze on a black screen trying to launch GDM.
Steps to reproduce
- Disable Fedora udev and GDM rules that disable Wayland when NVIDIA proprietary driver is in use.
- Plug a monitor into the NVIDIA GPU.
- Reboot.
What happened
Freeze on boot after Plymouth with a black screen.
What did you expect to happen
GDM launches (from what I've heard, Wayland is supposed to more or less work with the NVIDIA proprietary driver).
Relevant logs, screenshots, screencasts etc.
The kernel log shows a gnome-shell-related crash:
BUG: unable to handle page fault for address: fffffffffffffdfc
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 26d80f067 P4D 26d80f067 PUD 26d811067 PMD 0
Oops: 0000 [#1] SMP PTI
CPU: 3 PID: 1574 Comm: gnome-shell Tainted: P OE 5.6.19-300.fc32.x86_64 #1
Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z68 Professional Gen3, BIOS L2.23A 12/14/2012
RIP: 0010:drm_gem_map_dma_buf+0x3f/0xf0 [drm]
Code: 00 00 83 fe 03 0f 84 a4 00 00 00 48 8b 87 38 01 00 00 41 89 f5 48 85 c0 74 5c 48 8b 40 38 e8 08 e1 9f e5 49 89 c4 48 8b 7b 08 <41> 8b 54 24 08 49 8b 34 24 48 8b 87 40 02 00 00 48 85 c0 74 08 41
RSP: 0018:ffffb3b50271fa18 EFLAGS: 00010246
RAX: fffffffffffffdf4 RBX: ffff94bb760d2d80 RCX: 0000000000002a00
RDX: ffff94bb5af6a300 RSI: 0000000000000000 RDI: ffff94bb7cdab0b0
RBP: 0000000000000000 R08: ffff94bb35e00468 R09: ffff94bb35e00468
R10: 0000000000000000 R11: ffff94bb35e00300 R12: fffffffffffffdf4
R13: 0000000000000000 R14: ffff94bb2c54d600 R15: 0000000000000012
FS: 00007f277980bd00(0000) GS:ffff94bb7f2c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffdfc CR3: 000000041ce18002 CR4: 00000000001606e0
Call Trace:
dma_buf_map_attachment+0x50/0x90
i915_gem_object_get_pages_dmabuf+0x17/0x60 [i915]
__i915_gem_object_get_pages+0x68/0x90 [i915]
i915_vma_pin+0x582/0x6a0 [i915]
? _cond_resched+0x16/0x40
eb_lookup_vmas+0xd1/0xbe0 [i915]
i915_gem_do_execbuffer+0x540/0x1ba0 [i915]
? enqueue_task_fair+0x83/0x660
? check_preempt_curr+0x7e/0x90
? ttwu_do_wakeup+0x19/0x140
? try_to_wake_up+0x26a/0x770
? i915_gem_execbuffer2_ioctl+0x8a/0x450 [i915]
i915_gem_execbuffer2_ioctl+0x219/0x450 [i915]
? page_trans_huge_mapcount+0x12/0xf0
? reuse_swap_page+0x8c/0x380
? i915_gem_execbuffer_ioctl+0x2a0/0x2a0 [i915]
drm_ioctl_kernel+0x86/0xd0 [drm]
? avc_has_perm+0x3b/0x160
drm_ioctl+0x206/0x390 [drm]
? i915_gem_execbuffer_ioctl+0x2a0/0x2a0 [i915]
ksys_ioctl+0x82/0xc0
__x64_sys_ioctl+0x16/0x20
do_syscall_64+0x5b/0xf0
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f277d41c47b
Code: 0f 1e fa 48 8b 05 1d aa 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ed a9 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffc74bd6b18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffc74bd6b60 RCX: 00007f277d41c47b
RDX: 00007ffc74bd6b60 RSI: 0000000040406469 RDI: 0000000000000010
RBP: 0000000040406469 R08: 0000000000000010 R09: 000055fc56e1b6c0
R10: 0000000000000000 R11: 0000000000000246 R12: 000055fc56c65ca0
R13: 0000000000000010 R14: ffffffffffffffff R15: 00007f2728ec67c8
Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_nat_tftp nf_conntrack_tftp tun nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nf_tables_set nft_chain_nat nf_tables ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_mangle iptable_raw iptable_security rfkill ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) sunrpc vfat fat intel_rapl_msr mei_hdcp iTCO_wdt iTCO_vendor_support intel_rapl_common bcache x86_pkg_temp_thermal intel_powerclamp crc64 coretemp joydev kvm_intel kvm uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev snd_usb_audio irqbypass intel_cstate intel_uncore snd_usbmidi_lib snd_rawmidi mc
intel_rapl_perf nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(OE) snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio i915 nvidia(POE) cec i2c_algo_bit snd_hda_codec_hdmi drm_kms_helper snd_hda_intel snd_intel_dspcfg ipmi_devintf ipmi_msghandler snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm pcspkr snd_timer snd mei_me i2c_i801 mei lpc_ich soundcore ie31200_edac drm binfmt_misc ip_tables mxm_wmi crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel serio_raw firewire_ohci pata_via firewire_core crc_itu_t r8169 ata_generic pata_acpi wmi video br_netfilter bridge stp llc fuse
CR2: fffffffffffffdfc
---[ end trace 3bf1144ea9f276c2 ]---
RIP: 0010:drm_gem_map_dma_buf+0x3f/0xf0 [drm]
Code: 00 00 83 fe 03 0f 84 a4 00 00 00 48 8b 87 38 01 00 00 41 89 f5 48 85 c0 74 5c 48 8b 40 38 e8 08 e1 9f e5 49 89 c4 48 8b 7b 08 <41> 8b 54 24 08 49 8b 34 24 48 8b 87 40 02 00 00 48 85 c0 74 08 41
RSP: 0018:ffffb3b50271fa18 EFLAGS: 00010246
RAX: fffffffffffffdf4 RBX: ffff94bb760d2d80 RCX: 0000000000002a00
RDX: ffff94bb5af6a300 RSI: 0000000000000000 RDI: ffff94bb7cdab0b0
RBP: 0000000000000000 R08: ffff94bb35e00468 R09: ffff94bb35e00468
R10: 0000000000000000 R11: ffff94bb35e00300 R12: fffffffffffffdf4
R13: 0000000000000000 R14: ffff94bb2c54d600 R15: 0000000000000012
FS: 00007f277980bd00(0000) GS:ffff94bb7f2c0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffdfc CR3: 000000041ce18002 CR4: 00000000001606e0
This log shows i915. Initially it was the same crash but with amdgpu; I managed to blacklist amdgpu with rd.driver.blacklist=amdgpu modprobe.blacklist=amdgpu
which resulted in this same crash but with i915. I was unsuccessful in blacklisting i915.
Full kernel log with the crash: kernel.log
During the tests I had a single monitor plugged in, and it was plugged into the NVIDIA GPU.