11

whenever I move my mouse enough it causes high cpu usage. Screenshot provided is on a fresh X session.

Xorg Taking up a lot of CPU

This also causes some frequent freeze ups if I'm running some other programs e.g gaming.

[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.

Is there any way for the CPU usage not to be this high?

EDIT:

I tried with other mice. The CPU usage appears to increase with the Mouse DPI or to be exact, a generic mouse will cause a CPU usage spike, but not as much as a gaming mouse.

I also checked if I have hardware acceleration enabled.

$ glxinfo | grep "direct rendering"
direct rendering: Yes

EDIT 2:

CPU is an AMD FX-6350

GPU is AMD RX Vega 56

4
  • Try the Ubuntu Unity Desktop instead of the default Gnome Desktop. I've found the performance much better on my Skylake laptop. Aug 24, 2018 at 17:49
  • I'm using xfce though.
    – Zephyr
    Aug 24, 2018 at 18:01
  • Sorry I missed that tag on my tiny phone :( Aug 24, 2018 at 19:59
  • 2
    As a comparison I have an AMD Kaveri A8-7600 APU and wiggling my mouse side to side adds about 12% to Xorg (up from 0-0.7 to 12-13% CPU). At the same time Firefox goes up to similar, but I can get above 20% if I wiggle it fast! Curious.
    – pbhj
    Nov 13, 2018 at 1:58

1 Answer 1

5

You could try changing the mouse polling rate parameter on the usbhid Kernel module. You can modify its value on the fly by running as super user

echo "4" > /sys/module/usbhid/parameters/mousepoll

This changes the polling rate from the default value 0 (i.e. "unlimited") to 4 ms (or 250 Hz).

Note: Afterwards you will have to replug your mouse in order to see any effect.

Provided that helps, you could make this change permanent by appending the parameter to the line GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub like so

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbhid.mousepoll=4"                                                                                                      

Then run

update-grub 

and

reboot 
1
  • 3
    In my case the high CPU usage stayed the same. I replugged my mouse.
    – Jimmy He
    Nov 7, 2018 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.