0

I have a device which is being assigned the productId of 1713 by modalias:

$ lsusb -s 001:008
Bus 001 Device 008: ID 1e71:1713 NZXT NZXT USB Device

$ lsusb -t | grep "Dev 8"
    |__ Port 12: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 12M

$ cat /sys/bus/usb/devices/1-12\:1.0/uevent
DEVTYPE=usb_interface
DRIVER=usbhid
PRODUCT=1e71/1713/200
TYPE=0/0/0
INTERFACE=3/0/0
MODALIAS=usb:v1E71p1713d0200dc00dsc00dp00ic03isc00ip00in00

However, I would like to use a program (https://openrgb.org) which recognises this device under the productId 2005

Is there any way to create an udev rule to remap 1713 to 2005?

I have already tried the below unfruitful methods:

  1. modprobe usbhid && echo "1e71 2005" > /sys/bus/usb/drivers/usbhid/new_id

  2. Adding /etc/udev/rules.d/99-nzxt-usb.rules

ACTION=="add", \
SUBSYSTEM=="usb", \
ATTR{idVendor}=="1e71", \
ATTR{idProduct}="2005", \
RUN+="/sbin/modprobe -qba usbhid"

1 Answer 1

1

The productId is USB information and provided by the USB layer, you cannot change this through udev rules.

However, openrgb is open source, and encourages you to add your own devices. So just download the source, modify it, compile it, and if it works, submit a patch.


Vendor and Product are part of the "USB Device Descriptor", which is part of the standard USB protocol. This can be only read from the device, and the kernel makes it available as read.

Have a look here for the descriptor, and here for the request that reads the descriptor.

3
  • Thanks, Dirkt. I will do that. By any chance, would you mind, expanding on how this information is locked by the device? It would be interesting to learn. Does it mean that every vendor has their own ID associated with the Kernel and each one of their registered products also inherits a specific Id? I ask because in this case, gitlab.com/CalcProgrammer1/OpenRGB/-/issues/528, another user seemed to have the productId of 2005 for the same motherboard.
    – zanona
    Commented Mar 18, 2022 at 7:50
  • 1
    See answer for an explanation of the USB protocol (I can recommend reading the whole site). And yes, different product ids for the same motherboard can happen; the vendor of the device can specify the product id, and can do whatever he wants with it.
    – dirkt
    Commented Mar 18, 2022 at 9:17
  • That's gold. Thanks so much. I will definitely read it through.
    – zanona
    Commented Mar 18, 2022 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .