You are not logged in.

#1 2013-10-08 02:33:02

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Xorg uses unusually high amount of CPU whilst moving cursor

Hello

I've noticed recently that Xorg uses an unusually high percentage of cpu when I move my cursor or when I drag windows. The output from htop shows a spike from 30-90% cpu usage when I start moving my cursor. I don't think this is normal as it loads 1 whole core of my quad core cpu. I've spent the last two days researching on solutions, I've tried various xorg.conf tweaks from the archwiki such as "Option MigrationHeuristics" to "greedy" and I've also tried including "nomodeset" into the kernel parameters with no success. I have a feeling that this issue is related to my graphics card incompatibility with the ATI opensource driver I'm using.

I have a Radeon HD 7770 running on opensource drivers (I've tried to install the catalyst proprietary drivers before but that's another nightmare in itself so I am not willing to use catalyst if this problem is driver related).
I hope that this is merely a mistake I made or a problem with my configuration and not a driver issue.

htop:

PID:262
USER: root
PRI: 20
NI: 0
VIRT: 278M
RES: 53024
SHR: 24572
S: R
CPU%: 101.
MEM%: 0.7
TIME+: 4:01.36
Command: /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-Bf1p6b/database -seat seat0 -nolisten tcp vt1

xorg.conf:
http://pastebin.com/eaPYMSqe

glxinfo:
http://pastebin.com/Ax6m4P93

Xorg.0.log
http://pastebin.com/15FGVDmK

Last edited by mrhpeng (2013-10-08 11:28:30)

Offline

#2 2013-10-08 10:04:06

schatzs
Member
Registered: 2009-03-28
Posts: 16

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Not sure if it will help, but I had been having various performance issues moving the mouse over links in a browser, or dragging windows, unhiding panels... I never saw huge CPU usage spikes but it sure seemed like a mouse or performance related problem.

I tried disabling mouse acceleration (https://wiki.archlinux.org/index.php/Mo … celeration) and my problems went away. I tried this because in my googling for a solution I found a handful of recent reports claiming mouse acceleration was causing various GUI performance issues (lag, stuttering, etc...).

Steve

Offline

#3 2013-10-08 10:33:22

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Worth a try:

echo madvise > /sys/kernel/mm/transparent_hugepage/enabled
echo madvise > /sys/kernel/mm/transparent_hugepage/defrag

Offline

#4 2013-10-08 11:26:27

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

schatzs wrote:

Not sure if it will help, but I had been having various performance issues moving the mouse over links in a browser, or dragging windows, unhiding panels... I never saw huge CPU usage spikes but it sure seemed like a mouse or performance related problem.
I tried disabling mouse acceleration (https://wiki.archlinux.org/index.php/Mo … celeration) and my problems went away. I tried this because in my googling for a solution I found a handful of recent reports claiming mouse acceleration was causing various GUI performance issues (lag, stuttering, etc...).
Steve

I've tried disabling mouse acceleration by changing /etc/X11/xorg.conf.d/50-mouse-acceleration.conf values and doing a reboot, however it did not solve the problem.

brebs wrote:

Worth a try:
echo madvise > /sys/kernel/mm/transparent_hugepage/enabled
echo madvise > /sys/kernel/mm/transparent_hugepage/defrag

I've also tried entering the echo madvise commands as root and had no effect. I'm not sure what I'm changing with these commands, could you please explain?

It's strange because xorg has no problems on my laptop which is also using an opensource ati driver, however it is an older integrated graphics model that is 'supported' according to the archwiki. So I am thinking this is related to my Radeon HD 7770 which according to archwiki is 'partially supported' by the opensource driver at the moment.

Last edited by mrhpeng (2013-10-08 11:27:33)

Offline

#5 2013-10-08 13:14:11

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Do you use a compositor ?


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#6 2013-10-08 20:10:06

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

rebootl wrote:

Do you use a compositor ?

If you mean something like compiz then no. I'm running gnome shell.

Offline

#7 2013-10-08 21:12:27

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Ah, sorry, I was wrong. Your HW accel seems all right. As your config and logs do, to me.
(gnome shell seems to use a compositing windowmanager though)

The only idea I have is to try out the git version: https://aur.archlinux.org/packages/xf86-video-ati-git/
Or you could try another window manager (e.g. openbox) to see if the problem appears there too.


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#8 2013-10-09 09:13:12

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

rebootl wrote:

Ah, sorry, I was wrong. Your HW accel seems all right. As your config and logs do, to me.
(gnome shell seems to use a compositing windowmanager though)

The only idea I have is to try out the git version: https://aur.archlinux.org/packages/xf86-video-ati-git/
Or you could try another window manager (e.g. openbox) to see if the problem appears there too.

Thank you for trying to help. This issue is so frustrating. I've tried to install the git version of the driver however I'm relatively new to archlinux and only successfully booted into gnome once then was unable to boot in the second time. Probably due to some configuration errors on my part I guess. Although the time I was able to boot in, it didnt seem to solve the xorg cpu problem.

I tried running openbox as a standalone wm and it seemed to solve the problem, X was consistently lower than 10% cpu smile. I then tried to change my display manager from gdm to slim. After logging into gnome from slim, the problem was back! It seems the problem is related to gnome.

Maybe I should change my DE and see if that helps.

Offline

#9 2013-10-10 00:49:46

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Update! After some experimenting. I found out that the problem was with my "Steel Series Kinzu V2 Gaming Mouse". I'm not sure if the evdev driver is not handling the acceleration well or something because once I plugged the same mouse into my laptop which is also running gnome shell the problem surfaced there! I then tried a logitec cordless mouse with my main desktop and xorg uses much less cpu, although it still spikes to around 20%.

I tried to disable mouse acceleration again by following the archwiki by creating /etc/X11/xorg.conf.d/50-mouse-acceleration.conf:

Section "InputClass"
	Identifier "My Mouse"
	MatchIsPointer "yes"
	Option "AccelerationProfile" "-1"
	Option "AccelerationScheme" "none"
EndSection

However it did not seem to have an effect.

I am so puzzled as to what to do with this issue? It seems the only way is to either replace my gaming mouse or change to a different DE.

Offline

#10 2013-10-10 00:59:23

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Offline

#11 2013-10-12 07:41:34

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

brebs wrote:

Hello. Thanks for suggesting. I've been busy with work so havn't touched on this issue yet. I searched through the thread you linked and I'm not so sure what I am suppose to be doing with regards to Usb auto-suspend? Sorry I'm quite new to archlinux. I figured from your post in the link that I have to create a file at /etc/udev/rules.d/91-local.rules? I've created a file at such location and input:

 ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="SteelSeries Kinzu V2 Gaming Mouse", ATTR{power/control}="on"

This did not have any effect on Xorg's high cpu consumption. =/

Sorry if I'm not being much help, but I am a newbie and would appreciate it if you could explain what I have to do? smile

Last edited by mrhpeng (2013-10-12 07:42:29)

Offline

#12 2013-10-13 12:11:21

init0
Member
Registered: 2011-04-12
Posts: 37

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Same here -- high CPU load when moving my Logitech gaming mouse, xf86-video-radeon driver.

Do you get less load by lowering your mouse polling rate to say like 125Hz?

https://wiki.archlinux.org/index.php/Mouse_Polling_Rate

Offline

#13 2013-10-16 05:34:29

mrhpeng
Member
Registered: 2013-10-08
Posts: 11

Re: Xorg uses unusually high amount of CPU whilst moving cursor

init0 wrote:

Same here -- high CPU load when moving my Logitech gaming mouse, xf86-video-radeon driver.

Do you get less load by lowering your mouse polling rate to say like 125Hz?

https://wiki.archlinux.org/index.php/Mouse_Polling_Rate

It doesn't seem to help when I follow the instructions in the wiki on changing the polling rate.

Perhaps I'll just have to accept my mouse aint so linux friendly.

Offline

#14 2013-10-16 07:11:25

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Xorg uses unusually high amount of CPU whilst moving cursor

Maybe thread helps:

drm_kms_helper.poll=0

Offline

Board footer

Powered by FluxBB