笔记本电脑使用电池时无线鼠标连接丢失

vol*_*ing 5 mouse wireless laptop

我刚买了一个HP 无线鼠标,但遇到了一些问题。

光标经常变得对鼠标移动无响应。我注意到只有在我的笔记本电脑电池耗尽时才会发生这种情况,并且只要鼠标在 20-30 秒内没有移动,我就必须触摸笔记本电脑的触摸板才能重新连接鼠标。

所以看起来电源管理可能会干扰,但我不确定如何解决这个问题。

编辑: 我完全忘记提及的一条重要信息是,我之前使用的Sweex MI420无线鼠标没有出现此问题。

$ dmesg |grep -i mouse

[    1.279240] mousedev: PS/2 mouse device common for all mice
[    2.205885] input: HP HP Wireless Laser Comfort Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input5
[    2.206071] generic-usb 0003:03F0:8501.0001: input,hiddev0,hidraw0: USB HID v1.11 Mouse [HP HP Wireless Laser Comfort Mouse] on usb-0000:00:1a.0-1.2/input0
Run Code Online (Sandbox Code Playgroud)

$ ls /sys/bus/usb/devices

1-0:1.0
1-1
1-1.1
1-1:1.0
1-1.1:1.0
1-1.1:1.1
1-1.2
1-1.2:1.0
2-0:1.0
2-1
2-1:1.0
usb1
usb2
Run Code Online (Sandbox Code Playgroud)

vol*_*ing 4

我通过更改设置解决了这个问题/etc/laptop-mode/conf.d/usb-autosuspend.conf

根据配置文件中的注释,某些 USB 设备不正确支持自动挂起。

配置中有一个选项AUTOSUSPEND_USBID_BLACKLIST可以为有问题的设备添加 USB 设备 ID 列表,我添加了鼠标的 ID,现在它可以正常工作了。

#
# Configuration file for Laptop Mode Tools module usb-autosuspend.
#
# For more information, consult the laptop-mode.conf(8) manual page.
#


###############################################################################
# USB autosuspend settings
# ------------------------
#
# If you enable this setting, laptop mode tools will automatically enable the
# USB autosuspend feature for all devices.
#
# NOTE: Some USB devices claim they support autosuspend, but implement it in a
# broken way. This can mean keyboards losing keypresses, or optical mice turning
# their LED completely off. If you have a device that misbehaves, add its USB ID
# to the blacklist below and complain to your hardware vendor.
################################################################################

# Enable debug mode for this module
# Set to 1 if you want to debug this module
DEBUG=0

# Enable USB autosuspend feature?
# Set to 0 to disable
CONTROL_USB_AUTOSUSPEND="auto"

# The list of USB IDs that should not use autosuspend. Use lsusb to find out the
# IDs of your USB devices.
# Example: AUTOSUSPEND_USBID_BLACKLIST="046d:c025 0123:abcd"
AUTOSUSPEND_USBID_BLACKLIST="03f0:8501"

# The list of USB driver types that should not use autosuspend.  The driver
# type is given by "DRIVER=..." in a USB device's uevent file.
# Example: AUTOSUSPEND_USBID_BLACKLIST="usbhid usb-storage"
AUTOSUSPEND_USBTYPE_BLACKLIST=""

# Trigger auto-suspension of the USB deivce under conditional circumstances
BATT_SUSPEND_USB=1
LM_AC_SUSPEND_USB=0
NOLM_AC_SUSPEND_USB=0

# USB Auto-Suspend timeout in seconds
# Number of seconds after which the USB devices should suspend
AUTOSUSPEND_TIMEOUT=2
Run Code Online (Sandbox Code Playgroud)