I have two monitors, and I run them both in Linux using the proprietary Nvidia drivers with "TwinView". I just installed Linux Mint 13, and since the install after every reboot my monitors come up in the wrong position (the computer thinks the left monitor is on the right).

After boot-up I can run the Nvidia config and fix the monitors' position, and I can even save the configuration file successfully. But as soon as I restart again, the monitors re-appear switched.

Does anyone have any idea what might be causing this (and more importantly, how I can solve it?)

* Edit *

I tried manually editing my xorg.conf as follows:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "CRT: 1280x1024, DFP: 1280x1024"
    Option         "TwinViewOrientation" "RightOf"
    SubSection     "Display"
        Depth       24

but the wrong monitor still comes up on the right.

If I change "RightOf" to "LeftOf", I boot in to a black screen and a frozen mouse/keyboard.

  • Not ideal, but consider using xrandr to set the monitor positions in an init script. Here is my usage: xrandr --output DP-2 --auto --panning 3840x2160+3840+0 --output DP-4 --panning 3840x2160+0+0 --right-of DP-2 Commented Nov 29, 2020 at 4:54

3 Answers 3


Run sudo nvida-settings and click on "Save to X configuration file":

enter image description here


If that doesn't work, try the following:

  • First, generate a new /etc/X11/xorg.conf using the nvidia utility:

    $ sudo nvidia-xconfig

    Your current xorg.conf (if you have one) will be saved as /etc/X11/xorg.conf.nvidia-xconfig-original

  • Now, set everything up as you want it with nvidia-settings and save to xorg.conf as in the screenshots above:

    $ sudo nvidia-settings

    Make sure you change something, otherwise nvidia-settings won't allow you to save your changes.

  • At this point, you should have an /etc/X11/xorg.conf file with a line like this in Section "Screen":

    Option         "metamodes" "CRT: 1440x900 +1600+0, DFP: 1600x900 +0+0"

    The details will be different but what this line means is that the CRT (VGA) monitor has a resolution of 1440x900 and a horizontal offset of +1600. In other words, it is to the right of my laptop's (DFP) monitor.

  • Remove all offset values (+1600+0 and +0+0 above) from that line and set the screen position like so (you can also use the offsets but I find this clearer):

    Option         "metamodes" "CRT: 1440x900, DFP: 1600x900"
    Option         "TwinViewOrientation" "RightOf"

    The TwinViewOrientation option sets the position of your secondary monitor with respect to your primary one. You can use RightOf, LeftOf, Above, Below, and Clone

  • Finally, save the file and log out/log back in.

The following resources are a great source of information for xorg.conf and NVIDIA:

  • I've tried using sudo (and gksudo); doesn't help :-( Commented Sep 24, 2012 at 5:23
  • @machineghost, see my updated answer.
    – terdon
    Commented Sep 25, 2012 at 2:24
  • I tried using relative positioning in the nvidia-settings app, and it didn't help, but I'll try manually editing tonight and see how it goes; thanks! Commented Sep 25, 2012 at 15:27

I have this script that I made (I'm new to scripting so it might suck) for almost the same situation. This turns off my laptop screen and uses the two monitor screens I have. Commented out the parts I don't think you need. Please let me know if this works for you

# Monitor Config script


if $(xrandr --prop |grep -q "$EXTERN1 connected"); then
    #xrandr --output $INTERN1 --off
    xrandr --output $EXTERN2 --mode 1920x1080
    xrandr --output $EXTERN1 --mode 1920x1080
    xrandr --output $EXTERN1 --left-of $EXTERN2
    xrandr --output $EXTERN1 --primary

If that doesn't work, go to your terminal and type in xrandr to find out your monitor names. Change which one is left and right... yeah.

To run script on startup, Google that for your kernel... I got to get to class :\

Hope this helped!


It has been quite a while since this question has been asked and you may now be wondering why the heck "Save to X Configuration File" is giving you an error, even as root. The terminal mentioned something about not being able to run /usr/share/screen-resolution-extra/nvidia-polkit (It may be a different path in your distro. Check your terminal output). Adding execution permissions to that fixed the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .