STEPS TO REPRODUCE 1. Laptop with internal screen and external screen (VGA) set up to the right of the laptop screen 2. Close the laptop lid while configured to go to sleep 3. Open the lid again to wake the laptop up again OBSERVED RESULT Screens are mirrored, not shown as "replica of" but overlapped EXPECTED RESULT Screens are aligned next to each other, as before SOFTWARE/OS VERSIONS git master X11 ADDITIONAL INFORMATION It does not happen when sending the laptop to sleep e.g. through the KRunner action.
Further info: - not reproducible every time - didn't occur on Wayland the one time I tested it - connection is VGA on the monitor side and USB-C on the laptop side with an adapter
It's https://invent.kde.org/plasma/kscreen/-/blob/master/kded/daemon.cpp?ref_type=heads#L542 that does that and I don't understand why that line is there. From the journal: > Jul 23 15:13:18 montague kded6[531910]: kscreen.kded: KScreen::Output(65, "eDP-1", connected enabled priority 1, pos: QPoint(0,0),> > Jul 23 15:13:18 montague kded6[531910]: kscreen.kded: KScreen::Output(68, "DP-2", connected enabled priority 2, pos: QPoint(1920,0> > Jul 23 19:06:33 montague kded6[531910]: kscreen.kded: Lid closed, waiting to see if the computer goes to sleep... > Jul 23 19:13:36 montague kded6[531910]: kscreen.kded: Moving "DP-2" from QPoint(1920,0) to QPoint(0,0) > Jul 23 19:13:36 montague kded6[531910]: kscreen.kded: Lid opened! That second to last entry is what shouldn't happen, or what should be reverted after opening the lid.
Looks like it should be moved when the lid is closed when the laptop output is disabled (which is reasonable I guess) but judging by the timestamps this doesn't actually happen until after the lid is already opened again and it never gets properly reverted?
One more relevant entry: > Jul 23 22:20:06 montague kded6[531910]: kscreen.kded: Lid closed, finding lid to disable > Jul 23 19:31:03 montague kded6[531910]: kscreen.kded: Lid closed, waiting to see if the computer goes to sleep... > Jul 23 19:13:36 montague kded6[531910]: kscreen.kded: Moving "DP-2" from QPoint(1920,0) to QPoint(0,0) > Jul 23 19:13:36 montague kded6[531910]: kscreen.kded: Lid opened! So it looks like the check in https://invent.kde.org/plasma/kscreen/-/blob/master/kded/daemon.cpp?ref_type=heads#L452 fails to fire.
I got messages with timestamps from different iterations mixed up but the order is right. The last three messages all get printed at the same second, when the lid is already open again, but the disableLidOutput still seems to kick just before the lidClosedChanged does.