I have two monitors with resolutions 1366x768(CRT1) and 1024x768(CRT0). CRT0 stays to the right from CRT1 so common resolution is (1366+1024)x768. Recently I noticed that when I move mouse from CRT1 to CRT0 it doesn't go to CRT0 immideately, that is, the common resulution is bigger than (1366+1024)x768. I went to X Server Settings and there was the following:
enter image description here
It is really wierd where that 1708 number came from but I didn't think much about it and just changed it to +1366+0, saved it to /etc/X11/xorg.conf and forgot about it. But on the next boot I see misterious +1708+0 again. I tried to change settings to this:
enter image description here
That worked only until reboot too. So I am lost. I don't have any errors, I am able to save xorg.conf I tried everything I could have thought of, but on each boot I get that +1708+0.
Here's my /etc/X11/xorg.conf.

Ubuntu 14.04 LTS x64

$ cat /proc/version
Linux version 3.19.0-42-generic (buildd@lgw01-24) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #48~14.04.1-Ubuntu SMP Fri Dec 18 10:24:49 UTC 2015

$ dpkg -l | grep nvidia
ii  nvidia-331                                            340.96-0ubuntu0.14.04.1                             amd64        Transitional package for nvidia-331
ii  nvidia-340                                            340.96-0ubuntu0.14.04.1                             amd64        NVIDIA binary driver - version 340.96
rc  nvidia-libopencl1-340                                 340.96-0ubuntu0.14.04.1                             amd64        NVIDIA OpenCL Driver and ICD Loader library
ii  nvidia-opencl-icd-340                                 340.96-0ubuntu0.14.04.1                             amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                                          0.6.2                                               amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                                       331.20-0ubuntu8                                     amd64        Tool for configuring the NVIDIA graphics driver

Thank you in advance.


The issue with screen position has been fixed, it was about monitors.xml file which overrided xorg.conf settings, thanks to @Jacob Vlijm. But when I changed position in monitors.xml ubuntu forgot where is my primary monitor and now after reboot I have monitors 'swapped' where I have to move mouse to the left in order to go to right monitor. Here's my monitors.xml. By the way, This solution didn't help.

  • 1
    Could be easily worked around with a small login script or command. The cause is probably your local monitors.xml file or other local source. Anyway, would you care for a workaround? Would need the output of the xrandr command if so. Could you post it somewhere in that case? Dec 23 '15 at 19:18
  • Thanks for reply. Yes that could be solved with scripts but I'd like to find the cause. If this can't be easily fixed I'll accept the workaround. Here's xrandr output.
    – Timofey
    Dec 23 '15 at 19:42
  • 1
    Hard to say without sitting behind the computer, but it must be a local source I am pretty sure. Drop me a note if you go for the bad solution :) Dec 23 '15 at 19:46
  • 1
    So yes, the guilty was on monitors.xml file, thanks! But when I changed position in monitors.xml ubuntu forgot where is my primary monitor and now after reboot I have monitors 'swapped' where I have to move mouse to the left in order to go to right monitor... Here's my monitors.xml. By the way, This solution didn't help.
    – Timofey
    Dec 23 '15 at 20:22
  • Posted the pragmatic solution. Please run the command first, since I am on my tablet, and typos are more likely to happen :). Please let me know if additional settings need to be made. The command can be extended to make any setting you need. Dec 23 '15 at 20:55

There are many possible reasons why a screen configuration does not "survive" a restart. In most cases, there are local sources like the monitors.xml file that simply overrule previously made settings.

Finding out what it is exactly, can be time-consuming, so my approach would be the practical solution: simply overrule whatever happens on log in by a simple command or small (xrandr) script. In this case, it is probably done by the command:

xrandr --output VGA-0 --pos 0x0 && xrandr --output DVI-I-0 --pos 1366x0

which arranges the screens from left to right, which you should always do.

Add the command to startup (log in)

Choose Dash > Startup Applications > Add, add the command:

/bin/bash -c "sleep 15 && xrandr --output VGA-0 --pos 0x0 && xrandr --output DVI-I-0 --pos 1366x0"


  • postioning a screen can be done with the command:

    xrandr --output VGA-0 --pos 0x0

    to position e.g the left screen, then:

  • Always arrange the screens from left to right

  • The sleep 15 is to make sure the command runs when the desktop is "ready", and possible local settings do not overrule the command.
  • Alright, I'll try it asap
    – Timofey
    Dec 23 '15 at 20:57
  • That helped thanks! The only thing I have added by myself is xrandr --output VGA-0 --primary to move Unity Dock to the left monitor. Also there's little typo in /bin/bash — it shouldn't have the slash at the end. Anyway I appreciate your help!
    – Timofey
    Dec 23 '15 at 21:27
  • @Timofey Perfect! Glad it works :) Dec 23 '15 at 21:29
  • 1
    And another one xrandr's the dust... ;-)
    – Fabby
    Dec 24 '15 at 0:16

To expound further on one aspect of @Jacob's answer: The monitor.xml file does override any similar left-to-right ordering that is set up in the nVidia Settings. Under Unity, System Settings/Display updates the ~/.config/monitor.xml file. Change the order of what monitor is on the left or right by dragging and dropping the rectangular boxes at the top of the window:

enter image description here

Start nVidia Settings via the main Search Your Computer button:

enter image description here

And it is here that you think you can change the order, but the monitor.xml file will override it:

enter image description here

I was tempted to just delete the monitors.xml file, in hope that the nVidia Settings would take command of the situation, but a comment on another answer implies this is not a good thing to do.

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.