| Summary: | Laptop screen does not turn on after turning off external monitor [Wayland] | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Jackson <bugs> |
| Component: | multi-screen | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | drm debug log | ||
|
Description
Jackson
2025-11-15 20:17:18 UTC
And here is the output of kscreen-doctor -o:
Output: 1 eDP-1 d520fe95-3b4a-4bbe-b174-2442dd599d1d
disabled
connected
priority 0
Panel
replication source:0
Modes: 1:1920x1200@60*! 2:1600x1200@60 3:1600x1200@60 4:1280x1024@60 5:1280x1024@60 6:1024x768@60 7:1024x768@60 8:1280x800@60 9:1280x800@60 10:1920x1080@60 11:1920x1080@60 12:1600x900@60 13:1600x900@60 14:1368x768@60 15:1368x768@60 16:1280x720@60 17:1280x720@60
Geometry: 0,0 1920x1200
Scale: 1
Rotation: 1
Overscan: 0
Vrr: Automatic
RgbRange: Automatic
HDR: incapable
Wide Color Gamut: incapable
ICC profile: none
Color profile source: sRGB
Color power preference: prefer efficiency and performance
Brightness control: supported, set to 100% and dimming to 100%
Color resolution: automatic (10), range: [6; 12] bits per color
Allow EDR: always
Output: 2 DP-1 ca0718b3-1281-4620-a7d1-cc78c376f5bc
enabled
connected
priority 1
DisplayPort
replication source:0
Modes: 18:2560x1440@60*! 19:2560x1440@75 20:2048x1080@60 21:1920x1080@60 22:1920x1080@60 23:1920x1080@60 24:1920x1080@50 25:1600x900@60 26:1280x1024@75 27:1280x1024@60 28:1152x864@75 29:1280x720@60 30:1280x720@60 31:1280x720@50 32:1024x768@75 33:1024x768@60 34:800x600@75 35:800x600@60 36:720x576@50 37:720x576@50 38:720x480@60 39:720x480@60 40:720x480@60 41:720x480@60 42:640x480@75 43:640x480@60 44:640x480@60 45:640x480@60 46:720x400@70
Geometry: 0,0 2560x1440
Scale: 1
Rotation: 1
Overscan: 0
Vrr: Automatic
RgbRange: Automatic
HDR: incapable
Wide Color Gamut: incapable
ICC profile: none
Color profile source: sRGB
Color power preference: prefer efficiency and performance
Brightness control: supported, set to 100% and dimming to 100%
Color resolution: automatic (10), range: [6; 12] bits per color
Allow EDR: unsupported
I figured out how to consistently reproduce the bug every time. STEPS TO REPRODUCE 1. Confirm Display Configuration is set to "Switch to external screen" when connected to an external monitor. 2. Wake and then sleep the laptop while *not* connected to the external monitor. 3. Connect the laptop to the external monitor and turn the monitor on. 4. Wake the laptop and log in.[1] 5. Turn off the monitor or disconnect the laptop. OBSERVED RESULT The laptop's built-in screen does not turn on. Even after sleeping and waking it again, the screen will never turn on and the issue is only resolved by a hard restart. EXPECTED RESULT The laptop's built-in screen should turn on. ADDITIONAL INFORMATION My issue before was that sleeping the laptop while connected to the monitor does not trigger the problem so it seemed inconsistent to me. I have also tested this with an X11 session. The bug never occurs with X11: the laptop's screen always turns on as it should. It is, therefore, some issue with Wayland. In addition, the bug still occurs if the login screen is not set to show after waking from sleep. I did, at least, discover a sort of workaround. Always wake the laptop *before* connecting it to the external monitor. Then, once the monitor is turned on and plugged in, it will switch properly. If the monitor is first turned on as the laptop wakes, then the bug will appear when the laptop is disconnected again and won't resolve until a reboot. [1] Often the login screen at this point shows a sign that there is something wrong, namely the circle around the user avatar is missing and the avatar is square; unsure if that is relevant. Following those steps, that unfortunately doesn't reproduce the problem for me, the internal display turns on fine. If you can consistently reproduce it, that still helps a lot with debugging though. Judging by > kwin_wayland_drm: Atomic modeset test failed! Invalid argument the driver is rejecting KWin's output configuration, so either there's a bug in KWin or in the driver. Either way, we need to find out why it's getting rejected. https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues describes how to enable drm debug logging - enable it, trigger the issue, and then attach the log here. You can do all of that from ssh as well, ideally you enable debug logging + run dmesg right before unplugging the external monitor, and stop it right afterwards. One thing you can also test then is if > killall -9 kwin_wayland will get your system back to a working state. Created attachment 187442 [details] drm debug log Thanks for the response, it is appreciated. I wonder why it's only happening on my setup. Using killall -9 kwin_wayland does temporarily fix the issue, acting the same as a restart (i.e., it works properly until the laptop sleeps while not connected to the external monitor, then the problem returns). Well, almost the same: for some reason after the killall command the lock screen won't show a "Sleep" option under the password prompt, only "Switch User" (probably not relevant?). I followed the instructions, hopefully I did it correctly. These are the exact steps I followed: 1. Input into a terminal: > echo 0x1FF | sudo tee /sys/module/drm/parameters/debug 2. Unplugged the monitor from the laptop. (No image appeared on the laptop screen.) 3. Plugged the monitor back into the laptop. (At this point there is no image on the built-in screen or external monitor, which is always the case with this issue; I don't think I made that clear earlier. In this state the computer doesn't seem to even recognize keypresses, e.g., can't switch to virtual terminal.) 4. Put the laptop to sleep by closing the lid. 5. Woke the laptop by opening the lid. (The external monitor now shows an image and I can get past the lock screen.) 6. Input into a terminal: > sudo dmesg -w > drm-debug.log The log is attached, let me know if there's anything else I can provide. 🐛🧹 ⚠️ 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! |