4 screens with Ubuntu 10.10

Monday, October 18th, 2010

After success in getting my 4 screen setup under Ubuntu 10.04 Lucid Lynx, I upgraded to Ubuntu 10.10 Maverick Meerkat. Quite a mistake — there is a Xinerama bug was an X.org bug that crashes X when running Qt and some other applications.

https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/650539

Despite being deprecated in favour of RandR, Ximerama remains the only way to properly multiscreen multiple graphics cards. Sadly it looks like a typo crept in during a recent code clean-up in Xorg. The Arch Linux community found the fault and talked to upstream (https://bbs.archlinux.org/viewtopic.php?pid=841628) which resulted in an accepted patch to Xorg (http://lists.x.org/archives/xorg-devel/2010-October/014150.html)

Now we just have to wait for an update to the Ubuntu packages. Until that lands, I can’t run multiscreen on Ubuntu 10.10, because I need many of the affected apps in my workflow. And now I’ve invested in a multi-arm monitor stand system (see http://integinternational.com/modular-monitor-arms/, a New Zealand manufactured item) I really don’t want to go back to just two screens …

Update

As of 3 December, Ubuntu have released the fix to the xorg-server package in 10.10.

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.

Ubuntu’s gnome-panel instability workaround

Thursday, July 15th, 2010

I’ve been running Ubuntu 10.04 on my desktop since it came out, and about the only real annoyance I have is that occasionally the gnome-panel scrambles the order of my icons and applets. This is possibly because I keep switching the screen layout between a pair of external screens and the laptop screen itself, just using some scripts that invoke xrandr directly … but it still shouldn’t happen.

My workaround for this is to find the files that are modified when the panel attributes are changed, and put the old ones back! So, I sat in a shell finding current files in ~/.gconf using find -mtime 0 until I’d identified the ~/.gconf/apps/panel directory (not ~/.gconf/apps/panel/applets as I initially thought) as being the place to look. I created a bzr repository in that directory and checked in all the files, and in my .bashrc I just run a quick status check to see if anything has been modified … if it has, I can run bzr revert to put it back!

Sadly just killing and restarting the gnome-panel doesn’t do enough to reset the session, you’ll have to log out completely to get the panel re-organised. Unless gnome-panel listens to a signal like HUP … and I’m not going to test that today!

Thunderbird & Ubuntu 10.04

Tuesday, May 4th, 2010

Thunderbird 3 comes with Ubuntu 10.04, but sadly it doesn’t integrate with the default desktop as well as it could — it doesn’t link to the envelope icon in the Indicator Applet, and it uses its own popups instead of the libnotify mechanism Ubuntu prefers.

These are easily fixed, however …

http://ubuntuforums.org/showpost.php?p=9150987 tells us how to add Thunderbird to the menu, along with actions such as Compose New Message and Contacts (read the whole thread to see how Calendar would work if you had Lightning installed); but it doesn’t address how to get notifications working.

The experimental libnotify-mozilla XPI for Thunderbird itself, on the other hand, provides the notification of new mail — but if Thunderbird is not running, or if there are no new messages, nothing will be visible in the Indicator.
http://ubublogger.wordpress.com/2010/02/02/how-to-install-the-experimental-version-of-libnotify-mozilla/

A combination of these two still doesn’t produce a perfect solution, but it’s good enough until Ubuntu & Mozilla sort themselves out and get Thunderbird capable of replacing Evolution on the desktop fully.

The Indicator Applet showing Thunderbird status