Since Linux 4.18 where HID_QUIRK_INPUT_PER_APP was added (f07b3c1da9 "HID: generic: create one input report per application type"), my USB keyboard shows up as 3 input devices instead of 2: [ 1.448722] usb 1-1.1: new low-speed USB device number 3 using xhci_hcd [ 1.588196] usb 1-1.1: New USB device found, idVendor=413c, idProduct=2112, bcdDevice= 1.07 [ 1.591237] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.594249] usb 1-1.1: Product: Dell USB Wired Multimedia Keyboard [ 1.597222] usb 1-1.1: Manufacturer: DELL [ 1.612274] input: DELL Dell USB Wired Multimedia Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:413C:2112.0001/input/input0 [ 1.679217] hid-generic 0003:413C:2112.0001: input,hidraw0: USB HID v1.10 Keyboard [DELL Dell USB Wired Multimedia Keyboard] on usb-0000:01:00.0-1.1/input0 [ 1.692457] input: DELL Dell USB Wired Multimedia Keyboard System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0002/input/input1 [ 1.758905] input: DELL Dell USB Wired Multimedia Keyboard Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0002/input/input2 [ 1.762641] hid-generic 0003:413C:2112.0002: input,hidraw1: USB HID v1.10 Device [DELL Dell USB Wired Multimedia Keyboard] on usb-0000:01:00.0-1.1/input1 This is fine: $ ls -l /dev/input/event[012] crw-rw---- 1 root input 13, 64 Mar 14 12:15 /dev/input/event0 crw-rw---- 1 root input 13, 65 Mar 14 12:15 /dev/input/event1 crw-rw---- 1 root input 13, 66 Mar 14 12:15 /dev/input/event2 But the second and third look the same as far as /lib/udev/rules.d/60-persistent-input.rules is concerned: $ ls -l /dev/input/by-id/*Dell* lrwxrwxrwx 1 root root 9 Mar 14 12:15 usb-DELL_Dell_USB_Wired_Multimedia_Keyboard-event-if01 -> ../event2 lrwxrwxrwx 1 root root 9 Mar 14 12:15 usb-DELL_Dell_USB_Wired_Multimedia_Keyboard-event-kbd -> ../event0 The only difference I see in the udev attributes is ATTR{name} at the input device (attached below), so I am using this as temporary hack to get all 3 links for this keyboard: SUBSYSTEMS=="input", KERNEL=="event*", ATTRS{name}=="?*", \ SYMLINK+="input/by-id/usb-jim-$attr{name}-event-if$env{ID_USB_INTERFACE_NUM}" $ ls -l /dev/input/by-id/usb-jim-* lrwxrwxrwx 1 root root 9 Mar 14 13:39 /dev/input/by-id/usb-jim-DELL_Dell_USB_Wired_Multimedia_Keyboard_Consumer_Control-event-if01 -> ../event2 lrwxrwxrwx 1 root root 9 Mar 14 13:39 /dev/input/by-id/usb-jim-DELL_Dell_USB_Wired_Multimedia_Keyboard-event-if00 -> ../event0 lrwxrwxrwx 1 root root 9 Mar 14 13:39 /dev/input/by-id/usb-jim-DELL_Dell_USB_Wired_Multimedia_Keyboard_System_Control-event-if01 -> ../event1 Should the shipped udev rules account for this? Or should the kernel be exposing the devices differently? Jim # udevadm info -q all --attribute-walk -p devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input51/event1 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/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input51/event1': KERNEL=="event1" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input51': KERNELS=="input51" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{phys}=="usb-0000:01:00.0-1.1/input1" ATTRS{uniq}=="" ATTRS{properties}=="0" ATTRS{name}=="DELL Dell USB Wired Multimedia Keyboard System Control" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023': KERNELS=="0003:413C:2112.0023" SUBSYSTEMS=="hid" DRIVERS=="hid-generic" ATTRS{country}=="00" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1': KERNELS=="1-1.1:1.1" SUBSYSTEMS=="usb" DRIVERS=="usbhid" ATTRS{bInterfaceNumber}=="01" ATTRS{bInterfaceProtocol}=="00" ATTRS{supports_autosuspend}=="1" ATTRS{bInterfaceClass}=="03" ATTRS{bInterfaceSubClass}=="00" ATTRS{authorized}=="1" ATTRS{bNumEndpoints}=="01" ATTRS{bAlternateSetting}==" 0" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1': KERNELS=="1-1.1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{quirks}=="0x0" ATTRS{bMaxPower}=="100mA" ATTRS{avoid_reset_quirk}=="0" ATTRS{removable}=="unknown" ATTRS{bConfigurationValue}=="1" ATTRS{busnum}=="1" ATTRS{bNumInterfaces}==" 2" ATTRS{idVendor}=="413c" ATTRS{ltm_capable}=="no" ATTRS{rx_lanes}=="1" ATTRS{bcdDevice}=="0107" ATTRS{bDeviceClass}=="00" ATTRS{devpath}=="1.1" ATTRS{devspec}==" (null)" ATTRS{tx_lanes}=="1" ATTRS{version}==" 1.10" ATTRS{authorized}=="1" ATTRS{urbnum}=="15" ATTRS{product}=="Dell USB Wired Multimedia Keyboard" ATTRS{bNumConfigurations}=="1" ATTRS{configuration}=="" ATTRS{bMaxPacketSize0}=="8" ATTRS{idProduct}=="2112" ATTRS{speed}=="1.5" ATTRS{bDeviceProtocol}=="00" ATTRS{bmAttributes}=="a0" ATTRS{manufacturer}=="DELL" ATTRS{bDeviceSubClass}=="00" ATTRS{devnum}=="20" ATTRS{maxchild}=="0" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1': KERNELS=="1-1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{speed}=="480" ATTRS{bDeviceProtocol}=="01" ATTRS{bNumConfigurations}=="1" ATTRS{devspec}==" (null)" ATTRS{bDeviceClass}=="09" ATTRS{configuration}=="" ATTRS{tx_lanes}=="1" ATTRS{bMaxPower}=="100mA" ATTRS{authorized}=="1" ATTRS{bcdDevice}=="0421" ATTRS{bDeviceSubClass}=="00" ATTRS{ltm_capable}=="no" ATTRS{avoid_reset_quirk}=="0" ATTRS{urbnum}=="409" ATTRS{devnum}=="2" ATTRS{rx_lanes}=="1" ATTRS{maxchild}=="4" ATTRS{version}==" 2.10" ATTRS{product}=="USB2.0 Hub" ATTRS{idProduct}=="3431" ATTRS{bNumInterfaces}==" 1" ATTRS{bConfigurationValue}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{removable}=="unknown" ATTRS{idVendor}=="2109" ATTRS{bmAttributes}=="e0" ATTRS{devpath}=="1" ATTRS{quirks}=="0x0" ATTRS{busnum}=="1" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{speed}=="480" ATTRS{busnum}=="1" ATTRS{rx_lanes}=="1" ATTRS{bMaxPower}=="0mA" ATTRS{devpath}=="0" ATTRS{bDeviceClass}=="09" ATTRS{serial}=="0000:01:00.0" ATTRS{bDeviceSubClass}=="00" ATTRS{avoid_reset_quirk}=="0" ATTRS{product}=="xHCI Host Controller" ATTRS{authorized_default}=="1" ATTRS{bDeviceProtocol}=="01" ATTRS{configuration}=="" ATTRS{bMaxPacketSize0}=="64" ATTRS{ltm_capable}=="no" ATTRS{devspec}==" (null)" ATTRS{idProduct}=="0002" ATTRS{quirks}=="0x0" ATTRS{tx_lanes}=="1" ATTRS{interface_authorized_default}=="1" ATTRS{bNumConfigurations}=="1" ATTRS{bNumInterfaces}==" 1" ATTRS{maxchild}=="1" ATTRS{bmAttributes}=="e0" ATTRS{devnum}=="1" ATTRS{idVendor}=="1d6b" ATTRS{version}==" 2.00" ATTRS{urbnum}=="22" ATTRS{bConfigurationValue}=="1" ATTRS{removable}=="unknown" ATTRS{authorized}=="1" ATTRS{bcdDevice}=="0419" ATTRS{manufacturer}=="Linux 4.19.97-v7l+ xhci-hcd" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0': KERNELS=="0000:01:00.0" SUBSYSTEMS=="pci" DRIVERS=="xhci_hcd" ATTRS{devspec}=="" ATTRS{local_cpus}=="f" ATTRS{max_link_width}=="1" ATTRS{class}=="0x0c0330" ATTRS{subsystem_vendor}=="0x1106" ATTRS{max_link_speed}=="5 GT/s" ATTRS{current_link_width}=="1" ATTRS{revision}=="0x01" ATTRS{subsystem_device}=="0x3483" ATTRS{ari_enabled}=="0" ATTRS{device}=="0x3483" ATTRS{broken_parity_status}=="0" ATTRS{enable}=="1" ATTRS{irq}=="54" ATTRS{consistent_dma_mask_bits}=="64" ATTRS{driver_override}=="(null)" ATTRS{local_cpulist}=="0-3" ATTRS{msi_bus}=="1" ATTRS{vendor}=="0x1106" ATTRS{current_link_speed}=="5 GT/s" ATTRS{dma_mask_bits}=="64" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0': KERNELS=="0000:00:00.0" SUBSYSTEMS=="pci" DRIVERS=="pcieport" ATTRS{current_link_width}=="1" ATTRS{irq}=="53" ATTRS{aer_rootport_total_err_cor}=="0" ATTRS{aer_rootport_total_err_nonfatal}=="0" ATTRS{revision}=="0x10" ATTRS{secondary_bus_number}=="1" ATTRS{consistent_dma_mask_bits}=="32" ATTRS{max_link_speed}=="5 GT/s" ATTRS{local_cpulist}=="0-3" ATTRS{ari_enabled}=="0" ATTRS{driver_override}=="(null)" ATTRS{subsystem_device}=="0x0000" ATTRS{devspec}=="" ATTRS{subsystem_vendor}=="0x0000" ATTRS{vendor}=="0x14e4" ATTRS{msi_bus}=="1" ATTRS{broken_parity_status}=="0" ATTRS{enable}=="1" ATTRS{local_cpus}=="f" ATTRS{dma_mask_bits}=="32" ATTRS{aer_rootport_total_err_fatal}=="0" ATTRS{max_link_width}=="1" ATTRS{current_link_speed}=="5 GT/s" ATTRS{device}=="0x2711" ATTRS{subordinate_bus_number}=="1" ATTRS{class}=="0x060400" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" looking at parent device '/devices/platform/scb/fd500000.pcie': KERNELS=="fd500000.pcie" SUBSYSTEMS=="platform" DRIVERS=="brcm-pcie" ATTRS{driver_override}=="(null)" ATTRS{dmabounce_stats}=="m:0/0 s:0/0 f:0 s:0 b:0/0 a:0/0" looking at parent device '/devices/platform/scb': KERNELS=="scb" SUBSYSTEMS=="platform" DRIVERS=="" ATTRS{driver_override}=="(null)" looking at parent device '/devices/platform': KERNELS=="platform" SUBSYSTEMS=="" DRIVERS=="" # udevadm info -q all --attribute-walk -p devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input52/event2 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/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input52/event2': KERNEL=="event2" SUBSYSTEM=="input" DRIVER=="" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023/input/input52': KERNELS=="input52" SUBSYSTEMS=="input" DRIVERS=="" ATTRS{name}=="DELL Dell USB Wired Multimedia Keyboard Consumer Control" ATTRS{properties}=="0" ATTRS{uniq}=="" ATTRS{phys}=="usb-0000:01:00.0-1.1/input1" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2112.0023': KERNELS=="0003:413C:2112.0023" SUBSYSTEMS=="hid" DRIVERS=="hid-generic" ATTRS{country}=="00" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1': KERNELS=="1-1.1:1.1" SUBSYSTEMS=="usb" DRIVERS=="usbhid" ATTRS{bAlternateSetting}==" 0" ATTRS{authorized}=="1" ATTRS{bInterfaceClass}=="03" ATTRS{bInterfaceProtocol}=="00" ATTRS{bInterfaceSubClass}=="00" ATTRS{supports_autosuspend}=="1" ATTRS{bInterfaceNumber}=="01" ATTRS{bNumEndpoints}=="01" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1': KERNELS=="1-1.1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{devnum}=="20" ATTRS{bNumInterfaces}==" 2" ATTRS{ltm_capable}=="no" ATTRS{bcdDevice}=="0107" ATTRS{bMaxPacketSize0}=="8" ATTRS{quirks}=="0x0" ATTRS{configuration}=="" ATTRS{rx_lanes}=="1" ATTRS{bMaxPower}=="100mA" ATTRS{authorized}=="1" ATTRS{version}==" 1.10" ATTRS{bmAttributes}=="a0" ATTRS{devpath}=="1.1" ATTRS{maxchild}=="0" ATTRS{bNumConfigurations}=="1" ATTRS{avoid_reset_quirk}=="0" ATTRS{removable}=="unknown" ATTRS{bConfigurationValue}=="1" ATTRS{speed}=="1.5" ATTRS{idVendor}=="413c" ATTRS{idProduct}=="2112" ATTRS{bDeviceClass}=="00" ATTRS{bDeviceProtocol}=="00" ATTRS{product}=="Dell USB Wired Multimedia Keyboard" ATTRS{busnum}=="1" ATTRS{tx_lanes}=="1" ATTRS{manufacturer}=="DELL" ATTRS{devspec}==" (null)" ATTRS{urbnum}=="15" ATTRS{bDeviceSubClass}=="00" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1': KERNELS=="1-1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bDeviceClass}=="09" ATTRS{bConfigurationValue}=="1" ATTRS{maxchild}=="4" ATTRS{product}=="USB2.0 Hub" ATTRS{speed}=="480" ATTRS{removable}=="unknown" ATTRS{configuration}=="" ATTRS{bNumConfigurations}=="1" ATTRS{idVendor}=="2109" ATTRS{avoid_reset_quirk}=="0" ATTRS{quirks}=="0x0" ATTRS{idProduct}=="3431" ATTRS{rx_lanes}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bDeviceSubClass}=="00" ATTRS{devnum}=="2" ATTRS{bcdDevice}=="0421" ATTRS{version}==" 2.10" ATTRS{busnum}=="1" ATTRS{ltm_capable}=="no" ATTRS{devspec}==" (null)" ATTRS{devpath}=="1" ATTRS{bDeviceProtocol}=="01" ATTRS{tx_lanes}=="1" ATTRS{bNumInterfaces}==" 1" ATTRS{urbnum}=="409" ATTRS{bMaxPower}=="100mA" ATTRS{bMaxPacketSize0}=="64" ATTRS{authorized}=="1" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{devnum}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{devpath}=="0" ATTRS{bConfigurationValue}=="1" ATTRS{ltm_capable}=="no" ATTRS{rx_lanes}=="1" ATTRS{serial}=="0000:01:00.0" ATTRS{bDeviceClass}=="09" ATTRS{bDeviceSubClass}=="00" ATTRS{bNumConfigurations}=="1" ATTRS{idVendor}=="1d6b" ATTRS{tx_lanes}=="1" ATTRS{configuration}=="" ATTRS{version}==" 2.00" ATTRS{bNumInterfaces}==" 1" ATTRS{removable}=="unknown" ATTRS{maxchild}=="1" ATTRS{bDeviceProtocol}=="01" ATTRS{authorized}=="1" ATTRS{speed}=="480" ATTRS{bMaxPower}=="0mA" ATTRS{avoid_reset_quirk}=="0" ATTRS{authorized_default}=="1" ATTRS{busnum}=="1" ATTRS{urbnum}=="22" ATTRS{devspec}==" (null)" ATTRS{bmAttributes}=="e0" ATTRS{idProduct}=="0002" ATTRS{manufacturer}=="Linux 4.19.97-v7l+ xhci-hcd" ATTRS{interface_authorized_default}=="1" ATTRS{product}=="xHCI Host Controller" ATTRS{bcdDevice}=="0419" ATTRS{quirks}=="0x0" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0': KERNELS=="0000:01:00.0" SUBSYSTEMS=="pci" DRIVERS=="xhci_hcd" ATTRS{subsystem_vendor}=="0x1106" ATTRS{enable}=="1" ATTRS{local_cpus}=="f" ATTRS{ari_enabled}=="0" ATTRS{broken_parity_status}=="0" ATTRS{consistent_dma_mask_bits}=="64" ATTRS{current_link_width}=="1" ATTRS{current_link_speed}=="5 GT/s" ATTRS{irq}=="54" ATTRS{vendor}=="0x1106" ATTRS{driver_override}=="(null)" ATTRS{msi_bus}=="1" ATTRS{device}=="0x3483" ATTRS{max_link_width}=="1" ATTRS{dma_mask_bits}=="64" ATTRS{devspec}=="" ATTRS{local_cpulist}=="0-3" ATTRS{class}=="0x0c0330" ATTRS{subsystem_device}=="0x3483" ATTRS{max_link_speed}=="5 GT/s" ATTRS{revision}=="0x01" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0': KERNELS=="0000:00:00.0" SUBSYSTEMS=="pci" DRIVERS=="pcieport" ATTRS{ari_enabled}=="0" ATTRS{current_link_width}=="1" ATTRS{local_cpulist}=="0-3" ATTRS{dma_mask_bits}=="32" ATTRS{max_link_width}=="1" ATTRS{consistent_dma_mask_bits}=="32" ATTRS{devspec}=="" ATTRS{local_cpus}=="f" ATTRS{aer_rootport_total_err_fatal}=="0" ATTRS{subsystem_vendor}=="0x0000" ATTRS{broken_parity_status}=="0" ATTRS{irq}=="53" ATTRS{revision}=="0x10" ATTRS{enable}=="1" ATTRS{device}=="0x2711" ATTRS{subordinate_bus_number}=="1" ATTRS{aer_rootport_total_err_cor}=="0" ATTRS{vendor}=="0x14e4" ATTRS{max_link_speed}=="5 GT/s" ATTRS{aer_rootport_total_err_nonfatal}=="0" ATTRS{secondary_bus_number}=="1" ATTRS{current_link_speed}=="5 GT/s" ATTRS{driver_override}=="(null)" ATTRS{msi_bus}=="1" ATTRS{subsystem_device}=="0x0000" ATTRS{class}=="0x060400" looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" looking at parent device '/devices/platform/scb/fd500000.pcie': KERNELS=="fd500000.pcie" SUBSYSTEMS=="platform" DRIVERS=="brcm-pcie" ATTRS{dmabounce_stats}=="m:0/0 s:0/0 f:0 s:0 b:0/0 a:0/0" ATTRS{driver_override}=="(null)" looking at parent device '/devices/platform/scb': KERNELS=="scb" SUBSYSTEMS=="platform" DRIVERS=="" ATTRS{driver_override}=="(null)" looking at parent device '/devices/platform': KERNELS=="platform" SUBSYSTEMS=="" DRIVERS==""