Created attachment 112071 [details]
Note: I'm not sure if this is a kscreen bug or kwin bug, but I'm leaning towards the former.
I have two monitors connected to my system, one 1080p per HDMI, one 4k per DisplayPort. When putting my system to sleep (RAM), the DisplayPort connection seems to be shutdown in a weird way. Upon resuming from sleep, kscreen detects the DisplayPort monitor multiple times, which confuses kwin and a bunch of other applications (like latte-dock). Usually this manifests in the following ways:
- Only the HDMI monitor shows the lock-screen, the 4k/DP monitor only shows a black background (no lock-screen controls), but does show a mouse cursor when moving it to the screen.
- kwin loses window positioning and moves my windows from the HDMI monitor to the DP monitor.
- latte-dock sets an incorrect screen mask, making the right half of the dock disappear (see https://github.com/psifidotos/Latte-Dock/issues/941 for the upstream issue)
This is not happening every time I resume, but more often than not. It makes me assume this is a timing issues. Maybe the screen first gets initialized with 1080p, then quickly switches over to 4k?
Debug output from kscreen attached!
I also have this issue when my monitor goes to Deep Sleep, upon wakeup the login screen appears on only one screen and my windows are a jumbled mess. This is with KDE 5.23.2