Disabling input from a specific device

Resolved

My headphone's usb just broke and keeps sending volume up... Which is annoying to say the least.

I know I can disable the input through Xorg (and will for now), but that doesn't seem like the optimal solution. Is there a more low-level way to do this?

Edit: I managed to figure it out myself. Best way to do this is simply to unbind the device from the driver (keep in mind, this only works if the device only relies on USB for power, if it gets sound from there that will obviously prevent it from doing anything).

For testing just echo PORT_ID > /sys/bus/usb/drivers/usb/unbind

If that doesn't have any unwanted side effects you're golden and you can add a udev rule akin to SUBSYSTEM=="usb", ATTRS{idVendor}=="ID", ATTRS{idProduct}=="ID", ATTR{authorized}="0"

(replacing the vendor and product ID with your USB device's, of course).

Posted Nov 6, 2015, 5:03 PM UTC · edited

12
pi3832v2•

I thought disabling it through xorg.conf was the “low-level way” to do it.

1
TLATEROP•

Low level is directly above hardware in my books, so kernel level disabling. Xorg is an application (granted, a daemon), so that's fairly high level.

Disabling it only in Xorg means I get key presses in my ttys that I don't want. I need to find a way to disable that device completely, preferably without unloading my USB drivers and making no other device work.

1