linuxmint / linuxmint/cinnamon
Dual Monitors: Screen Lock and sleep moves windows to one monitor
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 915
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 3
Description
Problem: it is widely observed in cinnamon mint since atleast 2016 that when a computer sleeps or locks the screen windows that upon wake (sometimes but not always) all get moved and re-sized to one of the two monitors.
Since this has gone on for so long there's been a lot of witchdoctor voodoo "fixes" that work for some people but not others gathered on the very long but infrequently updated issue #5487 where this was originally filed. I am creating this new issue to try to summarize the emerged contours of this over the last few years of frustrations.
Regression:
It may be that this is not one problem but maybe three problems that look similar and are related. It may be the problem happens in some cases at "sleep time", and it may be that some times the problem happens at "wake". There may be also complications with Cinnamon and Nvidia both trying to manage the same configuration files.
observations and suspicions:
- It appears that the problem with sleep may be related to some interaction of screen blanking (black screen) triggering some monitors to go into a hibernation mode. And then some graphics cards (Nvidia) not detecting the monitors, leading to the windows being moved. In this situation the problem may actually be occurring when the system is going into screen-save or sleep.
evidence for this is that edit cinnamon-settings-daemon-xrandr.desktop to include an exit-time seems to be a fix for many people.
Exec=/usr/lib/cinnamon-settings-daemon/csd-xrandr --exit-time 1
There is some suscpicion that when one has different models of monitors, some of these may not have power saving features and some do, or that they may not have the same time-to-power-save. Thus different people may see different outcomes.
While seems to be a miracle cure for some folks, the problem with that 'fix' is that for some people if they manually turn off their monitors, the computer does not wake from sleep(!). (this hints that the problem here is much deeper than it seems, since that should not happen just by changing that setting).
- It may be this is a wake from sleep or wake from screen-blank issue. In this case the supposition would be almost the mirror image of the above issues. There the monitors may be in power save mode and not detected by the Nvidia graphics card. Or it may be that the Nvidia card is detecting them but something about this is not relayed to the system's window manager.
evidence for this is that changing the default settings for monitor detection to False sometimes fixes this for some people.
dconf write /org/cinnamon/settings-daemon/plugins/xrandr/active false
- there may also be some problem with configuration file management is the observation that the behaviour is different if the Nvidia system monitoring tool is left running all the time or not. People have speculated that both the cinnamon and the Nvidia are competing to reset the configuration file on monitor detection.
While the last observation hints that Cinammon may be at fault in some cases, the prior cases of the nvidia card not detecting the monitors may be not strictly a cinammon problem.
Evidence for this is the some people report some similar observations for other desktop environments:
"I'm experiencing something similar with a triple monitor setup on Fedora 31, Xfce 4.14. It is possible that this is an Xorg bug? there are similar relevant report for KDE on Ubuntu. I've also found some Xfce forum posts here and here."
Finally, there is one report of this happening on an AMD graphics card.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported behavior around sleep, screen locking, and wake, then inspect cinnamon-settings-daemon-xrandr.desktop and the csd-xrandr command. Compare reports involving --exit-time 1 with the dconf xrandr active setting and distinguish whether the issue occurs before sleep or after wake. Done requires a reproducible scope and a verified fix across the affected monitor configurations.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100