How to setup 3 monitors in Ubuntu


I’m using 2 Nvidia 9600GT video cards to drive 3 22-inch Acer monitors.

Open a terminal window and type the following command:
sudo gedit /etc/X11/xorg.conf

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 260.19.06 (buildd@yellow) Mon Oct 4 15:59:51 UTC 2010

# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section “InputDevice”
# # generated from default
# Identifier “Keyboard0″
# Driver “kbd”
#EndSection
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section “InputDevice”
# # generated from default
# Identifier “Mouse0″
# Driver “mouse”
# Option “Protocol” “auto”
# Option “Device” “/dev/psaux”
# Option “Emulate3Buttons” “no”
# Option “ZAxisMapping” “4 5″
#EndSection

Section “ServerLayout”

# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice “Keyboard0″ “CoreKeyboard”
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice “Mouse0″ “CorePointer”
# Removed Option “Xinerama” “0″
Identifier “Default Layout”
Screen 0 “Screen0″ 0 0
Screen 1 “Screen1″ 3360 0
Screen 2 “Screen2″ 1680 0
InputDevice “Keyboard0″ “CoreKeyboard”
InputDevice “Mouse0″ “CorePointer”
Option “Xinerama” “1″
EndSection

Section “Module”
Load “glx”
EndSection

Section “ServerFlags”
Option “Xinerama” “0″
EndSection

Section “InputDevice”

# generated from default
Identifier “Keyboard0″
Driver “kbd”
EndSection

Section “InputDevice”

# generated from default
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/psaux”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5″
EndSection

Section “Monitor”
Identifier “Configured Monitor”
EndSection

Section “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Acer AL2223W”
HorizSync 31.0 – 81.0
VertRefresh 56.0 – 75.0
EndSection

Section “Monitor”
Identifier “Monitor1″
VendorName “Unknown”
ModelName “Acer AL2223W”
HorizSync 31.0 – 81.0
VertRefresh 56.0 – 75.0
EndSection

Section “Monitor”
Identifier “Monitor2″
VendorName “Unknown”
ModelName “Acer V223W”
HorizSync 30.0 – 83.0
VertRefresh 56.0 – 76.0
EndSection

Section “Device”
Identifier “Configured Video Device”
Driver “nvidia”
Option “NoLogo” “True”
EndSection

Section “Device”
Identifier “Device0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 9600 GT”
BusID “PCI:3:0:0″
Screen 0
EndSection

Section “Device”
Identifier “Device1″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 9600 GT”
BusID “PCI:2:0:0″
EndSection

Section “Device”
Identifier “Device2″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 9600 GT”
BusID “PCI:3:0:0″
Screen 1
EndSection

Section “Screen”
Identifier “Default Screen”
Device “Configured Video Device”
Monitor “Configured Monitor”
DefaultDepth 24
EndSection

Section “Screen”

# Removed Option “TwinView” “1″
# Removed Option “metamodes” “DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0″
Identifier “Screen0″
Device “Device0″
Monitor “Monitor0″
DefaultDepth 24
Option “TwinView” “0″
Option “metamodes” “DFP-0: nvidia-auto-select +0+0″
SubSection “Display”
Depth 24
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1″
Device “Device1″
Monitor “Monitor1″
DefaultDepth 24
Option “TwinView” “0″
Option “metamodes” “1680×1050 +0+0″
SubSection “Display”
Depth 24
EndSubSection
EndSection

Section “Screen”
Identifier “Screen2″
Device “Device2″
Monitor “Monitor2″
DefaultDepth 24
Option “TwinView” “0″
Option “metamodes” “DFP-1: nvidia-auto-select +0+0″
SubSection “Display”
Depth 24
EndSubSection
EndSection

4 Comments

  • June 14, 2011 - 9:34 pm | Permalink

    @AB

    I’m using the latest version of Ubuntu (11.04) 64bit. I haven’t tried to run compiz on it because i’m happy the way things are running for me now. (i have broken things in the past) I can drag a window from one screen to the next without any glitches… in fact it’s very smooth.

    I have 2 monitors connected to one card and the 3rd monitor connected to the 2nd card. (all DVI cables)

    I’m using the Nvidia driver with Xinerama enabled on all 3 monitors. One thing to keep in mind is that you want to use the same resolution on all 3. I hope this helps you.

  • AB
    June 13, 2011 - 10:34 am | Permalink

    - What Ubuntu version?
    - Do you get hardware acceleration / can you use desktop effects?
    - Is this as twinview + X setup? That is 2 monitors on same card in twinview and 3rd monitor running another X instance? Maybe both joined by Xinerama?

    I have been trying to setup linux (Ubuntu) with 3 monitors (2 vcards) and get good performance but had no success. I was not able to get the desktop effects running. Also any window that I move from one monitor to the other flickers when moving it and it is being displayed on both monitors. Overall performance of interacting with windows is a pain. Does your approach offer a solution or is the same story?

    Thank you

  • May 30, 2011 - 5:59 pm | Permalink

    @sducas I’m using 2 nvidia 9600GT cards. here is the output

    $ lspci
    00:00.0 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a2)
    00:01.0 ISA bridge: nVidia Corporation MCP78S [GeForce 8200] LPC Bridge (rev a2)
    00:01.1 SMBus: nVidia Corporation MCP78S [GeForce 8200] SMBus (rev a1)
    00:01.2 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a1)
    00:01.3 Co-processor: nVidia Corporation MCP78S [GeForce 8200] Co-Processor (rev a2)
    00:01.4 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a1)
    00:02.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
    00:02.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
    00:04.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
    00:04.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
    00:06.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] IDE (rev a1)
    00:07.0 Audio device: nVidia Corporation MCP72XE/MCP72P/MCP78U/MCP78S High Definition Audio (rev a1)
    00:08.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
    00:09.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] SATA Controller (non-AHCI mode) (rev a2)
    00:0a.0 Ethernet controller: nVidia Corporation MCP77 Ethernet (rev a2)
    00:10.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Express Bridge (rev a1)
    00:11.0 PCI bridge: nVidia Corporation Device 0779 (rev a1)
    00:13.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
    00:14.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
    00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
    00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
    00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
    00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
    00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
    02:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)
    03:00.0 VGA compatible controller: nVidia Corporation G94 [GeForce 9600 GT] (rev a1)

  • sducas
    May 30, 2011 - 11:00 am | Permalink

    Hello, could you paste your lspci output so I can find out my own BusID’s..

    THX!

  • Comments are closed.