NVIDIA 455.50.14 nvidia-modeset kernel crash on monitor re-plug

I’m currently seeing a behavior that I have to unplug and replug my secondary monitor (a 4k TV) to get back a picture, otherwise the TV will show “no input signal” but the PC correctly detects the model and supported screen modes. Alternatively, I can switch screen modes back and forth.

Last time when I unplugged and replugged the TV, the screen contents froze (no longer update, no visible mouse movement), and the TV would flash fast back and forth between black and the frozen screen contents.

After I rebooted the system, the file system was broken - probably because some write back occured out of order. I restored from backup.

I was able to capture a dmesg from this crash:

[277406.907337] BUG: kernel NULL pointer dereference, address: 0000000000000000
[277406.907340] #PF: supervisor read access in kernel mode
[277406.907341] #PF: error_code(0x0000) - not-present page
[277406.907342] PGD 0 P4D 0
[277406.907345] Oops: 0000 [#1] PREEMPT SMP
[277406.907347] CPU: 2 PID: 1138 Comm: Xorg Tainted: P           O      5.10.31-gentoo #1
[277406.907348] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z68 Pro3, BIOS L2.16A 02/22/2013
[277406.907359] RIP: 0010:_nv002464kms+0x12/0x30 [nvidia_modeset]
[277406.907361] Code: c7 47 08 08 d1 e7 c1 48 89 77 10 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8b 87 98 7e 00 00 40 84 f6 40 0f 95 c6 40 0f b6 f6 <48> 8b 38 48 8b 07 48 8b 80 10 01 00 00 e9 ec 73 fb ff 66 2e 0f 1f
[277406.907362] RSP: 0018:ffffa427c8e73cd8 EFLAGS: 00010246
[277406.907363] RAX: 0000000000000000 RBX: ffffa427c0fea008 RCX: 0000000000000001
[277406.907364] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffa427c0fea008
[277406.907365] RBP: ffffa427c02cdfb8 R08: 0000000000000001 R09: ffffffffc1b22340
[277406.907366] R10: ffffffffc0666f70 R11: ffff96c3459e1808 R12: ffff96c34ce93008
[277406.907366] R13: 0000000000000001 R14: ffffa427c02cd008 R15: ffffa427c02cd7d8
[277406.907367] FS:  00007ff5de3cde00(0000) GS:ffff96ca4f280000(0000) knlGS:0000000000000000
[277406.907368] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[277406.907369] CR2: 0000000000000000 CR3: 0000000104e10005 CR4: 00000000001706e0
[277406.907370] Call Trace:
[277406.907379]  ? _nv002473kms+0x1dd/0x210 [nvidia_modeset]
[277406.907387]  ? _nv002843kms+0x1206/0x1480 [nvidia_modeset]
[277406.907392]  ? nv_kthread_q_stop+0x18d0/0x2ab0 [nvidia_modeset]
[277406.907397]  ? nvKmsIoctl+0x96/0x1d0 [nvidia_modeset]
[277406.907401]  ? nvKmsKapiGetFunctionsTable+0x376/0x680 [nvidia_modeset]
[277406.907488]  ? nvidia_frontend_unlocked_ioctl+0x2f/0x40 [nvidia]
[277406.907490]  ? __x64_sys_ioctl+0x7e/0xa0
[277406.907492]  ? do_syscall_64+0x2d/0x40
[277406.907494]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[277406.907496] Modules linked in: cifs libarc4 libdes binfmt_misc nvidia_uvm(PO) hid_xpadneo(O) hidp xt_DSCP xt_tcpudp rfcomm xfs snd_hrtimer snd_seq rpcsec_gss_krb5 nf_conntrack_netbios_ns nf_conntrack_broadcast af_packet nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_tables ip6table_nat ip6table_mangle ip6table_raw iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw nfnetlink ip6table_filter ip6_tables iptable_filter bpfilter bnep snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device mc input_leds snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio btusb btrtl btbcm btintel bluetooth snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_pcm rfkill ecdh_generic ecc snd_timer snd soundcore kvm_intel kvm irqbypass fuse loop ip_tables x_tables uas usb_storage hid_steam nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) efivarfs
[277406.907530] CR2: 0000000000000000
[277406.907531] ---[ end trace 7e59462a47918bf6 ]---
[277406.907540] RIP: 0010:_nv002464kms+0x12/0x30 [nvidia_modeset]
[277406.907541] Code: c7 47 08 08 d1 e7 c1 48 89 77 10 c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8b 87 98 7e 00 00 40 84 f6 40 0f 95 c6 40 0f b6 f6 <48> 8b 38 48 8b 07 48 8b 80 10 01 00 00 e9 ec 73 fb ff 66 2e 0f 1f
[277406.907542] RSP: 0018:ffffa427c8e73cd8 EFLAGS: 00010246
[277406.907543] RAX: 0000000000000000 RBX: ffffa427c0fea008 RCX: 0000000000000001
[277406.907543] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffffa427c0fea008
[277406.907544] RBP: ffffa427c02cdfb8 R08: 0000000000000001 R09: ffffffffc1b22340
[277406.907545] R10: ffffffffc0666f70 R11: ffff96c3459e1808 R12: ffff96c34ce93008
[277406.907546] R13: 0000000000000001 R14: ffffa427c02cd008 R15: ffffa427c02cd7d8
[277406.907547] FS:  00007ff5de3cde00(0000) GS:ffff96ca4f280000(0000) knlGS:0000000000000000
[277406.907548] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[277406.907548] CR2: 0000000000000000 CR3: 0000000104e10005 CR4: 00000000001706e0

nvidia-bug-report.log.gz (830,4 KB)