Bug 502894

Summary: Resuming from sleep results in unresponsive black screen if external screen disconnected
Product: [Plasma] kwin Reporter: Gábor Katona <katonag>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: grave CC: kdedev, nate, vasanton2112, xaver.hugl
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Gábor Katona 2025-04-16 19:20:16 UTC
SUMMARY
If I send the laptop to sleep while connected to a USB-C dock with an external monitor and after sleep reached I disconnect it from the dock, resuming will result in an unresponsive state; i.e. black screen, no reaction to anything and in some cases also kernel panic happens (Caps Lock is blinking), e.g. when I reconnect the dock.


STEPS TO REPRODUCE
1. Connect the laptop to a USB-C dock with an external monitor, set it to external monitor only.
2. Send the laptop to sleep
3. Disconnect from the dock
4. Wake up the laptop

OBSERVED RESULT
Unresponsive state with black screen, no reaction to anything. Reconnecting to dock does not solve, moreover sometime leads to kernel panic.

EXPECTED RESULT
Wake up normally

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250414
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.1-1-default (64-bit)
Graphics Platform: X11 or Wayland


ADDITIONAL INFORMATION
I experience this since 6.3.4, before it was working fine. I have the feeling that somehow it is connected to the fix of bug 499383.

In the journal I see the following:

kwin_wayland[2333]: kwin_wayland_drm: failed to open drm device at ""
kwin_wayland_wrapper[2417]: Key repeat discarded, Wayland compositor doesn't seem to be processing events fast enough!

and lines with 
qt.qpa.wayland: There are no outputs - creating placeholder screen

Also there is:
plasmashell[2584]: file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:233:17: Unable to assign [undefined] to bool
plasmashell[2584]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
plasmashell[2584]: kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
Comment 1 Nate Graham 2025-04-17 15:45:48 UTC
*** Bug 502904 has been marked as a duplicate of this bug. ***
Comment 2 TraceyC 2025-04-17 19:09:15 UTC
The log lines are probably unrelated. I have those in my logs as well, and haven't seen this bug

Can you open the Crashed Process Viewer and see if there are any crashes that match the time you last saw this bug? Thanks.
Comment 3 Gábor Katona 2025-04-17 20:37:40 UTC
(In reply to TraceyC from comment #2)
> The log lines are probably unrelated. I have those in my logs as well, and
> haven't seen this bug
> 
> Can you open the Crashed Process Viewer and see if there are any crashes
> that match the time you last saw this bug? Thanks.

Unfortunately nothing.
Comment 4 Gábor Katona 2025-04-17 20:44:56 UTC
I have tested it again, and it fails.

The laptop was connected to the USB-C hub, set to only external screen. Sent to sleep. Disconnected from hub. Resumed, the result is black screen, no response. Reconnected to hub, nothing, disconnected again and kernel panic.
Comment 5 Gábor Katona 2025-04-17 20:51:01 UTC
The same happens if the laptop screen is also on. So it seems to be connected to the presence of external monitor.
Comment 6 TraceyC 2025-04-18 15:20:37 UTC
Thanks for that additional detail. So nothing in Plasma is crashing, the kernel panic is the problem. Your kernel may have been updated around the same time that your distro updated KDE Plasma.

Unfortunately, the KDE developers can't fix kernel problems. They can only fix KDE related code. I recommend that you report this to openSUSE (if you have one of the kernels they provide).

You might also see if there's a firmware update for the dock from the manufacturer. 

If you find something that is definitely related to Plasma, kwin or other KDE related code, please feel free to reopen this report, and attach related logs. Thanks for your understanding.
Comment 7 Gábor Katona 2025-04-18 17:40:05 UTC
Thanks and you are right. I have tested it now with older kernels and it is only present for 6.14.0+ kernels.
Comment 8 TraceyC 2025-04-18 18:12:27 UTC
Changing back to resolved since this is a kernel issue.