Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a device which is using the usbhid driver.

I noticed a module folder inside the driver with a file name quirks.Can anyone tell me the correct way to edit this file and the values it can take?

    root@raspberrypi:/sys/bus/hid/drivers/generic-usb/module/parameters# dir
    ignoreled  mousepoll  quirks

By default it only contains the following value.

share|improve this question
up vote 1 down vote accepted

I believe you can find a list by module with modinfo

$ modinfo usbhid
parm:           quirks:Add/modify USB HID quirks by specifying  quirks=vendorID:productID:quirks where vendorID, productID, and quirks are all in 0x-prefixed hex (array of charp)

And you can give them as parameters while loading a module.

$ sudo modprobe -v usbhid "quirks=0xDEAD:0xBEEF:0x55AA"

I believe you can also just write these into a sysfs file at runtime in some cases. Seems the usbhid is read-only on my (desktop) system, though.

$ echo "0xDEAD:0xBEEF:0x55AA" | sudo tee -a /sys/module/usbhid/parameters/quirks
tee: /sys/module/usbhid/parameters/quirks: Permission denied

I haven't looked into these more and you'll need to find the actual values from somewhere (source, LXR?), but maybe that's a start.

share|improve this answer
The answer was really helpful.I was able to add quirks to the driver using the first method.Thanks. – SteveIrwin Nov 9 '12 at 7:29
Good to hear :) – XTL Nov 9 '12 at 7:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.