Default desktop is too cpu hungry when idle.

Reported by Brian Brunswick on 2006-05-15
24
Affects Status Importance Assigned to Milestone
Ubuntu
Dapper
Undecided
Unassigned
linux (Ubuntu)
Medium
Unassigned
xorg (Ubuntu)
Undecided
Unassigned

Bug Description

Fully updated dapper as of 15/5/06.

An empty gnome desktop apart from top running in a terminal:

Tasks: 118 total, 1 running, 117 sleeping, 0 stopped, 0 zombie
Cpu(s): 24.8% us, 17.7% sy, 0.0% ni, 46.0% id, 0.0% wa, 6.2% hi, 5.3% si
Mem: 1294440k total, 395256k used, 899184k free, 9472k buffers
Swap: 979924k total, 0k used, 979924k free, 230976k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 6130 root 15 0 31168 20m 7548 S 4.0 1.7 0:21.80 Xorg
 6301 brian 15 0 33896 14m 9368 S 4.0 1.1 0:09.54 gnome-terminal
 6262 brian 16 0 55128 9032 7260 S 3.3 0.7 0:04.87 gnome-cups-icon
 6411 brian 16 0 2200 1136 856 R 2.0 0.1 0:01.61 top
 4667 cupsys 16 0 4060 1872 1368 S 1.3 0.1 0:06.28 cupsd
 6288 brian 15 0 29260 9452 7584 S 0.7 0.7 0:01.53 gnome-netstatus

What on earth is 24% CPU use?
Another distro shows more like 1% in the same situation. Something is wrong.

Is this an xorg thing?

brian@ecthelion:~$ grep Driver /etc/X11/xorg.conf
        Driver "kbd"
        Driver "mouse"
        Driver "synaptics"
  Driver "wacom"
  Driver "wacom"
  Driver "wacom"
        Driver "nvidia"

It also happens with nv driver.

This is on an acer laptop, 1.6MHz Pentium M. I had to raise the cpu limit on powernowd to get it to step down to 800KHz.

Brian Brunswick (brian-ithil) wrote :

Hmm..

See also a recent discussion on backports-users @ lists.backports.org about xorg cpu heaviness.

I am experiencing this also on my Pentium M / Radeon x300 laptop. My coworkers laptops (Gentoo, Fedora Core 5, Centos) are all stready at 99% idle in the same situation, where as I am all over the place 10 - 100% idle.

My entire desktop is sluggish because of it. I've tried using both the 'ati' and 'radeon' drivers.

Jordan Kanter (jikanter) wrote :

I can confirm this bug on an i686 pentium 3 dell inspiron 8500

The problem only occurs on my laptop. My desktop machine runs fine. They both are running Kubuntu 6.06, fully upgraded.

swoke (swoke) wrote :

I got the exact same trouble.

I've tried "noapic" in grub options, but nothing change...

amki (sirhelmchen) wrote :

Same here on an Pentium 4 HT 3,4GHz...

João Silva (a28123) wrote :

try doing this:

echo 1 > /sys/module/processor/parameters/max_cstate

Does it solve your problem?

I have the same problem with my laptop (Dell M70). Even writing in the gnome-terminal has some strange lag before changing max_cstate. I guess this high CPU usage has something to do with SMP in the kernel.

Hmm... it doesn't help. max_cstate was 8 by default, setting it to 1 seems to have no effect. (XOrg cpu usage still sits around 10% even with nothing but a top update every 2 secs) But something is screwy with the kernel's cpu usage reporting: I was trying to find out if the figures could be trusted and look:

This is on a Pentium M 1.6. Note the two bash instances at the top - they
are both running while true ; do true ; done loops.

This is a steady state....

Now /proc/cpuinfo shows only 1 cpu.... what is going on? Is this some new super new version of hyperthreading that has more instances?

top - 20:57:37 up 10:20, 5 users, load average: 1.59, 0.85, 0.57
Tasks: 138 total, 3 running, 135 sleeping, 0 stopped, 0 zombie
Cpu(s): 99.0% us, 0.4% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.4% hi, 0.3% si
Mem: 1294416k total, 696156k used, 598260k free, 135464k buffers
Swap: 979924k total, 0k used, 979924k free, 264580k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26176 brian 25 0 4536 2136 1324 R 99.9 0.2 9:10.68 bash
26190 brian 25 0 4540 2140 1324 R 99.9 0.2 6:45.28 bash
 4653 root 15 0 40384 30m 9384 S 6.0 2.4 507:28.82 Xorg
26167 root 16 0 2196 1132 856 R 3.7 0.1 0:03.59 top
 4582 brian 15 0 50616 22m 11m S 3.3 1.7 23:48.13 gnome-terminal
25528 brian 15 0 143m 77m 20m S 3.3 6.1 13:49.78 firefox-bin
 5655 brian 15 0 49716 29m 7516 S 2.3 2.3 16:02.64 gnome-netstatus

Hmm... this is silly. Now I've got 10 running, all showing 99.9% cpu.

When did the semantics of the cpu usage column change, or is this a bug?

swoke (swoke) wrote :

"echo 1 > /sys/module/processor/parameters/max_cstate"

It works for me.

Can you explain me what is this "max_cstate" ?

Do I need to echo 1 each time I boot ?

Evgeny Kuznetsov (nekr0z) wrote :

Cannot confirm this on Fujitsu-Siemens AMILO M7400 with 1.3 GHz Celeron. Xorg never gets over 2% when idle. As a matter of fact, I'm getting 14% of CPU usage right now, with firefox-bin consuming 3% and slmodemd consuming another 7%.

Dean Sas (dsas) wrote :

no need to keep a task open on Dapper too

Konrad Paumann (kopa) wrote :

I also see that bug on a Thinkpad T40. (P4M 1.5Ghz, Ati radeon 7500).
Running Ubuntu 7.10
uname -a : Linux ibm-laptop 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux

Timo Aaltonen (tjaalton) wrote :

Konrad: disable tracker to see if it helps.

Anyway, this bug seems to be about kernel related issues, and probably fixed already.

its definitely not tracker - it could coincide with firefox though.
top shows xorg and firefox are using considerable cpu time while being idle.

On Jan 30, 2008 5:12 PM, Timo Aaltonen <email address hidden> wrote:

> Konrad: disable tracker to see if it helps.
>
> Anyway, this bug seems to be about kernel related issues, and probably
> fixed already.
>
> ** Changed in: linux (Ubuntu)
> Sourcepackagename: xorg => linux
>
> --
> Default desktop is too cpu hungry when idle.
> https://bugs.launchpad.net/bugs/44912
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Konrad Paumann
Kreuzgasse 52/1/21
1180 Wien
Austria

Hi Everyone,

The Hardy Heron Alpha series is currently under development and contains an updated version of the kernel. It would be helpful if you could test the latest Hardy Alpha release: http://www.ubuntu.com/testing . You should be able to then test the new kernel via the LiveCD. If you can, please verify if this bug still exists or not and report back your results. Thanks.

Changed in linux:
status: Confirmed → Incomplete
Brian Brunswick (brian-ithil) wrote :

Yep, just tried the hardy alpha, seems fine on my hardware now.
Also, cpu usages in top make sense too.

Thanks Brian. Since you are the original bug reporter I'm marking this "Fix Released" against Hardy.

Changed in linux:
status: Incomplete → Fix Released
zoby (mlouro) wrote :

Xorg goes to 35% cpu usage when I open "System Monitor" in Hardy Beta. I didn't test with many other applications, but with most it seems Xorg's cpu usage is between 1% and 5%. I don't know if this is a Xorg or 'System Monitor' bug.

 5643 root 20 0 387m 35m 7208 R 34 3.5 0:27.84 Xorg

My system is and Intel Core 2 Duo T5500 @ 1.66GHz

Bryce Harrington (bryce) wrote :

The original bug is out of date. Comment #18 is a problem in System Monitor, not Xorg.

Changed in xorg:
status: New → Invalid
Maxei (maxei-95) wrote :

I am a debian etch user and would like to report here that the Xorg CPU excesive use is observed in both Gnome and KDE, but the problem is worst in the last desktop. Xorg uses up to 100% CPU. My Xorg version is 7.2. People in some forums have reported that this bug is still present in Xorg 7.3+10 (Debian Lenny). Wow, this bug was reported since 2006. Probably a very difficult to fix? any hope for the future?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments