I just installed Ubuntu 17.10 on my Asus n56vz laptop with two external displays connected and found that display settings (primary display, positions, etc.) are not saved (are not kept after reboot). Also, I faced with a problem editing display positions (drag and drop doesn't work well).

Possibly, it happens because of two configurations in monitors.xml file. The first one is active when laptop lid is closed and has two external displays. The second one is active when laptop lid is opened and has three displays (internal and external ones).

Update, I tried to update 'monitors.xml' manually, it looks like that it is not used at all.

Update, I was able to fix it, and to enable my laptop to remember display settings by disabling laptop lid opening handling setting 'IgnoreLid=true' in '/etc/UPower/UPower.conf' file.

There are several similar questions on askubuntu, but no clear answers.

2 Answers 2


If you use NVIDIA drivers you must change your settings from there.I would recommend using xrand command to change your settings, you can make auto run script or a key combination to switch between settings using xrand command.

Edit: To fix it set IgnoreLid=true in /etc/UPower/UPower.conf file!

  • Thank you! I tried to use NVidia control panel with the same result (display settings are not saved). And, I am thinking about creating of xrandr script for my display settings. Though, I hoped that such simple issue can be solved without scripting:) Jan 17, 2018 at 14:27
  • 1
    Just in case if it is interesting for somebody, xrandr line for my display settings (one display above another) "xrandr --output VGA-1-1 --auto --primary --output HDMI-0 --auto --above VGA-1-1" Jan 17, 2018 at 14:47
  • this can be solved without script, but it will take more time to find where the problem is and solving it.
    – AsenM
    Jan 17, 2018 at 14:48
  • I did it without scripting by setting 'IgnoreLid=true' in '/etc/UPower/UPower.conf' file! Jan 19, 2018 at 8:53
  • Thats great to hear, I will edit my answer with your comment so people can benefit from it, is that okay?
    – AsenM
    Jan 19, 2018 at 8:54

I tried the following on Ubuntu 22.04 with an external display connected to an NVIDIA GPU via HDMI. open nvidia-settings:

$ sudo nvidia-settings

Then under nvidia-settings Configuration tab, check:

  • Include X Display Names in the Config File

Your system should save the current display configurations.

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.