udev-Regeln zum Hinzufügen eines Joysticks für Arm-Linux?


1

Ich versuche, udev eine ID_INPUT_JOYSTICK = 1-Umgebung hinzuzufügen, wenn meinem System ein Joystick hinzugefügt wird. Dies ist für Ubuntu-Desktop nicht erforderlich, da die Eigenschaft bereits vorhanden ist. Bei einer Linux-Version, die ich verwende, wird sie jedoch nicht angezeigt. Das Zielsystem ist eine Armversion von Linux. Das Ausführen von udevadm info zeigt also:

looking at device '/devices/platform/xhci-hcd.1/usb3/3-1/3-1:1.0/input/input6/event6':
    KERNEL=="event6"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/platform/xhci-hcd.1/usb3/3-1/3-1:1.0/input/input6':
    KERNELS=="input6"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="Logitech Logitech RumblePad 2 USB"
    ATTRS{phys}=="usb-xhci-hcd.1-1/input0"
    ATTRS{uniq}==""
    ATTRS{properties}=="0"

  looking at parent device '/devices/platform/xhci-hcd.1/usb3/3-1/3-1:1.0':
    KERNELS=="3-1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/platform/xhci-hcd.1/usb3/3-1':
    KERNELS=="3-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{devpath}=="1"
    ATTRS{idVendor}=="046d"
    ATTRS{speed}=="1.5"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{busnum}=="3"
    ATTRS{devnum}=="2"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="500mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="80"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="0"
    ATTRS{bcdDevice}=="0100"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{version}==" 1.10"
    ATTRS{urbnum}=="16"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Logitech"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="c218"
    ATTRS{bDeviceClass}=="00"

Ich möchte aber, dass am Ende ein ENV {ID_INPUT_JOYSTICK} = "1" angezeigt wird.

looking at device '/devices/platform/xhci-hcd.1/usb3/3-1/3-1:1.0/input/input6/event6':
    KERNEL=="event6"
    SUBSYSTEM=="input"
    DRIVER==""
  looking at parent device '/devices/platform/xhci-hcd.1/usb3/3-1/3-1:1.0/input/input6':
    KERNELS=="input6"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="Logitech Logitech RumblePad 2 USB"
    ATTRS{phys}=="usb-xhci-hcd.1-1/input0"
    ATTRS{uniq}==""
    ATTRS{properties}=="0"
    ENV{ID_INPUT_JOYSTICK}="1"
    ..

Die Regeln, die ich hinzugefügt habe, sind folgende: /etc/udev/rules.d/91-joystickrules

SUBSYSTEMS=="input", ATTRS{name}=="Logitech Logitech RumblePad 2 USB", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

Auch unterscheidet sich /lib/udev/rules.d/ vom Ubuntu-Desktop:

-rw-r--r--    1 1003     1003         11741 May 27  2014 95-keymap.rules
-rw-r--r--    1 1003     1003           131 May 17  2014 90-alsa-restore.rules
-rw-r--r--    1 1003     1003          5570 May 17  2014 90-pulseaudio.rules
-rw-r--r--    1 1003     1003          1356 May 17  2014 97-bluetooth-hid2hci.rules
-rw-r--r--    1 1003     1003          2732 May 17  2014 42-usb-hid-pm.rules
-rw-r--r--    1 1003     1003          3652 May 17  2014 50-udev-default.rules
-rw-r--r--    1 1003     1003           646 May 17  2014 60-cdrom_id.rules
-rw-r--r--    1 1003     1003           616 May 17  2014 60-persistent-alsa.rules
-rw-r--r--    1 1003     1003          2400 May 17  2014 60-persistent-input.rules
-rw-r--r--    1 1003     1003           947 May 17  2014 60-persistent-serial.rules
-rw-r--r--    1 1003     1003          1420 May 17  2014 60-persistent-storage-tape.rules
-rw-r--r--    1 1003     1003          5622 May 17  2014 60-persistent-storage.rules
-rw-r--r--    1 1003     1003           769 May 17  2014 60-persistent-v4l.rules
-rw-r--r--    1 1003     1003           166 May 17  2014 61-accelerometer.rules
-rw-r--r--    1 1003     1003           570 May 17  2014 75-net-description.rules
-rw-r--r--    1 1003     1003           255 May 17  2014 75-probe_mtd.rules
-rw-r--r--    1 1003     1003           570 May 17  2014 75-tty-description.rules
-rw-r--r--    1 1003     1003          4174 May 17  2014 78-sound-card.rules
-rw-r--r--    1 1003     1003           565 May 17  2014 80-drivers.rules
-rw-r--r--    1 1003     1003          3328 May 17  2014 95-keyboard-force-release.rules
-rw-r--r--    1 1003     1003           155 May 17  2014 95-udev-late.rules

Ich habe versucht, mein System neu zu starten und mit den spezifischen Regeln herumzuspielen, aber ich kann nicht herausfinden, warum meine hinzugefügte Umgebung nicht angezeigt wird. Jede Hilfe wird geschätzt.

Durch die Nutzung unserer Website bestätigen Sie, dass Sie unsere Cookie-Richtlinie und Datenschutzrichtlinie gelesen und verstanden haben.
Licensed under cc by-sa 3.0 with attribution required.