I'm running Ubuntu MATE 20.04 with matching dual monitors. I want the computer to put the displays to sleep which it does, however when waking the displays and unlocking, all the windows have been moved to the primary screen, meaning i need to move them back any time the screen locks.
Any idea of a fix or workaround?
Please provide a description of what you do to suspend your computer (not your monitors) and why you also elect to lock the screen. I am trying to duplicate your problem and failing.
I never manually suspend my computer. Under Power Management Preferences I have this:
I used your example in Power Manager Preferences, Display, Put display to sleep when inactive for: and set mine for 1 minute and then watched my two dissimilar screens turn off. None of my open windows moved when I tapped the spacebar and restored the views.
When I set the screensaver to lock when active, I saw the lock dialog box appear on my laptop screen and I provided my password. No window movement. Perhaps your monitors are exactly alike and that might be somehow causing your problem.
I'm fresh out of ideas. Good luck @Aurelius.
@mdooley, I just tried something more specific. Full-screen windows or windowed ones didn't have this issue. Try using the window snap to left half or right half, and then letting the screens turn off.
I'll add this is happening on the windows snapped to edges on the non-primary screen, and the panel bar (one on each screen) occasionally jumps up, detaching itself from the bottom.
I actually have this very same problem, only on stock Ubuntu. Digging seems difficult, but from what I know about the system I have the following theory:
- Screen A goes to sleep slightly faster than screen B
- The system then treats this as the screen "disconnecting"
- Since only one screen is active, the windows are moved to the active screen
- Alternatively, the problem occurs when waking up; one screen is slower to respond than the other with the same result happening.
I have yet to find a solution for this and would welcome any help. One of my screens are VGA-through-HDMI if that helps any.
And yes, this seems to be mostly affected by screen-snapped windows.