Bug 486328 - External screens switch off when laptop lid is closed with USB-C dock with dual monitor (single monitor works)
Summary: External screens switch off when laptop lid is closed with USB-C dock with du...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.1.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-30 07:59 UTC by Gábor Katona
Modified: 2025-03-01 11:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
Window shifted halfway off screen after opening lid (142.66 KB, image/jpeg)
2024-04-30 08:01 UTC, Gábor Katona
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gábor Katona 2024-04-30 07:59:22 UTC
SUMMARY
Using openSUSE Tumbleweed on a Lenovo X1 Carbon Gen9. I have a setup with a Lenovo USB-C dock with two external screens connected. It is configured to have only the external screens when connected (built-in screen disabled). When I close the lid of the laptop all external screens switch off since probably last week. Before it was not happening and  nothing was changed in settings. When doing a fresh boot with lid closed the login screen is on both external screens but after login they switch off. Opening the lid switches on external screens as expected (built-in screen is disabled as set). Additionally after closing and opening the lid some windows are shifted halfway off the screen (see attachment). If  I disconnect one of the monitors physically, it works as expected. Connecting immediately results in switch off of both external screens if lid is closed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed 20240428
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Comment 1 Gábor Katona 2024-04-30 08:01:23 UTC
Created attachment 169030 [details]
Window shifted halfway off screen after opening lid
Comment 2 Gábor Katona 2024-06-26 13:28:12 UTC
This problem is still present, but as I have tested it only affects Wayland session. If using X session everything work fine.
Comment 3 Bug Janitor Service 2025-01-10 16:21:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/491
Comment 4 Zamundaaa 2025-01-10 17:56:11 UTC
Git commit 9907c8a247a356eeb4214d0d3c6fd8733399bd76 by Xaver Hugl.
Committed on 10/01/2025 at 17:42.
Pushed by zamundaaa into branch 'master'.

daemon/actions: don't immediately suspend when the external monitor gets removed

Display hotplugs don't reliably mean that the display was actually physically unplugged,
it can also just be a dock or monitor acting weird. To fix that / work around it, this
only triggers the action if there's still no display after 2s.

M  +18   -4    daemon/actions/bundled/handlebuttonevents.cpp
M  +2    -0    daemon/actions/bundled/handlebuttonevents.h

https://invent.kde.org/plasma/powerdevil/-/commit/9907c8a247a356eeb4214d0d3c6fd8733399bd76
Comment 5 Zamundaaa 2025-01-10 18:03:16 UTC
Git commit 4c4d4dda325e717ed31e517cecc83d5fd8657857 by Xaver Hugl.
Committed on 10/01/2025 at 17:56.
Pushed by zamundaaa into branch 'Plasma/6.3'.

daemon/actions: don't immediately suspend when the external monitor gets removed

Display hotplugs don't reliably mean that the display was actually physically unplugged,
it can also just be a dock or monitor acting weird. To fix that / work around it, this
only triggers the action if there's still no display after 2s.


(cherry picked from commit 9907c8a247a356eeb4214d0d3c6fd8733399bd76)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +18   -4    daemon/actions/bundled/handlebuttonevents.cpp
M  +2    -0    daemon/actions/bundled/handlebuttonevents.h

https://invent.kde.org/plasma/powerdevil/-/commit/4c4d4dda325e717ed31e517cecc83d5fd8657857
Comment 6 Gábor Katona 2025-02-28 07:17:34 UTC
I am on 6.3.2 now and still have this bug, however now the windows are not corrupted, only the external screens switch off when closing the lid. If I have only one monitor switched on, it works fine. If I switch on the second monitor while the lid is closed, both screens are switched off. 

Moreover, if I first close the lid with dual monitors (thus the screens switch off), then switch off one of the monitors, then open the lid, the second monitor is still there in the screen setup; i.e. its removal is not detected.

I think the bug should be reopened or should I make a new report?
Comment 7 Gábor Katona 2025-02-28 07:26:57 UTC
I have just tested, the bug is only present in Wayland session, with X11 it works fine. I do not even know if the bug was resolved for me, as I switched to X11 because of several bugs with Wayland, however now I should switch back because of a serious bug with X11 sessions.
Comment 8 Gábor Katona 2025-02-28 07:40:58 UTC
One more comment: with kscreen-doctor I can reenable the external screens while disabling the internal, thus it is purely a wrong logic somewhere.
Comment 9 Nate Graham 2025-02-28 16:24:46 UTC
Sounds a bit like a new bug; can you open a new bug report for it? Thanks!
Comment 10 Gábor Katona 2025-03-01 11:47:40 UTC
(In reply to Nate Graham from comment #9)
> Sounds a bit like a new bug; can you open a new bug report for it? Thanks!

Thanks, I have reported as bug 500888.