NVIDIA multiple monitors on linux

The NVIDIA drivers on linux come with a nice utility: nvidia-settings
Unfortunately when setting up multiple monitors it has no easy way of saving the config.
You can save it to an xorg file, but the file created is much more than is required to set up multimonitors.

The minimal xorg file I needed was (the entire file):
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 6600 GT"
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "TwinViewOrientation" "LeftOf"

EndSection

I saved this file to (may be distro specific – I use archLinux)
/etc/X11/xorg.conf.d/10-monitors.conf

The only lines which may need changing are
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "TwinViewOrientation" "LeftOf"

The first one is setting the main X monitor (the monitor that gdm’s login and gnome shells header bar appear on). You can find the appropriate value by doing an xorg export from nvidia-settings
The second line is not intuitive – it says which direction the ‘secondary’ monitor is from the ‘primary’. This does not get the primary/secondary monitors from the TwinViewXineramaInfoOrder line unfortunately, but rather the ‘primary’ monitor is the screen used when there is no xorg config.

Options are
"RightOf" (the default)
"LeftOf"
"Above"
"Below"
"Clone"

This page from NVIDIA was quite helpful in setting this up.

Leave a Reply

You\'re not a robot are you? *