Gotchas with dual-headed X with RandR on ATI cards

November 24, 2007

Xinerama is the old general way to set up multi-headed X so that things actually knew that you had more than one display. In Fedora 8, many card drivers (including radeon, the driver for ATI cards) have switched to using the XRandR extension.

The Fedora 8 GUI configuration tools don't know anything about RandR-based dual-head configuration; if you try to use them anyways, nothing helpful happens. In theory you can do all of it on the fly with xrandr; in practice this didn't work for me and I needed to modify my /etc/X11/xorg.conf by hand, following the general directions in the Intel documentation.

(To simplify, xrandr operates by placing your physical screens within an overall virtual display. My specific problem was that the default virtual display was too small to fit in two 1280x1024 screens, and you can't change this after the server has started.)

Now, Xinerama is two things: how the X server operates internally, and an X extension that programs can use to find out if you have multiple displays and how they're organized. Roughly speaking, when a program queries the extension, it gets back a list of screen numbers, their dimensions, and the coordinates of the top left of what they're displaying. While XRandR replaces the internal bits, it emulates the extension so that lots of programs don't break. Unfortunately, its Xinerama emulation has some issues:

  • you get one Xinerama screen per lit output, even if the outputs are operating in 'clone' mode (where they display the same thing). In the same situation, real Xinerama will either tell you it's not active or that you have only one screen.

    (What they should do is adjust the Xinerama results on the fly to merge multiple cloned displays into a single Xinerama screen.)

  • real Xinerama always assigns screen numbers in ascending order of their overall position, with the result that screen 0 is always the top left screen.

    XRandR instead assigns screen numbers statically based on which lit output they are being displayed by. For example, if I am using both VGA and DVI out on my ATI X300, the VGA output is always screen 0 and the DVI output is always screen 1, regardless of whether the DVI screen is left or right of the VGA screen. (The top left coordinates are correct, of course.)

The problem with the former is that anything that just counts how many screens a Xinerama query returns will believe that you have multiple displays when you really only have one.

The problem with the latter is that there are some programs which place their windows on specific screens by screen number, counting on the Xinerama behavior (especially for the meaning of screen 0). Since one of these programs is my window manager, I wound up physically rewiring my displays to match XRandR's hardcoded numbering, which is less convenient for various things.

(It turns out I could fiddle with fvwm's configuration to fix things, but I don't want to find out the next program to do this.)

Written on 24 November 2007.
« My web spider technical requirements
Why we may not be able to use ZFS »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Nov 24 23:34:14 2007
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.