usb Maus über udev konfigurieren

F

flammenflitzer

Routinier
Hallo, meine usb Maus wird als drei dev angelegt.
Code:
flammenflitzer olaf # lsusb
Bus 002 Device 002: ID 09da:9090 A4 Tech Co., Ltd
Code:
/dev/input/mouse0
/dev/input/mice
/dev/input/js0
Eins und zwei sind in Ordnung. Drei nicht es soll statt /dev/input/js0 /dev/input/js2 angelegt werden.
Code:
cat /proc/bus/input/devices
I: Bus=0003 Vendor=09da Product=9090 Version=0111
N: Name="A4TECH USB Device"
P: Phys=usb-0000:00:0b.0-3/input0
S: Sysfs=/devices/pci0000:00/0000:00:0b.0/usb2/2-3/2-3:1.0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3 js0
B: PROP=0
B: EV=12001f
B: KEY=837fff002c3027 bf00444400000000 c00000000000001 10c040b27c007 ffa67bfad941dfff febeffdfffefffff fffffffffffffffe
B: REL=40
B: ABS=ffffff01000701ff
B: MSC=10
B: LED=1f

I: Bus=0003 Vendor=09da Product=9090 Version=0111
N: Name="A4TECH USB Device"
P: Phys=usb-0000:00:0b.0-3/input1
S: Sysfs=/devices/pci0000:00/0000:00:0b.0/usb2/2-3/2-3:1.1/input/input4
U: Uniq=
H: Handlers=mouse0 event4
B: PROP=0
B: EV=17
B: KEY=ffff0000 0 0 0 0
B: REL=143
B: MSC=10
Code:
nano /etc/udev/rules.d/91-local.rules
#neue Maus als js2 statt js0
KERNEL=="event*", ATTRS{phys}=="usb-0000:00:0b.0-3/input0" , NAME="js2"
bringt nichts.
 
Hi,

probiere mal
Code:
KERNEL=="event[0-9]*", SUBSYSTEM=="input", \
ATTRS{phys}=="usb-0000:00:0b.0-3/input1", \
NAME="%k", \
SYMLINK+="input/js2"
und liefere die Ausgabe von udevadm info --attribute-walk --name=/dev/input/js0
 
Code:
udevadm info --attribute-walk --name=/dev/input/js0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:0b.0/usb2/2-3/2-3:1.0/input/input4/js0':
    KERNEL=="js0"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb2/2-3/2-3:1.0/input/input4':
    KERNELS=="input4"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="A4TECH USB Device"
    ATTRS{phys}=="usb-0000:00:0b.0-3/input0"
    ATTRS{uniq}==""
    ATTRS{modalias}=="input:b0003v09DAp9090e0111-e0,1,2,3,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B1,B2,B5,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CE,CF,D0,D1,D2,D5,D8,D9,DB,E2,EA,EB,F0,100,13A,13B,162,166,16A,16E,178,179,17A,17B,17C,17D,17F,180,181,182,185,18C,18D,192,193,195,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1B0,1B1,1B7,r6,a0,1,2,3,4,5,6,7,8,10,11,12,20,28,29,2A,2B,2C,2D,2E,2F,30,31,32,33,34,35,36,37,38,39,3A,3B,3C,3D,3E,m4,l0,1,2,3,4,sfw"
    ATTRS{properties}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb2/2-3/2-3:1.0':
    KERNELS=="2-3:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bInterfaceSubClass}=="01"
    ATTRS{bInterfaceProtocol}=="01"
    ATTRS{modalias}=="usb:v09DAp9090d0102dc00dsc00dp00ic03isc01ip01"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb2/2-3':
    KERNELS=="2-3"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bNumInterfaces}==" 2"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bmAttributes}=="a0"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{urbnum}=="94730"
    ATTRS{idVendor}=="09da"
    ATTRS{idProduct}=="9090"
    ATTRS{bcdDevice}=="0102"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{speed}=="12"
    ATTRS{busnum}=="2"
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="3"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{authorized}=="1"
    ATTRS{manufacturer}=="A4TECH"
    ATTRS{product}=="USB Device"

  looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb2':
    KERNELS=="usb2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bMaxPower}=="  0mA"
    ATTRS{urbnum}=="51"
    ATTRS{idVendor}=="1d6b"
    ATTRS{idProduct}=="0001"
    ATTRS{bcdDevice}=="0206"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{speed}=="12"
    ATTRS{busnum}=="2"
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{version}==" 1.10"
    ATTRS{maxchild}=="10"
    ATTRS{quirks}=="0x0"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{authorized}=="1"
    ATTRS{manufacturer}=="Linux 2.6.39-gentoo-r4 ohci_hcd"
    ATTRS{product}=="OHCI Host Controller"
    ATTRS{serial}=="0000:00:0b.0"
    ATTRS{authorized_default}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:0b.0':
    KERNELS=="0000:00:0b.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ohci_hcd"
    ATTRS{vendor}=="0x10de"
    ATTRS{device}=="0x036c"
    ATTRS{subsystem_vendor}=="0x1043"
    ATTRS{subsystem_device}=="0x81fb"
    ATTRS{class}=="0x0c0310"
    ATTRS{irq}=="20"
    ATTRS{local_cpus}=="00000003"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{modalias}=="pci:v000010DEd0000036Csv00001043sd000081FBbc0Csc03i10"
    ATTRS{numa_node}=="-1"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{enable}=="1"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
 
KERNEL=="event[0-9]*", SUBSYSTEM=="input", ATTRS{phys}=="usb-0000:00:0b.0-3/input1", NAME="%k", SYMLINK+="input/js2"
bringt mir nichts, da ich ja primär will, das dieses Gerät nicht js0 oder js1 anlegt. Mit diesem Eintrag habe ich es zwar als js2, aber immer noch auch als js0.
 
Ohne es getestet zu haben:
Code:
KERNEL=="js0", SUBSYSTEM=="input", NAME="js2"
Die Logik dahinter erschließt sich dir, denke ich mal. Ich wollte die Ausgabe um zu schauen, was mit js0 egentlich los ist.
 
Weder
KERNEL=="js0", SUBSYSTEM=="input", NAME="js2"
noch
KERNEL=="js0", SUBSYSTEM=="input", ATTRS{phys}=="usb-0000:00:0b.0-3/input0" , NAME="js2"
bringen eine Änderung.
 
Dann hilft nur noch per udevmonitor das ganze ein bisschen zu debuggen, wenn sonst keiner eine Idee hat. So offensichtliche Dinge wie Neustart des udev daemon nach Regeländerungen und Reihenfolge der Abarbeitung der Regeln hast du ja bestimmt beachtet.
 
/etc/init.d/udev restart
Habe ich ausgeführt.
 

Ähnliche Themen

Touchpad unter Fedora mit Toshiba Tecra Z50

Alternative zu Ubuntu gesucht + Mängelliste

USB Fehler bei aufwachender Platte

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

XFCE freezes at startup

Zurück
Oben