WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: udev does not find mouse  (Read 2931 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
udev does not find mouse
« on: May 22, 2010, 03:09:57 AM »
..not totally sure this is a udev problem, but using tc-2.11 with a logitech vx nano mouse:
Code: [Select]
$ cat /proc/bus/input/devices
...
I: Bus=0003 Vendor=046d Product=c526 Version=0111
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input5
U: Uniq=
H: Handlers=mouse1 event5
B: EV=17
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143
B: MSC=10

..but no corresonding /dev/input/event5 or mouse1 is created:
Code: [Select]
$ ls /dev/input/event*
/dev/input/event0  /dev/input/event1  /dev/input/event2
$ ls /dev/input/m*   
/dev/input/mice    /dev/input/mouse0

..and thus X does not identify the mouse properly

From google
Quote
I'm not sure if it's a bug in archlinux udev, but there is no 'by-id' directory and in /dev/udev/rules.d/udev.rules, there is:
Code: [Select]
# by-id links, generic and for the event devices
KERNEL=="mouse*|js*", ENV{ID_SUBSYSTEMS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-$env{ID_CLASS}"
KERNEL=="event*", ENV{ID_SUBSYSTEMS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"

if you replace only these 4 ID_SUBSYSTEMS by ID_BUS, it works.

Our udev rules are not written like this, but do we need something similar?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: udev does not find mouse
« Reply #1 on: May 22, 2010, 06:15:54 AM »
The by-id rules don't matter in this. Anything about it in dmesg? Also, could you give udev logs from plugging it in, and maybe do a quick test on 3.x to see if the newer kernel makes a difference.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: udev does not find mouse
« Reply #2 on: May 22, 2010, 06:28:15 AM »
from:
Code: [Select]
$ udevadm info --query=all --path=/sys/class/input/event5
P: /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input7/event5
N: event5
S: char/13:69
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input7/event5
E: MAJOR=13
E: MINOR=69
E: SUBSYSTEM=input
E: DEVNAME=/dev/event5
E: DEVLINKS=/dev/char/13:69

..seems it's /dev/event5, not /dev/input/event5 - strange it doesn't get put in /dev/input but with "Device" "/dev/event5", the mouse is now found.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14848
Re: udev does not find mouse
« Reply #3 on: May 22, 2010, 06:35:37 AM »
Anything about it in dmesg?
No

Quote
Also, could you give udev logs from plugging it in

Code: [Select]
UDEV  [1274538732.424768] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2 (usb)
UDEV  [1274538732.451843] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0 (usb)
UDEV  [1274538732.452127] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/0003:046D:C526.0005 (hid)
UDEV  [1274538732.455581] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/usb_endpoint/usbdev2.4_ep81 (usb_endpoint)
UDEV  [1274538732.488803] add      /class/usb (class)
UDEV  [1274538732.489210] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1 (usb)
UDEV  [1274538732.516156] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1/0003:046D:C526.0006 (hid)
UDEV  [1274538732.516875] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1/usb_endpoint/usbdev2.4_ep82 (usb_endpoint)
UDEV  [1274538732.517263] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1/usb/hiddev0 (usb)
UDEV  [1274538732.527689] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/usb_endpoint/usbdev2.4_ep00 (usb_endpoint)
UDEV  [1274538732.529263] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1/input/input10 (input)
UDEV  [1274538732.530367] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.1/input/input10/event6 (input)
UDEV  [1274538732.531240] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input9 (input)
UDEV  [1274538732.531559] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input9/event5 (input)
UDEV  [1274538732.531819] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input9/mouse1 (input)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: udev does not find mouse
« Reply #4 on: May 22, 2010, 09:52:24 AM »
Okay, found it.
The only barriers that can stop you are the ones you create yourself.