Archive for September, 2010

4 screens with ATI Radeon on Ubuntu 10.04

Monday, September 27th, 2010

I now have a desktop PC with two ATI Radeon 4670 video cards (both dual-port output), driving 4 physical screens under Ubuntu 10.04 LTS.

Sadly, the Ubuntu standard tools only detect one video card (despite the CrossFireX connection between them), so all I can have is dual screen.

However, this can be fixed by just manually specifying the X.org configuration — and given that X.org has very well developed discovery tools these days I don’t have to get in to too much detail.

There is a very capable Open Source driver for the ATI Radeon cards, known as “radeon“. This lets me set up an X “Screen” for each separate output of the cards using the “ZaphodHeads” option — the CrossFireX connection means that although there are two different PCI addresses for the cards, the DVI ports are numbered as if there were only one. Then I use the Xinerama extension to glue the four screens together into one big desktop.

So, in my X.org config, I describe the 4 “Devices”, add 4 “Screens” by connecting each one to a Device, and finally provide a “ServerLayout” to place them in order (this is now dependent on which physical monitors are physically cabled to which output port). The relationship between DVI port numbers, physical output ports and PCI Bus IDs was discovered by experimentation, and documented by sticky labels on the back of the PC.

/etc/X11/xorg.conf

Section "ServerLayout"
    Identifier  "SL0"
    Option      "Xinerama" "on"
    Screen      "S0" 0 0
    Screen      "S1" RightOf "S0"
    Screen      "S2" LeftOf "S0"
    Screen      "S3" LeftOf "S2"
EndSection

Section "Device"
    # Radeon DVI-0 is top left (viewed from front of case, looking back)
    Identifier  "D0"
    Driver      "radeon"
    BusID       "PCI:9:0:0"
    Option      "ZaphodHeads" "DVI-0"
    Screen      0
EndSection
Section "Device"
    # Radeon DVI-1 is top right
    Identifier  "D1"
    Driver      "radeon"
    BusID       "PCI:9:0:0"
    Option      "ZaphodHeads" "DVI-1"
    Screen      1
EndSection
Section "Device"
    # Radeon DVI-2 is bottom left
    Identifier  "D2"
    Driver      "radeon"
    BusID       "PCI:8:0:0"
    Option      "ZaphodHeads" "DVI-2"
    Screen      0
EndSection
Section "Device"
    # Radeon DVI-3 is bottom right
    Identifier  "D3"
    Driver      "radeon"
    BusID       "PCI:8:0:0"
    Option      "ZaphodHeads" "DVI-3"
    Screen      1
EndSection

Section "Screen"
    Identifier  "S0"
    Device      "D0"
EndSection
Section "Screen"
    Identifier  "S1"
    Device      "D1"
EndSection
Section "Screen"
    Identifier  "S2"
    Device      "D2"
EndSection
Section "Screen"
    Identifier  "S3"
    Device      "D3"
EndSection

Thanks are due to Daniel Reurich of Centurion Computer Technology, who chose the hardware based on my loose spec of “open source friendly, 4 screens for 2D desktop work”, and crafted the first xorg.conf to prove that everything would work.