3 monitors, 2 graphics cards, 1 X


 the goal

3 monitors

Extend an already existing dual-head setup using one dual-head graphics card and Xinerama, to using 3 monitors across 2 graphics cards still using Xinerama.

Xinerama is an X extension that allows multiple displays to be combined into one big screen/desktop.

 the hardware

 the software

A stock Fedora Core 2 with the Enlightenment Window Manager (DR16) and a current kernel.org 2.6 kernel.

 the sun gdm-17e10

This is a fixed frequency monitor and uses a combined sync signal rather than the separate vertical and horizontal sync signals a normal PC graphics card expects.

A small modification was needed to make this work. This site explains what to do.

In short, a small wire was soldered between two "pins" on a small PCB.


Plastic outer shell is removed.

Metal shielding removed.

PCB visible with auxilary port.

PCB view from above.

PCB removed with wire newly soldered.

 multiple graphics cards

When using more than one graphics card (or multi-head cards) one bit of information you will need is the bus id's for the cards.

This can be obtained from the lspci command: below is the relevant output on this system.

00:0a.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01)
01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 82)

The strings in bold are what you want. Generally speaking, strings beginning with 00: are PCI devices and 01: are AGP.

X wants these values in decimal, therefore 00:0a:0 will be entered as 0:10:0. If your hex isn't upto scratch, you can use this simple shell command to work it out.

$ echo $((0x0a))
10

In my BIOS the AGP card is set as the primary device, so when the machine boots only monitors attached to the AGP card show a display. Only when X kicks in does the PCI card initialise.

 xorg.conf

This is the main X.Org configuration file, it may be called XF86Config or XF86Config-4 if you are still running XFree86, or you haven't renamed the file.

On my system this file is located under the /etc/X11 directory.

You will need a "Monitor" section for each monitor.

Also you will need a "Device" section for each card/output.

Section "Device"
        Identifier  "G450"
        Driver      "mga"
        BusID       "PCI:1:0:0"
        Screen  0
EndSection

Section "Device"
        Identifier  "G450-1"
        Driver      "mga"
        BusID       "PCI:1:0:0"
        Screen  1
EndSection

Section "Device"
        Identifier      "9200SE"
        Driver          "radeon"
        BusID           "PCI:0:10:0"
EndSection

This is where the bus id's come in. As you can see even though the G450 is a single card, it has two outputs and thus needs two device sections, the key bit here is the Screen n lines. Also note that "PCI" is used in the BusID even for AGP devices.

A mistake I made at first and which stopped the radeon from working was that I put a Screen 2 line in the radeon device section.

However, you only put them in when using more than one output of a multi-head card. If I was going to use the other output on the radeon with a fourth monitor I would add another radeon device section and put in Screen 0 and Screen 1 lines like the G450.

 monitor layout

Here is the ServerLayout section I'm using which gives me a line of monitors from left to right.

Section "ServerLayout"
        Identifier "XFree86 Configured"
        Screen      0  "Screen0" 0 0
        Screen          "Screen 1" RightOf "Screen 2"
        Screen          "Screen 2" RightOf "Screen 0"
        InputDevice     "Mouse0" "CorePointer"
        InputDevice     "Keyboard0" "CoreKeyboard"
EndSection

The "Screen n"'s refer to the three "Screen" sections, where each one links one "Device" section with one "Monitor" section.

 Xinerama

To actually enable Xinerama, use the following:

Section "ServerFlags"
        Option "Xinerama"
EndSection

Here is the full xorg.conf for this setup.

 limitations

The main limitations with this setup are:

The "No DRI" is a biggie if you wish to play something like Quake III Arena. This can be worked around by starting up another X server poiting to a different xorg.conf which is DRI enabled. Thus you can start up a DRI enabled X session parallel to your Xinerama setup so as not to disturb it. You can then easily switch between the two running X sessions.

 end titles

by:    Andrew Clayton <andrew@digital-domain.net>
when:  31st July 2004
with:  vim