Dual Head Single Video Card Setup

30 November -0001
August 18, 2006

Recently I managed to get my workstation to function using two monitors, a dongle and a single video card. It was quite a trick to get things functioning.

First allow me to detail my setup. I am using two monitors, one is a Dell 1800FP and the other is a Dell 2100FP. The computer has an ATI Radeon x300 video card with a dongle that splits the outbound DVI into a DVI And Analog (female) port. These can then be plugged into the monitor cables as normal.

I'm using Mandriva 2006, but this setup probably applies to most Linux distros. I did find that downloading and installing ATI's drivers worked a lot better than the drivers provided in my distro. I've had luck with them using a traditional two card, two monitor setup, but for the dual monitor, single card they didn't work.

In exploring the various links online I quickly learned that the way to enable dual monitor varies wildly based on your card manufacturer. Each brand has it's own driver that functions differently. I used to think all you needed was Xinerama, but I've since discovered that card manufacturer each use their own method to provide multiple desktops. I'm using ATI so I had to use the 'Big Desktop' feature (specified in the 'DesktopSetup' Option).

No matter what kind of card you have, chances are you're going to have to get familiar with your xorg.conf file. This is just a text configuration file, usually located in the /etc/X11 directory. Make sure to make a backup of any working versions of this file you have before you start (and along the way to track your progress). Another tip is to set your machine to boot to runlevel 3 (non-graphical interface) so you can log in, monkey with your xorg.conf, startx, and if it doesn't work you can dump back to a shell (this avoids multiple reboots).

The crux of how this file generates your display starts with your specifications in the ServerLayout section. This should point to the screens you want to display. These screens will then be linked into the Screen section(s) in your config file. Each Screen section should include a monitor specification and a device specification that correspond to a Monitor and Device section. If you ever get any 'screen not found' errors check spellings and capitalization on your Identifier strings (for instance, if in a Screen you specify Device "device1" but in your Device section you've listed Identifier "Device1" the two won't match up and X will throw an error.

I've provided a working copy of my xorg.conf file here (with comments, read them). This version works perfectly well, the only problem I'm having now is getting the two monitors to display separate resolutions (with this setup they both display at 1280x1024).

# File generated by me.

# **********************************************************************
# Refer to the XF86Config man page for details about the format of
# this file.
# **********************************************************************

Section "Files"
    # Multiple FontPath entries are allowed (they are concatenated together)
    # By default, Mandrake 6.0 and later now use a font server independent of
    # the X server to render fonts.
    FontPath "unix/:-1"
EndSection

Section "ServerFlags"
    #DontZap # disable  (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable / (resolution switching)
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "type1"
    Load "freetype"
    Load "glx" # 3D layer
EndSection

Section "InputDevice"
    Identifier "Keyboard1"
    Driver "keyboard"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "en_US"
    Option "XkbOptions" "compose:rwin"
EndSection

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "ExplorerPS/2"
    Option "Device" "/dev/mouse"
    Option "ZAxisMapping" "6 7"
EndSection

Section "Monitor"
    Identifier "monitor2"
    VendorName "Dell"
    ModelName "Dell 1800FP (Analog)"
    HorizSync 30.0-80.0
    VertRefresh 56.0-85.0

    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630

    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Dell"
    ModelName "Dell 2001FP (Digital)"
    HorizSync 31.0-80.0
    VertRefresh 56.0-76.0

    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630

    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection
#note that even though there is only one device it actually registers in two locations

Section "Device"
    Identifier "device1"

    # fglrx is the ATI Driver downloaded from their site
    Driver "fglrx"
    BusID "PCI:1:0:0"
    Option "UseFBDev" "true"
    Option "DesktopSetup" "0x00000201"
    Option "Mode2" "1280x1024"
EndSection

Section "Device"
    Identifier "device2"
    Driver "fglrx"
    BusID "PCI:1:0:1"
    Option "UseFBDev" "true"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
   Subsection "Display"
         Depth 24
         Modes "1600x1200"
    EndSubsection
EndSection

Section "Screen"
    Identifier "screen2"
    Device "device2"
    Monitor "monitor2"
    DefaultColorDepth 24

    Subsection "Display"
        Depth 24
        Modes "1280x1024"
        Virtual 1280 1024
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "BigDesktopLayout"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "Mouse1" "CorePointer"
    Screen "screen2"  0 0
    Screen "screen1" LeftOf "screen2"
EndSection

Section "DRI"
    Mode 0666
EndSection