Bug 506982

Summary: Laptop screen does not turn on after disconnecting docking station
Product: [Plasma] kwin Reporter: Grzegorz <grzegorz.alibozek>
Component: multi-screenAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: major CC: kdedev, nate, spamless.9v5xj, xaver.hugl
Priority: NOR Keywords: multiscreen
Version First Reported In: 6.4.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 506893    
Attachments: journalctl

Description Grzegorz 2025-07-13 08:45:49 UTC
Created attachment 183196 [details]
journalctl

SUMMARY
After disconnecting from a docking station while using external monitors (with the laptop screen turned off), the laptop screen does not turn on. Additionally, when undocking, the external monitors also do not remain active. The system appears to fail to properly switch outputs, resulting in a black screen.

STEPS TO REPRODUCE
* Connect laptop to docking station with external monitors.
* Use the system exclusively on external monitors (with internal laptop screen off).
* Disconnect the laptop from the docking station.

OBSERVED RESULT
* Neither the laptop screen nor the external monitors turn on after undocking.
* System seems to lose track of available display outputs.
* Logs indicate Wayland and DRM-related failures.

EXPECTED RESULT
* The laptop display should turn on automatically after undocking.
* Alternatively, at least one usable screen should remain available for user interaction.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux
KDE Plasma Version:  6.4.2
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION

Excerpts from system logs during the failure
Comment 1 TraceyC 2025-07-31 20:37:48 UTC
Moving to kwin, which handles displays
Comment 2 Nate Graham 2025-08-26 21:24:53 UTC
The contents of the journal log look highly relevant. Pasting them here for searchability:

Jul 13 09:52:37 kernel: thinkpad_acpi: undocked from hotplug port replicator
Jul 13 09:52:37 plasmashell[105366]: The Wayland connection experienced a fatal error: Błąd protokołu
Jul 13 09:52:37 kernel: usb 3-1.1.3.2: USB disconnect, device number 63
Jul 13 09:52:37 kernel: usb 3-1.2: cannot submit urb 0, error -19: no device
Jul 13 09:52:37 kwin_wayland[1706]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x55b278b84130, name="eDP-1", geometry=QRect(0,0 1920x1200), scale=1)
Jul 13 09:52:37 kernel: usb 3-1.2: cannot submit urb 0, error -19: no device
Jul 13 09:52:37 kernel: usb 3-1.2: cannot submit urb 0, error -19: no device
Jul 13 09:52:37 kwin_wayland[1706]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x55b278b84130, name="eDP-1", geometry=QRect(0,0 1920x1200), scale=1)
Jul 13 09:52:37 kernel: usb 3-1.2: cannot submit urb 0, error -19: no device
Jul 13 09:52:37 kwin_wayland[1706]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x55b278b84130, name="eDP-1", geometry=QRect(0,0 1920x1200), scale=1)
Jul 13 09:52:37 kwin_wayland[1706]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x55b278b84130, name="eDP-1", geometry=QRect(0,0 1920x1200), scale=1)
Jul 13 09:52:37 dolphin[6264]: qt.qpa.wayland: There are no outputs - creating placeholder screen
Jul 13 09:52:37 kwin_wayland[1706]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x55b278b84130, name="eDP-1", geometry=QRect(0,0 1920x1200), scale=1)
Jul 13 09:52:37 dolphin[117476]: qt.qpa.wayland: There are no outputs - creating placeholder screen
Jul 13 09:52:38 plasmashell[121176]: kf.plasma.quick: Applet preload policy set to 1
Jul 13 09:52:38 kernel: usb 3-1.2: cannot submit urb 0, error -19: no device
Jul 13 09:52:38 kernel: usb 3-1.2: USB disconnect, device number 60
Jul 13 09:52:38 kernel: usb 3-1.3: USB disconnect, device number 59
Jul 13 09:52:40 plasmashell[121176]: qt.core.qabstractitemmodel.checkindex: Index QModelIndex(-1,-1,0x0,QObject(0x0)) is not valid (expected valid)
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Atomic modeset test failed! Zły argument
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Setting dpms mode failed!
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Atomic modeset test failed! Zły argument
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Setting dpms mode failed!
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Atomic modeset test failed! Zły argument
Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Setting dpms mode failed!
Jul 13 09:52:54 kwin_wayland[1706]: kwin_wayland_drm: Atomic modeset test failed! Zły argument
Jul 13 09:52:54 kwin_wayland[1706]: kwin_wayland_drm: Setting dpms mode failed!
Comment 3 Grzegorz 2025-09-08 15:17:27 UTC
I noticed that the problem occurs when I use the laptop for a longer period of time, when I unplug it right after turning it on, it is difficult to cause it

This error is very annoying because I lose my work when I move, I have to reset my laptop :/
Comment 4 Zamundaaa 2025-09-17 19:04:24 UTC
> Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Atomic modeset test failed! Zły argument
> Jul 13 09:52:53 kwin_wayland[1706]: kwin_wayland_drm: Setting dpms mode failed!
Yeah, that's the cause of the problem. As the information we normally get from the driver is very light on details, we need to get debug information from the kernel directly: https://invent.kde.org/plasma/kwin/-/wikis/Debugging/Debugging-DRM-issues

If you attach the dmesg log here, I can take a look at what the underlying issue is.
Comment 5 Bug Janitor Service 2025-10-02 03:46:27 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 6 Bug Janitor Service 2025-10-17 03:47:16 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.