打开如下这个配置文件
代码: 全选
/etc/laptop-mode/conf.d/usb-autosuspend.conf
下面的问题就是如何找到自己鼠标的设备ID,可以用如下的命令
代码: 全选
lsusb -xv
...
Bus 002 Device 006: ID 0461:4de2 Primax Electronics, Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0461 Primax Electronics, Ltd
idProduct 0x4de2
bcdDevice 2.00
iManufacturer 0
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 64
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0005 1x 5 bytes
bInterval 10
...
注意看红色加粗部分文字,mouse代表你的鼠标,然后把ID如我的0461:4de2复制
编辑
代码: 全选
/etc/laptop-mode/conf.d/usb-autosuspend.conf
AUTOSUSPEND_USBID_BLACKLIST="0461:4de2"
保存退出,拔掉电源线测试下,是不是鼠标依然正常?

PS:其他的USB外设诸如手写板,U盘,移动硬盘等都可以如法炮制,想不停哪个就不停哪个
