1

I am trying to add an ID_INPUT_JOYSTICK=1 environment to udev when a joystick is added to my system. This is not need for desktop Ubuntu because the property is already there but on a linux version I am using it does not show. The target system is an arm version of linux. So, running udevadm info shows:

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"

But I want it so that I see an ENV{ID_INPUT_JOYSTICK}="1" added to the end, something like:

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"
    ..

The rules I added is this: /etc/udev/rules.d/91-joystick-rules

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

Also, the /lib/udev/rules.d/ differ from the 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

I tried rebooting my system and playing around with the specific rules but i can't figure out why my added environment is not showing. Any help is appreciated.

0

You must log in to answer this question.

Browse other questions tagged .