very high CPU usage by Xorg when idle

hi.
i experience a problem with openSUSE 11.2 installation on hp 6830 laptop pc.
when X server becomes idle it’s CPU usage go up into the sky. now that machine is idling at home. i did ssh to it and saw a picture:

top - 15:45:47 up 18:44,  5 users,  load average: 1.17, 1.08, 1.02
Tasks: 182 total,   2 running, 179 sleeping,   1 stopped,   0 zombie
Cpu0  :  3.5%us,  1.5%sy,  0.0%ni, 92.5%id,  2.0%wa,  0.5%hi,  0.0%si,  0.0%st
Cpu1  : 57.5%us, 42.0%sy,  0.0%ni,  0.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2050144k total,  1904456k used,   145688k free,   270340k buffers
Swap:  2096472k total,    22404k used,  2074068k free,   529360k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  P COMMAND
10681 root      20   0  387m 235m  14m R   99 11.8 860:09.07 0 /usr/bin/Xorg -br -nolisten tcp :0 vt
19849 sergey    20   0  666m 229m  30m S    3 11.5  38:25.96 0 /usr/lib64/firefox/firefox
11448 sergey    20   0  101m  41m  18m S    1  2.1  11:23.11 1 /usr/bin/skype -session 10e2e5d8d3000
11399 sergey    20   0  563m  72m  36m S    1  3.6   5:54.62 0 /usr/bin/ktorrent -session 10e2e5d8d3
11446 sergey    20   0 1368m 130m  48m S    0  6.5   3:23.90 0 /usr/bin/amarok -session 10e2e5d8d300
19818 sergey    20   0  8536 1248  864 S    0  0.1   3:19.19 1 top

i saw couple of report about this strange behavior but non of the solutions helped.
that laptop has “ATI Mobility Radeon HD 3430” video card and I use latest (10.3) version of fglrx driver. whith previous drivers situation was the same.

if your system is 64, and if this occurs after you have run
anything Flash (like you tube, etc) then see if you can’t find a
solution in one of these:

http://www.google.com/search?q=site%3Aopensuse.org+high+OR+pegged+%2Bcpu+Flash+64


palladium

hmm. i’ve never confronted those facts. my system is 64bit indeed.
thanks, i’ll delve into this.

I have a Thinkpad Z60t with Intel mobile 915 GM
running openSUSE 11.2 with KDE 4.2 from factory repositories.

100% cpu usage after some idle time has been solved by adding the repository

http://download.opensuse.org/repositories/X11:/XOrg:/11.2/openSUSE_11.2/

and installing

xorg-x11-driver-input 7.4-41.1-i586
  and
xorg-x11-driver-video 7.4-87.93-1-i586

I’ve also added this info to the Novell Bugzilla
Bug 584919 - Xorg uses 99% cpu after short period of inactivity with KDE 4.4

The cpu usage problem has come back again.

I don’t know why it didn’t happen for several hours after updating the xorg drivers. There must have been some other factor that I had altered. I’m back to trying to figure this thing out again.

tsnedd wrote:
> The cpu usage problem has come back again.

did you find the CPU sucker in Flash and ban it from your system?


palladium

Thanks for the tip, but I have an older Thinkpad Z60t with 32-bit openSUSE.
It will use 100% cpu a very short time after a reboot and login to kde. No applications have been run.

I made a mistake earlier in describing my system. Here’s the info right out of the sysinfo:/ page in Konqueror.

OS: Linux 2.6.31.12-0.2-desktop i686
System: openSUSE 11.2 (i586)
KDE: 4.4.2 (KDE 4.4.2) “release 231”

This is the one that has the high cpu usage problem.

My desktop system is as follows:

OS: Linux 2.6.31.12-0.1-desktop x86_64
System: openSUSE 11.2 (x86_64)
KDE: 4.3.5 (KDE 4.3.5) “release 0”

It runs fine. No cpu usage problems.

I see that more KDE 4.4.2 packages are available today. I’m doing an update and will check the results. If it is an interaction between KDE and Xorg it is possible that the problem could be fixed by an update in either one of them.

have you tried just turning off desktop effects?

there are SO many kinks and bugs in KDE4 that i’m still using KDE3,
and will NOT put up with all the turmoil just to have ‘neat’
winkie-blinkie and wobbly-gobbly

ymmv: if you persist in running knife edge software, expect to bleed a
little from time to time…


palladium

In the following tests “ok” means normal operation. CPU usage does not jump to 100%.

* Update KDE 4.4.2 packages.
* Turn off.
  Take off docking station.
  Unplug battery, then plug in again.
  Put back on docking station.
* Boot to login screen. -- ok
* Run Thunderbird (via ssh -X). -- ok
* login (no mouse). -- ok
* Plug in a usb mouse. -- ok
* Open laptop screen. -- ok
* Open konsole. -- ok
* Reconfigure display settings in systemsettings. -- ok
* Shutdown.
  Take off docking station.
* Boot to login screen. -- ok
* Login. -- 100% cpu at 1min 15sec after happy login music.
  Screen dims at the same time cpu usage jumps up.
  Touch mouse and cpu usage returns to normal.
* Shutdown.
* Back on docking station.
* Boot with laptop screen open. -- ok
* Login. -- ok

No problem even after several hours.

The problem seems to not occur when the laptop is on the docking station.

* Take off of docking station.
* Boot with external monitor connected to laptop vga port.  Screen is open.
* Login. -- 100% cpu at 1min 30sec after happy startup music.
  Laptop screen dims at the same time cpu usage jumps up.
  Touch trackpad and cpu usage returns to normal again.
* Suspend to RAM.
* Turn on again.  100% cpu usage after a minte or so.
* Suspend to RAM.
* Put back on docking station.
* Turn on again.  100% cpu usage after a minte or so.
* Turn computer off.
* Turn on again.  After about 1 minute prepare_preload starts running
  and cpu usage is high, but returns to normal again after finished.
  After several minutes of inactivity cpu usage still remains normal.
* Suspend to RAM.
* Turn on again. -- ok
* Suspend to RAM.
* Take off of docking station.
* Turn on again.
  KDE detects that monitor setup has changed.  Leave this window open.
  After a couple minutes cpu usage goes to 100%.  Press ignore on monitor
  setup request window.
* Suspend to RAM.
* Put back on docking station.
* Turn on again.  100% cpu usage after about two minutes.
* Turn computer off.
* Turn on again.
* Login. -- ok
  After several minutes of inactivity cpu usage still remains normal.

This tells me the following:

  1. Having an external display on Xorg has no effect on outcome.

  2. While connected to a docking station the problem does not appear until a reboot or suspend to RAM. This is why I thought that I had fixed the problem yesterday after updating Xorg drivers.

So far I haven’t found anything that leads me to the solution, but I though that I would post the results anyway.

Oh, and I’ve tried disabling desktop effects and it has no effect. openSUSE is, however, using a dynamically generated xorg configuration. I should put a xorg.conf together and try adjusting parameters. I’m pretty sure that disabling desktop effects in KDE is not the same as disabling compositing in xorg.conf.

I may be wrong but it seems to be related to X trying to deal with the external monitor.

You could try to force the configuration (turn on/off the ext mon) using xrandr or whatever tool does that, instead of waiting for X to do it automatically.

It doesn’t seem to relate to suspend/resume, at least not directly.

I’ve also been getting this for ages and have decided to do something about it. I’ve reopened bnc#584919 since I have openSUSE Factory.

When you say it starts 100% CPU 1 minute 30 sec or so after login, is the screensaver on? Is the screen blanked?

What screensaver are you using, after what delay?

What are your DPMS settings (xset -q)?

I experience this problem on my Thinkpad T61 (Intel Xorg driver, 32bit OS, latest KDE 4.4.2) after I unplug it and plug it back in (like when I move it between rooms). The problem will persist until I log out then back in at which point it’s okay until I do the “power cycle” again.

I do not have a screensaver set and the screen does not turn off until after the problem appears. Any time there is no user input for a minute or two the CPU issues shows up. I can watch it on top on konsole.

I also have the problem with high CPU usage of Xorg. It happens to me after 20 seconds of idle time.
32 bits machine here with openSUSE 11.2 and KDE 4.4.2.

I tried killing plasma-desktop, and also disabling all the KDE services in KDE’s system settings (only the ones that can be disabled through the dialog), but the problem still appears.

I didn’t try the “power cycle” stuff, I’ll check it later when I have time.

My only solution until now is to kill kded4 when I plan to let the laptop idle. Then, when I come back, I manually restart kded4.

i’ve been observing my system’s behavior for a while. and i think that using flash is not the case here.
main suspects are: VLC and switching between power saving and performance mode when plugging the machine off/on AC power.

I wanted to note, i got the same issue on Xorg 7.5, this is on a desktop machine.

When going idle, Xorg process uses a lot of CPU resources for no reason.

Still unsolved.

Hi
What happens if you kill the screen saver off (if your running Gnome);


killall gnome-screensaver


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 4 days 13:37, 3 users, load average: 2.67, 0.78, 0.41
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

Xorg starts using enormous CPU resources after only 1 minute of idleing. Screensaver doesent even have time to activate :slight_smile:

Hi
No it doesn’t need to be active, just if the process is running (in the
background), kill it off and see what happens.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 4 days 14:01, 3 users, load average: 0.75, 0.90, 0.57
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

What if im on KDE, how do i kill it?