Yenya's World

Sun, 07 May 2006

Dual seat X and the evdev driver

I use dual seat X11 config (two graphics cards, two mice, two keyboards) at home. I had problems with this setup in Fedora 5, because this distribution is based on X.org release 7.0. Today I have finally made this working.

Firstly some background: in pre-7.0 versions of X.org/XFree86, the X server needed to be patched. The first part of the patch implemented the keyboard driver for the Linux event interface (/dev/input/eventN devices), in order to use the USB keyboard, and the second part removed the code which disabled all the other VGA cards present in the system when starting the X server, disabled VT locking/switching code, etc.

Now it seems the 7.0 release is much cleaner with respect to multi-seat configs. The X server has options for interoperability with other X servers running on the same host (-sharevts -novtswitch -isolateDevice), and there is a brand new evdev driver, which implements the event interface handler not only for keyboards, but also for mice. There is a big problem, though: the evdev driver in FC5 is not compatible with XKB.

Because Pavlína is back home and she needs the second head working, I have decided to try to solve this. I have installed the new xorg-x11-drv-evdev package from Rawhide (together with the rest of X packages). It mostly works, but I had to patch (fd.o bug #3912) the XKB files for the new "evdev" keyboard model. My keyboard config in xorg.conf is now the following:

Section "InputDevice"
        Identifier  "USBKeyboard"
        Driver      "evdev"
        Option      "Protocol" "evdev"
        Option      "Device" "/dev/input/event1"
        Option      "XkbModel" "evdev"
EndSection

The new driver does not support any other device name than eventN, so I had to hardcode the device name to the config, instead of using the udev-based rule for symlinking to the right device (in case the devices are plugged in or recognized in a different order). I use the following command to set up the US+CZ keyboard:

setxkbmap -model evdev -keycodes evdev us,cz_qwerty -option grp_led:scroll,grp_mode:switch,grp:shift_toggle

So finally, the multi-seat config is working for me even in FC5. And it seems the X.org 7.0 took much cleaner path to this than the previous releases. It is still not without glitches, but I think the direction is correct. The most important part is, that the multi-seat config is now supported in the X.org release, without patching and recompiling the X server.

Section: /computers (RSS feed) | Permanent link | 4 writebacks

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)