每当我移动鼠标时,它都会导致 CPU 使用率过高。提供的屏幕截图是在新的 X 会话中提供的。
如果我正在运行其他程序(例如游戏),这也会导致频繁冻结。
[1075299.085] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077813.434] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077814.079] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077814.246] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077814.682] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077831.975] (EE) client bug: timer event4 debounce: offset negative (-18ms)
[1077831.975] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
[1077831.975] (II) event4 - Corsair Corsair Vengeance M90 Mouse: WARNING: log rate limit exceeded (5 msgs per 30000ms). Discarding future messages.
[1120008.128] (II) event4 - Corsair Corsair Vengeance M90 Mouse: SYN_DROPPED event - some input events have been lost.
有没有什么办法可以让 CPU 占用率不那么高?
编辑:
我尝试了其他鼠标。CPU 使用率似乎会随着鼠标 DPI 的增加而增加,或者确切地说,普通鼠标会导致 CPU 使用率飙升,但不会像游戏鼠标那样高。
我还检查了是否启用了硬件加速。
$ glxinfo | grep "direct rendering"
direct rendering: Yes
编辑2:
CPU 是 AMD FX-6350
GPU 是 AMD RX Vega 56
答案1
您可以尝试更改鼠标轮询率参数连接USB内核模块。您可以通过以超级用户身份运行来即时修改其值
echo "4" > /sys/module/usbhid/parameters/mousepoll
这会将轮询率从默认值 0(即“无限制”)更改为 4 毫秒(或 250 Hz)。
笔记:之后您必须重新插入鼠标才能看到效果。
如果有帮助的话,您可以通过将参数附加到行中来使此更改永久生效,GRUB_CMDLINE_LINUX_DEFAULT
如下/etc/default/grub
所示
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbhid.mousepoll=4"
然后运行
update-grub
和
reboot