Bug 406866 - Windows rearranged when coming back from power save
Summary: Windows rearranged when coming back from power save
Status: RESOLVED DUPLICATE of bug 374908
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.18.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-25 01:48 UTC by John B
Modified: 2021-10-06 19:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
theswanted: X11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John B 2019-04-25 01:48:27 UTC
SUMMARY
=======

When I wake my screens back up from power save, some of the windows are rearranged/resized.  It's not quite 100% predictable, but there definitely seems to be a pattern.

DISPLAY LAYOUT
--------------

I have four monitors arranged horizontally, number 1-4 from left to right:

#1 is a DisplayPort 4K display in portrait
#2 is a DisplayPort 4K display in landscape
#3 is a DisplayPort 4K display in landscape [primary, contains the panel]
#4 is a DVI-D 1920x1200 display in landscape

SYMPTOMS
--------

When the screens wake back up, the following things are always (or very nearly always) true:

1. If Yakuake was open when the screens turned off, it has been relocated to #4 (I only ever open it on #2/#3)
2. The second Firefox window that I leave open on #4 has moved (but still on #4)
3. All VirtualBox VM windows have been relocated to #1, near the bottom of the screen, and have been resized (i.e. based on their current position they should extend off the bottom of the screen but the window has been resized to fit on the screen).  This does not (usually?) happen with VirtualBox' management window, just the actual VM consoles.

These things are sometimes/usually true:

1. The two widgets I have on #4 have moved (but still on #4); this happens whether I have "Lock Widgets" turned on or not
2. Random other windows I have open have relocated to #1
3. The main (I mean, it's just "main" 'cause that's how I think of it) Firefox window on #3 is where I left it
4. The panel is still at the bottom of #3 where it should be


STEPS TO REPRODUCE
------------------

1. Pursue evil world domination (various methods)
2. Take a break from evil to make a sandwich, long enough for the screensaver/power save to kick in
3. Come back and wake the screens up to resume pursuit of world domination to find my various sinister windows rearranged


OBSERVED RESULT
---------------

The windows (and it particularly affects VirtualBox VM consoles, for some reason) have had a party in my absence.


EXPECTED RESULT
---------------

I expect my windows to conduct themselves more sensibly; when I come back, they should have the same location/dimensions as they did before the power save.


SOFTWARE/OS VERSIONS
--------------------

(To confirm, these are all "...as packaged by Kubuntu 18.04".)

- Linux/KDE Plasma: Kubuntu 18.04
- KDE Plasma Version: 5.12.7
- KDE Frameworks Version: 5.44.0
- Qt Version: 5.9.5


ADDITIONAL INFORMATION
----------------------

I looked at the following existing bugs; while I don't think these reports describe precisely the same issue I'm having, I guess they might be related?  Especially the one with the guy who's also on about VirtualBox, even though his symptoms aren't exactly the same.  From a layman's perspective, this seems like an issue with the way Plasma handles removing and re-adding displays, and deciding what to do with windows when screens get added back.

I tried to provide these bug numbers as links, but the BTS rejected the submission because of "spam".  :)

348095
This is about Plasma's behaviour when closing a laptop screen

374783
Only applies to digiKam for MSW

374908
Rearrangement/resize behaviour doesn't quite match what I'm seeing (although it's interesting that this guy specifically calls out VirtualBox as well)

377297
This one seems more chaotic; it refers to all windows being jumbled around (including panels and such), whereas my issue is narrower

379334
This is about zero-height windows, which I'm not seeing (although some of the windows _are_ being resized)
Comment 1 John B 2019-04-25 01:53:48 UTC
I misspoke a bit in the previous comment: the last two things in the "usually true" list should be in the "always true" list.  That is to say, the "main" Firefox window and KDE Panel are always where I left them.
Comment 2 Jules RANDOLPH 2019-07-07 06:54:29 UTC
I can reproduce this bug with a two screens setup. One panel disappear after power save.

System:

██████████████████  ████████   jsamr@jsamr-nuc 
██████████████████  ████████   --------------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Host: NUC8i7HVK J71485-504 
████████           ████████   Kernel: 5.1.15-1-MANJARO 
████████  ████████  ████████   Uptime: 33 mins 
████████  ████████  ████████   Packages: 1447 (pacman) 
████████  ████████  ████████   Shell: zsh 5.7.1 
████████  ████████  ████████   Resolution: 1920x1080, 1920x1080 
████████  ████████  ████████   DE: KDE 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   WM Theme: Breeze 
████████  ████████  ████████   Theme: Breath [KDE], Adwaita [GTK2], Breath [GTK3] 
████████  ████████  ████████   Icons: Papirus [KDE], Adwaita [GTK2], maia [GTK3] 
                               Terminal: konsole 
                               Terminal Font: Noto Mono 10 
                               CPU: Intel i7-8809G (8) @ 4.200GHz 
                               GPU: Intel HD Graphics 630 
                               GPU: AMD ATI Radeon RX Vega M GH 
                               Memory: 3940MiB / 32085MiB 


plasma-desktop 5.16.2-1
Comment 3 Victor B. Gonzalez 2019-07-25 20:27:39 UTC
On Fedora 30 Plasma 5.15.5. I have 2 monitors (both DisplayPort, main horizontal, extra vertical) and 1 TV (HDMI) plugged in. The TV is usually off.

Almost every single time I return after a while and wake the screens up, the panel on the vertical screen will disappear. The main panel remains but either shows nothing in the task manager or all windows from both monitors get stuffed onto the main display causing the main task manager to list all windows.

This has been happening for a while with Nvidia and even now with AMD it still happens exactly as it did before. Something about the monitors ever turning off just throws the whole desktop into a confused state.
Comment 4 gdiamondfist 2020-02-22 12:44:44 UTC
I have the same issue with windows moving and sometimes my secondary rotated screen won't fully function.  This was working better but the latest version of plasma this has really regressed.

When I am working on my desktop computer and then walk away and come back after the monitors have gone to sleep (System is still crunching numbers so the system itself is not going into any kind of power save.) if both monitors come on, the windows will be rearranged. Sometimes the secondary rotated monitor will show the KDE sysmbol and the little spinning wheel splash screen, though it is frozen and won't show anything else.  I can take a window from my working primary monitor and move it over and while I can see the mouse moving the window is gone.  The frozen splash screen covering everything except the mouse pointer. 

To get the second screen working again I need to go into the Nvidia server settings or in the KDE desktop system settings and either disable/enable the second screen or change the rotation to standard and then rotate it back.  
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-40-generic
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Video Card:  Nvidia 2080 GTX
Driver version:  Nvidia 440.59
screens display port 1:  3440x1440 standard orientation
        display port 4:  1920x1200 rotated 90 degrees clockwise
Comment 5 Nate Graham 2021-10-06 19:26:00 UTC

*** This bug has been marked as a duplicate of bug 374908 ***