I have Linux Mint Cinnamon 18.3 running with the proprietary drivers from Nvidia. The automatic display detection is great for setting up (way easier than the old days!) but as DisplayPort disconnects monitors when they're turned off, it's moving my windows around on my 3 display setup.

Is there any way to take a snapshot of the currently detected configuration and lock it in xorg to stop things changing and moving my windows around?

Alternatively, is there any way to tell the proprietary driver to ignore power states for the monitor? I'm unaware of the specifics of the DP protocol so not sure if this is an issue.

I had to disable DPMS/ sleep mode for my monitor as it kept crashing on resume so the only other option I have is to leave my monitors on all the time which will waste a lot of power.

Happy to share any configs etc but as it's all auto-detected I wasn't sure that would be much help.

  • Automatic display and audio detection/configuration is great, but only when it does what you want. I don't have an answer, but you can write a repair script in bash, etc. using tools like xrandr and xdotool to put things back where you want them. I have one that fixes my KDE desktop after I start a new session. If you get really fancy, you can detect the device being turned on and off and trigger your script. – Joe Mar 17 '18 at 3:42
  • Thanks @Joe, I'll look into those tools. It's a bit of a shame going from one extreme (annoyingly manual) to another (annoyingly automatic) but I guess 2019 will just have to be the year of the linux desktop instead. – AndrewWhalan Mar 18 '18 at 23:54

In most cases, the RandR extension is used to configure display settings. Therefore, I will focus on it in this answer. So this answer may not apply if you're using Wayland, the proprietary NVIDIA drivers without DRM (Direct Rendering Manager) kernel mode setting enabled or have disabled the RandR extensions. If so, calling xrandr should result in an error instead of printing the current display configuration.

While xrandr does not change the display configuration if you unplug a monitor, your desktop environment does this. Technically, the desktop environment is implementing an xrandr client which is handling the XRRScreenChangeNotify event and updating your display configuration when a monitor is disconnected.

Depending on your used desktop environment, you can disable this behavior:

Gnome till 3.1.3:

gsettings set org.gnome.settings-daemon.plugins.xrandr active false

This option was to be removed in newer versions. Seems to be handled by Mutter now.


Copy /etc/xdg/autostart/cinnamon-settings-daemon-xrandr.desktop to $HOME/.config/autostart. Then append the line Hidden=true to the copied file.

Cinnamon before 3.4:

gsettings set org.cinnamon.settings-daemon.plugins.xrandr active false

Mate Desktop:

gsettings set org.mate.settings-daemon.plugins.xrandr active false


kscreen is managing the display settings in the KDE Plasma 5 desktop. There seems to be no way to disable the auto-plug behavior with a configuration setting. However, you can kill the daemon which is responsible for it /usr/lib/kf5/kscreen_backend_launcher to prevent any further changes to your display configuration. Note: The daemon will be restarted when you're launching the KDE display settings.

| improve this answer | |
  • Thanks @sven.to. Am trying to get this working correctly on Cinnamon 4.2.4 on Mint 19.2, and have made some progress. After doing as described, then rebooting, if I put a window onto a second monitor and then switch it off and on again, the window still jumps back to the first monitor - but only the first time I do it. Doing it again results in the window staying where it's put, even when the monitor is off. Any ideas why this might be? I tried watching the Melange/cinnamon-looking-glass log while I do this, but no entries appear (either the first time or subsequent times). – Alex Apr 20 at 14:59
  • Oh... windows moved to the second monitor no longer appear on the taskbar/panel either haha. – Alex Apr 20 at 15:10
  • Thanks @sven.to. I'm on Cinnamon 4.6.3 on Arch Linux. Your approach was mention got me close, but I encountered issue configuring the display, getting a weird error XRANDR_2 was not provided by any .service files. The desktop position was wrong. I realized the $HOME/.config/monitors.xml was generated by csd-xrandr, If I setup my desktop properly, then kill csd-xrandr. It seems to do the trick. – faulty Jun 18 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.