https://bugs.kde.org/show_bug.cgi?id=468184
Bug ID: 468184 Summary: Kwin moving windows and resizing them very poorly to unusable states on multi-monitor setups during unplug events Classification: Plasma Product: kwin Version: 5.27.2 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: multi-screen Assignee: kwin-bugs-n...@kde.org Reporter: mich...@butash.net Target Milestone: --- SUMMARY KDE in general has been bad at dealing with windows placements for some time for me in using 4x displays is my normal, but every time geometry changes with undocking (or a power hit/glitch simulating one), removing 3x displays then moves windows and resizes them to unusable and unfindable widths, and never restores them to proper placement/geometry upon restoration of desired kscreen arrangement. STEPS TO REPRODUCE 1. Configure 4x displays in extended mode right to left in a 15360x2160 display set 2. Arrange various applications such as firefox, konsole, okular, steam, keepassxc, libreoffice, and other applications across all 4 displays. 3. Disconnect the Thunderbolt 4 dock adding the 3x external ports/displays to the unit 4. Watch KDE move windows the laptop display normally the far left-most display, adjusting placement to the right left of the screen, and resizing them horizontally to a much smaller with (5-100px wide), but not vertically. 5. Reconnect thunderbolt dock, observe KDE restore 3x additional displays and arrangement. 6. Observe some of the moved windows are replaced back to their original placement, but typically only a small subset 7. Observe others are left on the far left-most laptop display with poorly resized horizontal pixel width OBSERVED RESULT Using 4x displays, 1x built-in on a laptop, and 3x external connected to a Thunderbolt 4 dock, when dock is disconnected, kwin shuffles applications to the remaining laptop display, but in doing so commonly will mangle horizontal window geometry of most, but not all open applications, and often overlap them very non-optimal ways. Once the dock is reconnected/restored, kscreen restores the display arrangement, but kwin is not restoring all the windows to their proper placement or geometry. Even stranger is it's almost random where it moves things each time, when it happens moving things small and small widths when resizing, and moving some displays half off different parts of the screens. Seeing as this can happen at times several times a day, shuffling my applications about each time, resizing them so small horizontally even finding them on a tiny 15" laptop displays is extremely difficult where the 3x other displays are 50" TV's. Even stranger is it gets incrementally worse each time it happens. EXPECTED RESULT At bare minimum, seeing these are all the same 3840x2160 displays, it should have no reason to resize the horizontal widths between across different resolutions, and once kscreen re-applies its given screen profile for the given displays to restore geometry, those displays should be replaced across the original set of displays. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux, kernel 6.2.5-arch1-1 KDE Plasma Version: 5.27.2 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION This has been happening for some time across prior and new laptops for years now commonly, where recently clearing kscreen, plasmascreenrc, desktop-appletsrc files from home .config/.local files helped this this initially, but each time is incrementally regressing worse in worse in moving/resizing different apps in different places/sizes. It seems if it needs to resize a window, it should never consider resizing a something from 2000px wide to only 5px wide. As well, it would be nice if when it does move all my windows to a single display to at least tile them in some rough fashion vs. a dogpile into the left and bottom-most corner on the display. I have attempted to add using the kwin script "restoreToScreen" to help this, but with or without doesn't seem to matter. Feedback on this script's github is that kwin has taken this feature on, but seems to do so poorly with or without the script. https://github.com/Hegemonia123/restoreToScreen/issues I am unsure where to look for troubleshooting anything related windows placement state tracking, but would happy to provide requested information. -- You are receiving this mail because: You are watching all bug changes.