Bug 505047

Summary: Display hangs on one external monitor on NVidia/AMD Optimus laptop
Product: [Plasma] kwin Reporter: Lech <misc>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: journalctl log
dmesg log

Description Lech 2025-05-31 10:19:01 UTC
Created attachment 181922 [details]
journalctl log

SUMMARY

From time to time, the display hangs on one of 2 external monitors connected to an NVidia/AMD Optimus laptop. The mouse cursor is still moving there, but nothing else gets draw/updated. Sometimes part of the display starts to flicker. The only way to fix it, known to me, is kwin_wayland --replace.

Disconnecting and reconnecting the screen makes the whole screen flicker, but it displays the same image as when the hang happened. The apps are working fine and KDE is able to move them from the diconnected monitor to the connected one.

Happens most often on a monitor connected through HDMI, but sometimes also on a monitor connected through USB->DP. Happens most often when using PyCharm, but not only. Happens maybe once per day.

Happens also on Gnome on Wayland, but much less  frequently, and on Gnome disconnecting and reconnecting the monitor fixes the issue.

STEPS TO REPRODUCE
1. Use the KDE on Wayland on an Optimus Nvidia/KDE laptop with 2 external screens connected
2. Run PyCharm, work
3. Should happen at some point

OBSERVED RESULT

One screen stops updating.

EXPECTED RESULT

Everything works normally.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 42
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel: 6.14.8-300
GPU 1: AMD Radeon 780M
GPU 2: Nvidia GeForce RTX 4070 Laptop GPU
Nvidia Driver Version: 570.153.02


ADDITIONAL INFORMATION

I attach journalctl log. The clock on the hung monitor froze at 11:57:43.
Comment 1 Zamundaaa 2025-06-02 15:19:14 UTC
Sounds like it might be from a GPU reset on the secondary GPU, which KWin doesn't currently handle properly. If it is that, then https://invent.kde.org/plasma/kwin/-/merge_requests/7712 should fix it.

When it happens the next time, please attach the output of
> sudo dmesg
here
Comment 2 Lech 2025-06-15 14:22:02 UTC
Created attachment 182289 [details]
dmesg log

The monitor hang happened at 16:13:57, and there is nothing in dmesg from that time...
Comment 3 Lech 2025-06-17 07:48:02 UTC
Today another hang and no information from that time in dmesg. Can I provide some other info?
Comment 4 Bug Janitor Service 2025-07-02 03:47:31 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Zamundaaa 2025-07-03 16:12:53 UTC
I'm not entirely sure if the NVidia driver prints warnings on GPU reset, but the fix for that would be in 6.4.0+. Can you still reproduce it with that version?

If yes, then maybe some drm debug logging could help figure out what's going on. https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues describes how to record that
Comment 6 Bug Janitor Service 2025-07-18 03:47:09 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Lech 2025-07-18 07:37:44 UTC
I couldn't reproduce this bug on 6.4.3 on Fedora 42 for more than a week, so I think it is indeed fixed. Thanks!