Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
    EndSubSection
EndSection

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.

share|improve this question
add comment

2 Answers

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

enter image description here


UPDATE:

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:

share|improve this answer
    
I've tried using sudo (and gksudo); doesn't help :-( –  machineghost Sep 24 '12 at 5:23
    
@machineghost, see my updated answer. –  terdon Sep 25 '12 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! –  machineghost Sep 25 '12 at 15:27
add comment

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

#!/bin/bash
# Monitor Config script

#INTERN1=LVDS1
EXTERN1=VGA1
EXTERN2=HDMI1

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
fi

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!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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