November 3, 2005
Tri-head display on Linux (1x AGP dual head, 1x PCI)
Scenario:
So you got 2 VGA cards (1 AGP dual head, 1 PCI) hooked up at 3 monitors and want to have a tri-head display on your Linux machine using the Xinerama technology that allows you to extend your desktop to the 3 monitors.

first thing to do is to check what are the bus id (pci address) of each card:
[root@exodus:~]$ lspci
0000:01:0c.0 VGA compatible controller: ATI Technologies Inc 3D Rage II+ 215GTB [Mach64 GTB] (rev 9a)
0000:02:00.0 VGA compatible controller: Matrox Graphics, Inc. G400/G450 (rev 03)
We are intrested in the numbers 01:0c.0 and 02:00.0 which can be translated to PCI:1:12:0 and PCI:2:0:0
Now make sure that the drivers for both VGA Cards is installed in your /usr/X11R6/lib/modules/drivers/, as far as the Matrox G400 is concerned, to be able dual display you should download the latest version of the drivers from http://www.matrox.com and follow the instructions.
now its time to open your xorg.conf or XFree86.conf with your favorite editor and include the following:
## Matrox AGP Card
## Note that for dual head cards its essential to include "Screen 0" and "Screen 1" inside the "Device" section
Section "Device"
Identifier "matrox0" ## first head
Driver "mga"
BusID "PCI:2:0:0"
Screen 0
EndSection
Section "Device"
Identifier "matrox1" ## second head
Driver "mga"
BusID "PCI:2:0:0"
Screen 1
EndSection
## ATI PCI Card
## No need for "Screen x" here because that card only have 1 head
Section "Device"
Identifier "ati"
Driver "ati"
BusID "PCI:1:12:0"
EndSection
## Monitor
## Set the sync values of each of your screens, for my case all my monitors are new 17" so i just set one Monitor section.
Section "Monitor"
Identifier "monitor"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection
## Screen combination
## This should be straight forward, post a comment if you need some help
Section "Screen"
Identifier "screen0"
Device "matrox0"
Monitor "monitor"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1152x864"
EndSubSection
EndSection
Section "Screen"
Identifier "screen1"
Device "matrox1"
Monitor "monitor"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1152x864"
EndSubSection
EndSection
Section "Screen"
Identifier "screen2"
Device "ati"
Monitor "monitor"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1152x864"
EndSubSection
EndSection
## Server Layout
## This should be straight forward as well, You can use LeftOf or RightOf for most cases, don't forget to add:
## Option "xinerama" "on" inside the "ServerLayout" section to enable tri-head display and not tri-replication.
Section "ServerLayout"
Identifier "trihead"
Screen 0 "screen0" 0 0
Screen "screen1" RightOf "screen0"
Screen "screen2" RightOf "screen1"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
Option "xinerama" "on"
EndSection
Filed by haytham at 3:53 pm under Linux HOWTOs / Tutorials