6 Monitors as one, at Kim Øyhus

PC

The 6 head PC.

WindowsMe

It was quite difficult to get all 6 monitors working well with the Matrox software for WindowsME. I will here describe the techniques I used to make it work. If the matrox control program had worked properly, this would not have been as complicated as you can se it was.

1. Monitors are expensive, but not old mono-sync monitors, so thats what I use. Mostly Hewlett Packard A1097C and similar.

2. The Matrox software do not have preconfigured screen modes for these monitors, so I had to define them myself.

3. It is impossible to adjust a screen mode on a screen that rolls and flickers because of wrong screen mode. One way to solve this is to adjust the screen mode on another multisync monitor, and switch cables to test if it works on the monosync. Another way to solve this, is to use the Matrox program to show the controls for screen adjustments on another monitor, or adjust the screen mode without adjusting any screen, but this only works some times.

4. Some of the better old monitors can accept standard screen modes, such as the Vesa 1280x1024 75 Hz. I use this when possible.

5. The primary monitor is a multisync. This monitor is always available because of that, so I use this screen to adjust the other unavailable screens. The chances of getting an usable multisync monitor when finding 6 cheap monitors, is quite high.

6. When one monitor is properly adjusted with a proper screen mode, that screen mode can be saved, and loaded onto another monitor. This is nice when the screen modes of that monitor can't be adjusted, but this only works some times.

7. The monitors on the top row use 1280x1024 while those on the bottom row use 1280x960. By sorting the monitors to what suits them best, more monitors can be used. It also helps to sort which output each monitor is connected to.

8. I opened some monitors to get to the adjustments inside, to adjust the monitor to the available screen mode.

As you can understand, the only reason I got this to work at all, was to use all of the above tricks. It was not easy.

Linux

Linux and XFree86 are more flexible in their configuration abilities, but unfortunately not as well tested for multiple monitor configurations. And that is why I write this web page, to help other people trying to do the same. Thanks to several people on the XPerts mailing list. I could not have succeeded without your help.

Startup

"startx" is not able to start up the 6 screens on itself, so a trick is needed:
su
X -configure
exit
startx
The idea here is to initialise the cards by using the autoconfigure option in XFree86 v.4.2. That only takes 10 seconds. The "startx" takes some minutes.

Previously the startup process was much more messy and buggy, with 2 boots and 4 startx every time. It were thus:

1. "startx"
Machine hangs, and must be rebooted with "ctrl+Alt+Del". Error: "(EE) MGA(3): No valid modes found"

2. "startx" X stops.
Error: "(EE) MGA(3): MGAValidateMode from HALlib found the mode to be invalid. Error: b1901020 Fatal server error: AddScreen/ScreenInit failed for driver 3"

3. "startx" X stops.
Error: "(WW) MGA(5): Failed to set up write-combining range (0xdb800000,0x800000) (EE) MGA(5): MGAValidateMode from HALlib found the mode to be invalid. Error: b1901020 Fatal server error: AddScreen/ScreenInit failed for driver 5"

4. "startx"
And X finally starts, and works as it should, stable.

OpenGL & GLX

The hardware accelerated OpenGL implementation of GLX is nice, but works only in 1 screen, which is the primary monitor. So, I had to go for the slower software variant of OpenGL found in Mesa, to cover all 6 screens.

In order for Mesa to properly replace GLX, it has to be configured like this before it is compiled:

./configure --prefix=/usr
Another problem, is that Mesa has a fixed viewport of 2048x2048, which is too small for my almost 4000x2000 screen. To fix this, the constant MAX_WIDTH in Mesa/src/config.h was changed from 2048 to 4096 before compilation. This worked without any problems.

Qt

In order to compile Qt with support for OpenGL, it must be configured like this before compilation:
./configure -thread
This also lets Qt do threading, which is especially nice when having several processors, which the machine is going to have later.

XF86Config

This is the /etc/XF86Config file, defining the whole system. Note that I have several specially defined modelines.

# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************

Section "Files"
	RgbPath      "/usr/X11R6/lib/X11/rgb"
	ModulePath   "/usr/X11R6/lib/modules"
	FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
	FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"
	FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
	FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
	FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
	FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection


Section "ServerFlags"
    AllowMouseOpenFail
EndSection


Section "InputDevice"
    Identifier "Keyboard1"
    Driver      "Keyboard"
    Option "AutoRepeat"  "250 30"

    Option "XkbRules" "xfree86"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "no"
EndSection


Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "PS/2"
    Option "Device"      "/dev/psaux"
    Option "Emulate3Buttons"
    Option "Emulate3Timeout"    "50"
EndSection



Section "Module"
    Load        "glx"

    SubSection  "extmod"
        Option "omit xfree86-dga"
    EndSubSection

    Load        "type1"
    Load        "freetype"
EndSection


Section "Monitor"
    Identifier "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
    VendorName "Unknown"
    ModelName  "Unknown"
    HorizSync  31.5-87.0
    VertRefresh 74-76
EndSection


Section "Monitor"
    Identifier "hp_A2094A"
    VendorName "Hewlett Packard"
    ModelName  "A2094A"
    HorizSync   73.0-75.0
    VertRefresh 70-72
    Modeline   "1280x1024" 123  1280 1336 1472 1648  1024 1024 1027 1051
EndSection


Section "Monitor"
    Identifier  "hp_A1097C"
    VendorName  "Hewlett Packard"
    ModelName   "A1097C"
    HorizSync    31.5 - 87.0
    VertRefresh  50.0 - 90.0
    ModeLine     "hurk" 122  1280 1360 1504 1664 960  960  963 1023
    ModeLine     "hp1280x960" 122  1280 1360 1432 1664  960  960  963 1029
EndSection


Section "Monitor"
    Identifier  "qhp_A1097C"
    VendorName  "Hewlett Packard"
    ModelName   "A1097C"
    HorizSync    31.5 - 87.0
    VertRefresh  50.0 - 90.0
    ModeLine     "hurk" 122  1280 1360 1504 1664 960  960  963 1023
    ModeLine     "hp1280x960" 121.570  1280 1360 1432 1664  960  960  963 1029
EndSection


Section "Device"
    Identifier "Generic VGA"
    Driver     "vga"
EndSection


Section "Device"
    Identifier  "G450_1"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:1:0:0"
    Screen 0
EndSection


Section "Device"
    Identifier  "G450_2"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:1:0:0"
    Screen 1
EndSection


Section "Device"
    Identifier  "G450_3"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:2:0:0"
    Screen 0
EndSection


Section "Device"
    Identifier  "G450_4"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:2:0:0"
    Screen 1
EndSection


Section "Device"
    Identifier  "G450_5"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:3:0:0"
    Screen 0
EndSection


Section "Device"
    Identifier  "G450_6"
    VendorName  ""
    BoardName   ""
    Driver      "mga"
    Option      "MGASDRAM" "Yes"
    BusID       "PCI:3:0:0"
    Screen 1
EndSection


Section "Screen"
    Identifier "screen1"
    Device      "G450_1"
#    Monitor     "hp_A2094A"
    Monitor     "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        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
    Subsection "Display"
	Depth       32
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier "screen2"
    Device      "G450_2"
    Monitor     "hp_A2094A"
#    Monitor     "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        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
    Subsection "Display"
        Depth       32
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier "screen3"
    Device      "G450_3"
    Monitor     "hp_A1097C"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
	Depth       32
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier "screen4"
    Device      "G450_4"
#    Monitor     "hp_A2094A"
    Monitor     "Generic|High Frequency SVGA, 1024x768 at 70 Hz"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
        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
    Subsection "Display"
        Depth       32
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier "screen5"
    Device      "G450_5"
    Monitor     "qhp_A1097C"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
	Depth       32
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
EndSection


Section "Screen"
    Identifier "screen6"
    Device      "G450_6"
    Monitor     "hp_A1097C"
#    Monitor     "qhp_A1097C"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       15
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
	Depth       32
#        Modes       "hurk"
        Modes       "hp1280x960"
        ViewPort    0 0
    EndSubsection
EndSection



# 6 5 3
# 2 1 4

Section "ServerLayout"
    Identifier "layout1"
    Screen     "screen1"
    Screen     "screen2" LeftOf  "screen1"
    Screen     "screen3" Above   "screen4"
    Screen     "screen4" RightOf "screen1"
    Screen     "screen5" Above   "screen1"
    Screen     "screen6" Above   "screen2"

    Option     "Xinerama"

    InputDevice "Mouse1" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"
EndSection