SUMMARY Unplugging external monitor repositions windows to right side of screen. STEPS TO REPRODUCE 1. Connect external monitor 2. Display some windows/apps on external monitor 3. Unplug external monitor OBSERVED RESULT All windows are moved to laptop screen but they are repositioned to right side of the screen. EXPECTED RESULT Windows positions should remain the same on laptop screen (e.g. centered windows must remain centered) ADDITIONAL INFORMATION Same issue occures also in Deepin DE since it now uses kwin as default WM.
Git commit 4928f4db5b810969c70d549729c23ff95d1a6781 by Vlad Zahorodnii. Committed on 30/10/2021 at 14:02. Pushed by vladz into branch 'master'. Try to preserve window position relative to their outputs during hotplug Currently, if an output is hotplugged, all windows will be scrambled, which is highly annoying. With this change, windows will stick to their outputs if an output has been connected or disconnected. Related: bug 296673, bug 378896, bug 443698 M +10 -12 src/abstract_client.cpp https://invent.kde.org/plasma/kwin/commit/4928f4db5b810969c70d549729c23ff95d1a6781
*** Bug 161325 has been marked as a duplicate of this bug. ***
Created attachment 145437 [details] external display
Created attachment 145438 [details] laptop display after unplug
I just tested this on latest 5.24 beta and issue is still not resolved. Check attached screenshots. Kate was centered but after unplug it was moved to bottom and on right.
This has been an issue for me for many years. But I should add that my main (external) screen is much larger (4k). All windows seem to retain their size but not their position after disconnecting and reconnecting it. It's extremely annoying and disorienting. It also happens when one of the screens go to sleep by itself. I'm commenting on this bug and not one that sounds more relevant because those are marked as duplicates of this one, so I guess it's considered the same issue. It happened in all distros I've used: Kubuntu, Arch, SteamOS 3.x... All x64, maybe one ARM. Currently using KDE 5.90.0, kwin 5.23.5. All X11.
There's a new fix in Plasma 5.26; please try again there. Thanks.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Yesterday I could confirm that it's fixed in kwin 5.26.1. I'm sorry for the delay. When I reconnect the external display, all unmodified windows go back to their original places. If a window was moved when the external display is disconnected it remains moved after, but that's not really a bug, and it works well using the kwin script "restoreToScreen". (this script didn't work in the old version either)