A Weird Imagination

How not to fix USB HID errors

The error#

I was having trouble with a USB joystick adapter (an EMS Playstation controller adapter, to be specific). When I plugged it in, it wouldn't work and checking dmesg showed the same error getting generated over and over again (at least once per second):

$ dmesg
...
[81700.968873] usbhid 6-1:1.0: can't add hid device: -71
[81700.968885] usbhid: probe of 6-1:1.0 failed with error -71
[81700.968986] usb usb6-port1: disabled by hub (EMI?), re-enabling...
[81700.968991] usb 6-1: USB disconnect, device number 53
[81701.208025] usb 6-1: new low-speed USB device number 54 using uhci_hcd
[81701.384866] usb 6-1: string descriptor 0 read error: -32
...

The wrong fix#

I decided the sensible thing to do was to reload the driver:

$ sudo modprobe -r usbhid  # Bad idea, don't run this

Read more…