Search:  
Gentoo Wiki

Triple_Monitors

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

Introduction

This article is about how to configure X with 2 graphics adapters: one Nvidia 5600 and one Voodoo 3. Two monitors are connected to the Nvidia card and one is connected to the Voodoo. This setup is using Xinerama.

Dual Monitors

Take a look at the Dual Monitors HOWTO if you want to setup two monitors under X.

X Setup

This shows the relevant parts of the X config file /etc/X11/XF86Config (or /etc/X11/xorg.conf)

File: /etc/X11/xorg.conf
Section "Module"

# This loads the DBE extension module.

    Load        "dbe"   # Double buffer extension

# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection

# This loads the Type1 and FreeType font modules
    Load        "type1"
    Load        "speedo"
    Load        "freetype"
#    Load        "xtt"

# This loads the GLX module
    Load       "glx"
# This loads the DRI module
#    Load       "dri"

EndSection

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

    RgbPath "/usr/X11R6/lib/X11/rgb"
    FontPath   "/usr/share/fonts/misc/"
    FontPath   "/usr/share/fonts/TTF/"
    FontPath   "/usr/share/fonts/Speedo/"
    FontPath   "/usr/share/fonts/Type1/"
    FontPath   "/usr/share/fonts/CID/"
    FontPath   "/usr/share/fonts/75dpi/"
    FontPath   "/usr/share/fonts/100dpi/"
    FontPath   "/usr/share/fonts/local/"
#    FontPath   "/usr/share/fonts/TrueType/"
#    FontPath   "/usr/share/fonts/freefont/"

# The module search path.  The default path is shown here.

#    ModulePath "/usr/X11R6/lib/modules"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

 Option "Xinerama" "on"

EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************

Section "InputDevice"

    Identifier "Keyboard1"
    Driver "Keyboard"
    Option "AutoRepeat" "500 30"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc104"
    Option "XkbLayout" "us"

EndSection


# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol"    "Auto"
    Option "Device"      "/dev/mouse"
    Option "ZAxisMapping" "4 5"


EndSection

# **********************************************************************
# Monitor section
# **********************************************************************


Section "Monitor"

    Identifier  "My Monitor"
    HorizSync   31.5 - 64.3
    VertRefresh 50-100

EndSection


# **********************************************************************
# Graphics device section
# **********************************************************************

# Standard VGA Device:

Section "Device"
    Identifier "Standard VGA"
    VendorName "Unknown"
    BoardName "Unknown"
    Driver     "vga"

EndSection

Section "Device"
    Identifier  "NVIDIA 5600-0"
    Driver      "nvidia"
    VideoRam    131072
    Option      "ConnectedMonitor" "crt,crt"
    BusID       "PCI:3:0:0"
#    Screen      1   
#    Option "RightOf"
    Option "RenderAccel" "On"
    Option "NvAgp" "1" 
    Option "IgnoreDisplayDevices" "DFP, TV"
    Option "ConnectedMonitor" "CRT"
    #Option "NoLogo" "On"
EndSection

Section "Device"
    Identifier  "NVIDIA 5600-1"
    Driver      "nvidia"
    VideoRam    131072
    Option      "ConnectedMonitor" "crt,crt"
    Screen      1   
    BusID       "PCI:3:0:0"
    Option "IgnoreDisplayDevices" "DFP, TV"
    Option "ConnectedMonitor" "CRT"
    Option "NoLogo" "On"
EndSection

Section "Device"
    Identifier  "Voodoo3 (generic)"
    Driver      "tdfx"
    VideoRam    65536
    BusID "PCI:1:9:0"
EndSection

Section "ServerLayout"
 Identifier     "X.org Configured"
 Screen        "Screen2" 0 0
 Screen        "Screen0" LeftOf "Screen1"
 Screen        "Screen1" LeftOf "Screen2"
 InputDevice    "Mouse1" "CorePointer"
 InputDevice    "Keyboard1" "CoreKeyboard"
EndSection


# **********************************************************************
# Screen sections
# **********************************************************************


Section "Screen"
    Identifier  "Screen0"
    Device      "Voodoo3 (generic)"
    Monitor     "My Monitor"
    DefaultDepth 24

    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection



Section "Screen"
    Identifier  "Screen1"
    Device      "NVIDIA 5600-0"
    Monitor     "My Monitor"
    DefaultDepth 24

    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier  "Screen2"
    Device      "NVIDIA 5600-1"
    Monitor     "My Monitor"
    DefaultDepth 24

    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

X Setup for Matrox G400 AGP Dualhead and Matrox G400 PCI

This shows the relevant parts of the X config file /etc/X11/xorg.conf)

File: /etc/X11/xorg.conf
#this is for x.org 6.8.2, 
#copy the Matrox 4.1 beta driver mga_drv.o and mga_hal_drv.o to 
#/usr/X11R6/lib/modules/drivers/ directory.

Section "ServerLayout"
    Identifier "X.org Configured"
    Screen "Screen0" LeftOf "Screen1"
    Screen "Screen1" LeftOf "Screen2"
    Screen "Screen2" 0 0
 
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection
 
Section "ServerFlags"
    #Option "Xinerama"
EndSection
 
Section "Files"
    RgbPath "/usr/lib/X11/rgb"
    ModulePath "/usr/lib/modules"
    FontPath "/usr/share/fonts/misc/"
    FontPath "/usr/share/fonts/TTF/"
    FontPath "/usr/share/fonts/Type1/"
    FontPath "/usr/share/fonts/CID/"
    FontPath "/usr/share/fonts/75dpi/"
    FontPath "/usr/share/fonts/100dpi/"
EndSection
 
Section "Module"
    Load "glx"
    #Load "extmod"
    SubSection "extmod"
        Option "omit xfree86-dga"
    EndSubSection
    Load "dbe"
    Load "freetype"
    Load "type1"
    Load "DRI"
EndSection
 
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
EndSection
 
Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "IMPS/2"
    Option "Device" "/dev/psaux"
EndSection
 
Section "Monitor"
    Identifier "Monitor0"
    HorizSync 30.0 - 60.0
    VertRefresh 50.0 - 70.0
    Option "DPMS"
EndSection
 
Section "Monitor"
    Identifier "Monitor1"
    HorizSync 30.0 - 60.0
    VertRefresh 50.0 - 70.0
    Option "DPMS"
EndSection
 
Section "Monitor"
    Identifier "Monitor2"
    HorizSync 30.0 - 60.0
    VertRefresh 50.0 - 70.0
    Option "DPMS"
EndSection
 
Section "Device"
        Identifier "Standard VGA"
        VendorName "Unknown"
        BoardName "Unknown"
        Driver "VGA"
EndSection
 
Section "Device"
    Identifier "Card0"
    Driver "mga"
    BusID "PCI:3:0:0"
EndSection
 
Section "Device"
    Identifier "Card1"
    Driver "mga"
    BusID "PCI:1:0:0"
    Screen 1
    VideoRam 32768
    #Option "BackingStore" "true"
    #this is the key for Matrox G400 dualhead to work correctly.
    Option "MGASDRAM"
EndSection
 
Section "Device"
    Identifier "Card2"
    Driver "mga"
    BusID "PCI:1:0:0"
    VideoRam 32768
    #Screen 0
    #Option "hw cursor" "off"
    Option "MGASDRAM"
EndSection
 
Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    DefaultDepth        24
 
    SubSection "Display"
        Depth 16
        #Modes "1024x768" "800x600" "640x480"
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
 
    SubSection "Display"
        Depth 24
        #Modes "1024x768" "800x600" "640x480"
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection
 
Section "Screen"
    Identifier "Screen1"
    Device "Card1"
    Monitor "Monitor1"
    #Option "InitPrimary" "true"
    #Option "NoInt10" "true"
    DefaultDepth        24
    SubSection "Display"
        Depth 16
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
 
    SubSection "Display"
        Depth 24
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection
 
Section "Screen"
    Identifier "Screen2"
    Device "Card2"
    Monitor "Monitor2"
    DefaultDepth        24
 
    SubSection "Display"
        Depth 16
        #Modes "1024x768" "800x600" "640x480"
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
 
    SubSection "Display"
        Depth 24
        #Modes "1024x768" "800x600" "640x480"
        Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection


Nvidia Quadro NVS 440

This card rocks triple monitors easily. If you've got the power supply for it (350watts min) definitely the way to go.

If I don't use xinerama and enable twinview instead I either get three separate X windows (no dragging windows across), or two separate X windows: one across two screens, one dedicated to the third screen. With two separate X's nvidia's twinview is enabled and it usually does the wrong thing when maximizing windows i.e. it spreads them across the entire two monitors instead of limiting the window to the monitor you max'ed it on.

Anyway here's my xorg.conf with that card to give 60" xinerama.

Section "Files"

        RgbPath      "/usr/X11R6/lib/X11/rgb"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/75dpi::unscaled"
        FontPath     "/usr/share/fonts/100dpi::unscaled"
        FontPath     "/usr/share/fonts/local/"
        FontPath     "/usr/share/fonts/corefonts"
        FontPath     "/usr/share/fonts/freefont"
        FontPath     "/usr/share/fonts/sharefonts"
        FontPath     "/usr/share/fonts/unifont"
        FontPath     "/usr/share/fonts/freefont"
        FontPath     "/usr/share/fonts/artwiz"
        FontPath     "/usr/share/fonts/terminus"
        FontPath     "/usr/share/fonts/ttf-bitstream-vera"
        
EndSection

Section "Module"
        SubSection "extmod"
        EndSubSection
        Load  "type1"
        Load  "freetype"
        Load  "glx"
        load "freetype"
        
EndSection


Section "InputDevice"
        Identifier  "Keyboard1"
        Driver      "kbd"
        Option      "AutoRepeat" "500 30"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "pc101"
        Option      "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Mouse1"
        Driver      "mouse"
        Option      "Protocol" "Auto"
        Option      "Device" "/dev/input/mouse0"
        Option      "Emulate3Buttons"
        Option      "ZAxisMapping" "4 5"
EndSection


Section "Monitor"
        Identifier   "Monitor0"
        HorizSync    31.0-81.0
        VertRefresh  56.0-76.0
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        HorizSync    31.0-81.0
        VertRefresh  56.0-76.0
EndSection

Section "Monitor"
        Identifier   "Monitor2"
        HorizSync    31.0-81.0
        VertRefresh  56.0-76.0
        
EndSection



Section "Device"
        Identifier      "card0"
        Driver          "nvidia"
        BusID           "PCI:3:0:0"
        Screen          0
EndSection

Section "Device"
        Identifier      "card1"
        Driver          "nvidia"
        BusID           "PCI:3:0:0"
        Screen          1
EndSection


Section "Device"
        Identifier      "card2"
        Driver          "nvidia"
        BusID           "PCI:4:0:0"
        Screen          0
EndSection


Section "Screen" 
        Identifier      "Screen0"
        Device          "card0"
        Monitor         "Monitor0"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "card1"
        Monitor    "Monitor1"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes           "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen2"
        Device     "card2"
        Monitor    "Monitor2"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes           "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection


Section "ServerLayout"
 Identifier     "ThreeScreens"
  Screen        0  "Screen0" 0 0
Screen         "Screen1" RightOf "Screen0"
Screen         "Screen2" RightOf "Screen1"
 InputDevice    "Mouse1" "CorePointer"
 InputDevice    "Keyboard1" "CoreKeyboard"
EndSection


Section "ServerFlags"
        Option  "Xinerama" "true"
EndSection

Section "Extensions"
EndSection

Section "dri"
        Group        "video"
        Mode         0666
EndSection


FireMV 2400

For what it's worth (3 weeks of headaches maybe) here's how I got 3 monitors working on the quad-capable ati firemv2400 card: (1/2008 NOTE: this card has been disowned by AMD/ATI when it comes to linux support. While this will work, I'd now recommend you use the nvidia nvs440 card instead. See that section for details.)

If you're attention deficit here's the short list:

xorg-x11 opengl, xinerama enabled, proprietary ati drivers version 8.26.18, "UseInternalAGPGART" "false", "UseFastTLS" "0"

I wish folks would date these entries for posterity so here's my setup

Date: 9/12/06

Kernel: 2.6.17-gentoo-r7

eselect opengl list
Available OpenGL implementations:
  [1]   ati
  [2]   nvidia
  [3]   xorg-x11 *

lspci | grep ATI
05:01.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [FireGL 9000] (rev 02)
05:01.1 Display controller: ATI Technologies Inc Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary] (rev 02)
05:05.0 Display controller: ATI Technologies Inc Radeon R250 Lf [FireGL 9000] (rev 02)
05:05.1 Display controller: ATI Technologies Inc Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary] (rev 02)

equery list ati-drivers
[ Searching for package 'ati-drivers' in all categories among: ]
 * installed packages
[I--] [ ~] x11-drivers/ati-drivers-8.26.18 (0)

Note that I could only get this to work using this specific and old (as of this date) version of the proprietary ati drivers.

Interesting bits of my xorg.conf file:

Section "Module"
        Load  "dbe"     # Double buffer extension
        SubSection "extmod"
                Option      "omit xfree86-dga"   # don't initialise the DGA extension
        EndSubSection
        Load  "type1"
        #Load        "speedo"
        Load  "freetype"
        #Load        "xtt"
        Load  "dri"
        Load  "glx"
EndSection

Section "Device"
        Identifier  "card0"
        Driver      "fglrx"
        Option      "UseInternalAGPGART" "false"
        Option      "UseFastTLS" "0"    
        BusID       "PCI:5:1:0"
        Screen      0
EndSection

Section "Device"
        Identifier  "card1"
        Driver      "fglrx"
        Option      "UseInternalAGPGART" "false"
        Option      "UseFastTLS" "0"
        BusID       "PCI:5:1:0" 
        Screen      1
EndSection

Section "Device"
        Identifier  "card2"
        Driver      "fglrx"
        Option      "UseInternalAGPGART" "false"
        Option      "UseFastTLS" "0"
        BusID       "PCI:5:5:0" 
EndSection


Section "Screen" 
        Identifier      "Screen0"
        Device          "card2"
        Monitor         "Monitor0"
        DefaultDepth    24
        #Option "backingstore" "true"
        SubSection "Display"
                ViewPort        0 0
                Depth           24
                Modes           "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "card0"
        Monitor    "Monitor1"
        DefaultDepth     24
        #Option "backingstore" "true"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen2"
        Device     "card1"
        Monitor    "Monitor2"
        DefaultDepth     24
        #Option "backingstore" "true"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1600x1200" "1280x1024" "1024x768"
        EndSubSection
EndSection


Section "ServerLayout"
 Identifier     "ThreeScreens"
 Screen        0 "Screen0" 0 0
 Screen        1 "Screen1" RightOf "Screen0"
 Screen        2 "Screen2" RightOf "Screen1"
 InputDevice    "Mouse1" "CorePointer"
 InputDevice    "Keyboard1" "CoreKeyboard"
EndSection


Section "ServerFlags"
        Option  "Xinerama" "true"
EndSection

Section "dri"
        Group        "video"
        Mode         0666
EndSection

This yields relatively slow glxgears of 200 or so frames per second. The upside is 60" of desktop space ;-)

Hope that helps someone! Add/update a section if you've gotten it to work some other way.

References

Retrieved from "http://www.gentoo-wiki.info/Triple_Monitors"

Last modified: Fri, 05 Sep 2008 07:47:00 +0000 Hits: 39,013