Wednesday, July 27, 2011

Slackware, xorg: Three montors with radeon dual-head and displaylink

The xorg.conf changes for the displaylink driver and a radeon video card. In my setup I had a old HP zd8000 laptop with a X600 card, and was able to use this configuration for a while until the laptop finally bit the dust (probably 7 years old, so it was "time" probably). Since the hardware where this configuration worked has died, this is sort of a postmortem review of what it took to get it running. Much of the information to get things working was taken from Mulchman's blog posting which can be found here.
 
The Slackware 13.37 install shipped with kernel 2.6.37.6, and in order to get the udlfb driver working properly, I needed to (which I discovered by accident) upgrade to the kernel in "testing" (e.g. 2.6.38.4).

The displaylink screen has to be the left-most screen for some reason.  The configuration would drive the displaylink screen on the left, the LVDS (laptop) screen in the center, and a 3rd monitor connected to the VGA output of the laptop as well, for a total of 3 screens.

The displaylink driver doesn't seem to know anything about "sleep" or "suspend to ram", so it must be restarted each time. "Restart" means killing off X, unplugging the displaylink USB cable, waiting for 10 seconds, then plugging it back in, waiting until the display that is being driven by the displaylink adapter turns green, then restarting X. I thought about experimenting with a powered USB hub that might keep the displaylink adapter powered while the machine was sleeping, but never got that far to see if it would work.

The udlfb driver is part of later kernels now (since 2.6.35?), so I don't think that the steps outlined by Mulchman or the Plugable site are required to install it. Mulchman references the xf86-video-displaylink driver, and Plugable makes use of a xf-video-udlfb driver, they seem to be almost equivalent, but not quite for some reason. In either case, the display driver must be downloaded via git, built, and then placed somewhere where X can find it.

The xorg ServerLayout section changes are like so:


Section "ServerLayout"
    Identifier   "X.org Configured"
      
    Screen       "DisplayLinkScreen"
    Screen       "Screen0" RightOf "DisplayLinkScreen"
    Screen       "Screen1" RightOF "Screen0"

    InputDevice  "Mouse0" "CorePointer"
    InputDevice  "Keyboard0" "CoreKeyboard"
    Option       "Xinerama" "on"
EndSection


The other sections relevant to the displaylink device, monitor, and screen:

Section "Device"
    Identifier "DisplayLinkDevice"
    Driver "displaylink"
    Option "fbdev" "/dev/fb1"
EndSection

Section "Monitor"
    Identifier "DisplayLinkMonitor"
EndSection


Section "Screen"
    Identifier "DisplayLinkScreen"
    Device "DisplayLinkDevice"
    Monitor "DisplayLinkMonitor"
    DefaultDepth 16
EndSection


Note: The displaylink driver only supports 16 bit color depth so all screens must have their depth fixed at 16.

The radeon device driver sections contain:


Section "Device"
    Option      "ZaphodHeads" "LVDS"
    Identifier  "Card0"
    Driver      "radeon"
    BusID       "PCI:1:0:0"
    Screen      0
EndSection



Section "Screen"
    Identifier   "Screen0"
    Device       "Card0"
    Monitor      "Monitor0"
    DefaultDepth 16
EndSection


Section "Device"
    Option     "ZaphodHeads" "VGA-0"
    Identifier "Card1"
    Driver     "radeon"
    BusID      "PCI:1:0:0"
    Screen     1
EndSection

Section "Screen"
    Identifier   "Screen1"
    Device       "Card1"
    Monitor      "Monitor1"
    DefaultDepth 16
EndSection

A screen capture would be nice here. Too bad I never thought to do that.