Recently I managed to reconfigure my Ubuntu 10.04 setup to use udev for input devices. I must admit I was too dump not to do it earlier.
Ok, here is it. Whole config should consists of three parts: custom udev rules for your input devices, several Xorg configuration files, one for each seat, and display manager config, for running xservers.
Part 1: udev
First of all, you have to disable mouse and keyboard autodetection in your xorg.conf.d directory. In Lucid Lynx there is no need for this, but I had to do it in Debian Wheezy.
Next, you have to make custom udev rules file, like this one:
Code:
# Apply these rules only to input devices
SUBSYSTEM!="input", GOTO="custom_input_end"
KERNEL=="input[0-9]*", GOTO="custom_input_end"
ACTION!="add|change", GOTO="custom_input_end"
# Seat 0
ATTRS{description}=="i8042 KBD port", ENV{ID_INPUT.tags}="seat0"
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c01b", ENV{ID_INPUT.tags}="seat0"
ATTRS{name}=="Venus USB2.0 Camera", ENV{ID_INPUT.tags}="seat0"
# Seat 1
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c069", ENV{ID_INPUT.tags}="seat1"
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c313", ENV{ID_INPUT.tags}="seat1"
ATTRS{product}=="Plantronics Wireless Audio", ENV{ID_INPUT.tags}="seat1"
LABEL="custom_input_end"
I named it "99-multiseat.rules" and put in udev config directory. Entries are pretty self-explanatory.
Part 2: xorg.conf
Each seat will require separate config. Here is my seat0:
Code:
Section "ServerFlags"
Option "DontZap" "false"
Option "AllowEmptyInput" "true"
EndSection
Section "InputClass"
Identifier "Generic input device"
MatchTag "seat0"
Driver "evdev"
EndSection
Section "Monitor"
Identifier "Samsung"
Option "DPMS" "true"
EndSection
Section "Device"
Identifier "Radeon HD 4290"
Driver "radeon"
BusID "PCI:1:5:0"
EndSection
Section "Screen"
Identifier "Left Screen"
Device "Radeon HD 4290"
Monitor "Samsung"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Seat0"
Screen 0 "Left Screen" 0 0
Option "SingleCard" "on"
EndSection
Adjust seat index and PCI ID for another seats. I copied these configs to /etc/X11/, but you can choose any directory.
Part 3: Display manager configuration
I have KDM, but you might have old GDM<=2.20, lightdm or something else.
Code:
[X-:0-Core]
AutoLoginAgain=false
AutoLoginDelay=0
AutoLoginEnable=false
AutoLoginLocked=false
AutoLoginUser=
ClientLogFile=.xsession-errors
ServerVT=7
ServerCmd=/usr/bin/X -config /etc/X11/seat0.conf -layout Seat0 -sharevts -keeptty
[X-:1-Core]
AutoLoginAgain=false
AutoLoginEnable=false
AutoLoginLocked=false
ClientLogFile=.xsession-errors
ServerVT=9
ServerCmd=/usr/bin/X -config /etc/X11/seat1.conf -layout Seat1 -sharevts -keeptty -novtswitch
If you managed to repeat these steps on your system you should have working hotplug for input devices on each seat.