Udev - USB Keyboard questions

Stuart Stegall keltor at keltor.org
Thu Feb 3 09:51:31 PST 2011


On Wed, Feb 2, 2011 at 3:30 PM,  <alupu at verizon.net> wrote:
> (B)LFS i686-pc-linux-gnu, 2.6.37, Udev-165.  Keyboard:
>  Microsoft ANB-00001 Black 104 Normal Keys USB Wired Slim Keyboard 600
>
> Hello,
>
> INTRO
> I got into some slight and strange (for me) problems
> in tuning up my Xorg-7.6 experience.  Unimportant for
> the subject questions to follow.
> However, the "connection" between the above and what follows
> is the way Udev has been discovering and setting up my "input"
> devices, the mouse and the keyboard.
> I treated this issue a little cavalierly - after all everything
> basically works, at command line and later in X - but what with
> Xorg-7.6 logs and all, I started scratching my head harder and harder.
>
> SUBJECT
> 1. On boot-up, both the USB mouse and USB keyboard seem to be
> counted twice (to my layman's eye).
>  (example below is a boot console extract for the subject keyboard):
>
> <<
> usb 5-2: new low speed USB device using uhci_hcd and address 2
> input: Microsoft Wired Keyboard 600 as
>  /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input4
>
> generic-usb 0003:045E:0750.0002: input: USB HID v1.11 Keyboard [Microsoft
>  Wired Keyboard 600] on usb-0000:00:1a.2-2/input0
>
> input: Microsoft Wired Keyboard 600 as
>  /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input5
>
> generic-usb 0003:045E:0750.0003: input: USB HID v1.11 Device [Microsoft
>  Wired Keyboard 600] on usb-0000:00:1a.2-2/input1
>>>
>
> Please note the "5-2:1.0" and "5-2:1.1" and about four different inputX's.
>
> 2. Recently, as I said, I got curioser and curioser, so this is
> an excerpt from the output of 'udevadm monitor' on replugging the
> keyboard:
> <<
>  ...
> KERNEL add
> /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input8/event4 (input)
>  ...
> KERNEL add
> /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input9/js0 (input)
>
> Udev dutifully reacts to the kernel events and does, respectively:
>
> UDEV   add /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input8 (input)
> UDEV   add /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input9 (input)
>  ...
> UDEV   add
> /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input9/js0 (input)
> UDEV   add
> /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input8/event4 (input)
>  ...
>>>
>
> Please note a related typical output:
>  ls -l /dev/input
> drwxr-xr-x 2 root root    120 2011-02-02 14:56 by-id
> drwxr-xr-x 2 root root    160 2011-02-02 14:56 by-path
> crw-r----- 1 root root 13, 64 2011-02-02 14:56 event0
> crw-r----- 1 root root 13, 65 2011-02-02 14:56 event1
> crw-r----- 1 root root 13, 66 2011-02-02 14:56 event2
> crw-r----- 1 root root 13, 67 2011-02-02 14:56 event3
> crw-r----- 1 root root 13, 68 2011-02-02 14:56 event4
> crw-r----- 1 root root 13, 69 2011-02-02 14:56 event5
> crw-r--r-- 1 root root 13,  0 2011-02-02 14:56 js0
> crw-r----- 1 root root 13, 63 2011-02-02 14:56 mice
> crw-r----- 1 root root 13, 32 2011-02-02 14:56 mouse0
>
> Another note:
> For the above machinations, Udev uses mostly the rules in file
> '/lib/udev/rules.d/60-persistent-input.rules'
>
> QUESTIONS
> 1.  Why does the _kernel_ appears to "see" the USB keyboard
>  (and the mouse, FTM - not shown here) twice?
>
> 2.  Why does the _kernel_ "forces" js on my poor keyboard?
>     'Documentation/devices.txt' states
>   <<
>  13 char        Input core
>                  0 = /dev/input/js0    First joystick
>  >>
>
>
> Note:  as an aside, this gets me in "real" trouble later, on X start-up:
>
>  (EE) Microsoft Wired Keyboard 600: failed to initialize for relative axes.
>  (WW) Microsoft Wired Keyboard 600: found 37 axes, limiting to 36.
>  (II) Microsoft Wired Keyboard 600: initialized for absolute axes.
>  (II) config/udev: Adding input device Microsoft Wired Keyboard 600
>       (/dev/input/js0)
>
> It appears the keyboard (as js0) is seen by people as a joystick with
> a lot of axes;  looks like only two axes (H and V) to me.
>
> Thanks,
> -- Alex
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>

It's not uncommon for Mice to be detected as Keyboards, Mice, and
Joysticks depending on the mouse's advertisements.  I would imagine
your keyboard is the same way.  It's still being detected as a
keyboard right?  Send your complete X log and dmesg log. (Minus
anything you need to scrape.)



More information about the lfs-support mailing list