3

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
1

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.

Cinnamon:

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

KDE

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.

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.