我正在尝试在我的 Linux 系统上禁用我的两个 USB 键盘,第一个可以解除绑定很长时间,直到我拔掉然后插件,并且数字锁灯在此期间熄灭。但另一台长时间无法解绑,可能5秒后又会重新连接,此时数字锁灯亮,其他灯会闪烁一次,日志如下:
[505545.210490] usb 3-3.1: USB disconnect, device number 47
[505547.687005] usb 3-3.1: new low-speed USB device number 49 using xhci_hcd
[505547.984255] usb 3-3.1: New USB device found, idVendor=17ef, idProduct=6099
[505547.984258] usb 3-3.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[505547.984260] usb 3-3.1: Product: Lenovo Traditional USB Keyboard
[505548.019948] input: Lenovo Traditional USB Keyboard as /devices/pci0000:00/0000:00:15.0/0000:03:00.0/usb3/3-3/3-3.1/3-3.1:1.0/input/input40
[505548.071999] hid-generic 0003:17EF:6099.002A: input,hidraw1: USB HID v1.10 Keyboard [Lenovo Traditional USB Keyboard] on usb-0000:03:00.0-3.1/input0
下面是我禁用键盘的 shell 命令:
echo "3-3.1" > /sys/bus/usb/drivers/usb/unbind
或者
echo "0003:17EF:6099.002A" > /sys/bus/hid/drivers/hid-generic/unbind
造成这种差异的原因是什么?有没有办法长时间禁用第二个键盘?