evdev changes break phys option

Yan Seiner yan at seiner.com
Wed May 14 06:54:47 PDT 2008


Yan Seiner wrote:
> It looks as though major changes were made to evdev that preclude the 
> use of selecting a physical device.  In other words, the Option "phys" 
> line is not usable.
>   
OK, it looks like it's a feature:

https://bugs.freedesktop.org/show_bug.cgi?id=12655

The only problem is that /dev/input/bu-id fails if you have two 
identical keyboards.... Only 1 keyboard will show up in /dev/input/by-id.

So the manpage should probably mention that. I ended up defining a 
/dev/input/by-user keyboard in udev:

KERNEL=="event*", ENV{ID_PATH}=="pci-0000:00:02.1-usb-0:4.4:1.0", \
SYMLINK+="input/by-user/KeyboardYan"
KERNEL=="event*", ENV{ID_PATH}=="pci-0000:00:02.1-usb-0:4.2:1.0", \
SYMLINK+="input/by-user/KeyboardNoriko"

which gave me 2 new devices:

selene:/etc/udev# ls -l /dev/input/by-user
celkem 0
lrwxrwxrwx 1 root root 9 2008-05-14 06:47 KeyboardNoriko -> ../event1
lrwxrwxrwx 1 root root 9 2008-05-14 06:47 KeyboardYan -> ../event5

and which, in turn, let me use an easy to read InputDevice 
 section:

Section "InputDevice"
Identifier "KeyboardYan"
Driver "evdev"
# Option "phys" "usb-0000:00:02.1-4.4/input1"
Option "CoreKeyboard"
Option "device" "/dev/input/by-user/KeyboardYan"
# Option "XkbRules" "xorg"
# Option "XkbModel" "pc104"
Option "XkbLayout" "us,cz"
Option "XkbOptions" "grp:alts_toggle,grp_led:scroll"
EndSection

All in all, Ithink this is a good change, but I wish the 
debian devs included the correct manpage....

--Yan

-- 
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner      (_)\(_)       ,>/'_     o__
       Personal Trainer      (_)\(_)    ,>/'_        o__
             Professional Engineer     (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)

"I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation 




More information about the xorg mailing list