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

4 replies for this story:

lzap wrote: Card?

What graphics card do you use?

Yenya wrote: Re: Card?

00:13.0 VGA compatible controller: NVidia / SGS Thomson (Joint Venture) Riva128 (rev 10) 01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01)

carlos gomes wrote: patching the XKB files?

"It mostly works, but I had to patch (fd.o bug #3912) the XKB files for the new "evdev" keyboard model" How do you do that? How to patch the XKB files?

Yenya wrote: Re: patching the XKB files?

The patches are described in that freedesktop.org bug #3912, AFAIK.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

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 :-)