Nvidia_modeset crash on Wayland when external monitor is connected

nvidia_modeset kernel module crashes on KDE 6.6.4, Wayland session, and when an external monitor is connected. Nvidia drivers affected: 580.142 and 595.58.03 (not open). Hardware is MSI Katana 15 B13VFK, 13th Gen Intel® Core™ i7-13620H, NVIDIA GeForce RTX 4060 Laptop GPU (optimus). OS is Kubuntu 26.04 (on 25.10 was fine).

Open drivers works fine, no crash.

creash.log (137.8 KB)
dmesg in attachment

Same for me, started after update from 580.126.09 to 580.142
nvidia optimus Intel UHD630+Gtx 1060m

system crashes and freezes the moment you connect the external monitow with displayport/HDMI

but works fine in X11 sessions, only wayland sessions affected

I believe I too am having the same issue (Lenovo Thinkpad T15g gen 2, RTX3080 (also has separate iGPU so should be using optimus), Arch linux with KDE plasma wayland)

All my laptop’s HDMI / display ports are wired to the RTX3080, and when I plug in an external monitor and try to interact with it (i.e. move the cursor over to it) the system appears to freeze. Strangely, it only happens when I try to interact with it - the system runs fine with the monitor plugged in if I stay away from it. Also when it freezes, system audio continues as normal, usb connect / disconnect sounds play as they should, however pressing CAPSLOCK does not light up the capslock LED.

I’m using the closed nvidia drivers (595.71.05 - the nvidia-beta package on the Arch User Repository) and cannot use open drivers as I have an issue (specific to my laptop I believe) that requries the GSP firmware to be disabled, which cannot be done on the open driver.

I other words, I cannot use my device plugged into an external monitor at all (although I haven’t tried with X11, I’m not too sure how as my login manager does not give me an option to switch)

Just an update from me - the issue appears to have been resolved after a few updates, everything works as expected now (for me), so either my problem was unrelated or it should be fixed now

On which driver version problem gone?

As far as I’m aware, it wasn’t an nvidia driver update that fixed it as I did not update it between before and after the issue went away. There were however quite a few KDE updates, so I have a suspicion that it maybe was one of them.

Versions of everything that works correctly for me:

Nvidia 595.71.05 (proprietary, from the nvidia-beta package on the arch user repository)
Operating System: Arch Linux
KDE Plasma Version: 6.6.5
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.0
Kernel Version: 7.0.5-arch1-1 (64-bit)
Graphics Platform: Wayland

Could you try with setting KWIN_FORCE_SW_CURSOR=1 as your system variables ?

[ for example adding it as export KWIN_FORCE_SW_CURSOR=1 in your /etc/profile file ] and reboot your system and give a feedback here