High Xorg CPU usage?

Bug #449196 reported by Michał Gołębiowski-Owczarek on 2009-10-12
This bug affects 21 people
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Nominated for Karmic by Juggler

Bug Description

Binary package hint: xorg

Xorg is usually using about 25% of CPU, sometimes it reaches 30-40%. It doesn't hurt but as I have a Core2 Duo P8600 CPU which is quite fast I assume 25% is quite a large amount of resources. Or am I wrong?

ProblemType: Bug
Architecture: amd64
Date: Mon Oct 12 03:36:20 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Alpha amd64 (20091008)
MachineType: Dell Inc. Latitude E6500
Package: xorg 1:7.4+3ubuntu5
 Socket 0:
   no product info available
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.31-13-generic root=UUID=e53695eb-254d-4e3f-a123-fbad8c303dd9 ro
ProcVersionSignature: Ubuntu 2.6.31-13.44-generic
 xserver-xorg 1:7.4+3ubuntu5
 libgl1-mesa-glx 7.6.0-1ubuntu2
 libdrm2 2.4.14-1ubuntu1
 xserver-xorg-video-intel 2:2.9.0-1ubuntu1
 xserver-xorg-video-ati 1:6.12.99+git20090825.fc74e119-0ubuntu3
SourcePackage: xorg
Uname: Linux 2.6.31-13-generic x86_64
XorgConf: Error: [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
dmi.bios.date: 05/08/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A13
dmi.board.name: 0NY667
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA13:bd05/08/2009:svnDellInc.:pnLatitudeE6500:pvr:rvnDellInc.:rn0NY667:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E6500
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.31-13-generic

Bryce Harrington (bryce) on 2009-10-12
Changed in xorg (Ubuntu):
status: New → Confirmed
Juggler (phil-lancelotte) wrote :

updated to Karmic Beta today (12/10/09) noticed high CPU usage immediately, xorg is using upto 70% cpu power.

Juggler (phil-lancelotte) wrote :

further info,

while following these steps - cpu usage went from high 80's to mid 20%

click on shutdown button - "indicator-applet-session 0.1"
select shutdown
select shutdown - at this point another window opens to say there is another application running (unknown)
select cancel.

machine is now still running at 25% and has been for over 2 hours, functionality for all processes is quicker and more stable and nothing has crashed, but there is still a program running that is unknown.

Bryce Harrington (bryce) wrote :

Compare your process listing (`ps aux`) from this 25% case with the high cpu case (if you can still reproduce the issue). Examine each process listed in the latter case but not the former.

*Usually* high X CPU is caused by some other X client process making too many requests of the X server. These cases aren't bugs in the X server but rather in the client application (perhaps it's stuck in some loop that makes excessive X calls).

These are the only processes that takes at least 0.1% CPU (I did the check with all user apps turned off (except gnome-terminal):

8.5 1.4 1386 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-PIaXTx/database -nolisten tcp vt7
1.1 1.3 2452 /usr/bin/compiz.real --ignore-desktop-hints --replace --sm-client-id 10b7b700b53b73f23125555692718132100000023000024 move resize place decoration animation
0.6 0.3 2524 /usr/lib/gnome-applets/multiload-applet-2 --oaf-activate-iid=OAFIID:GNOME_MultiLoadApplet_Factory --oaf-ior-fd=32
0.5 0.1 2348 /usr/bin/pulseaudio --start
0.3 0.7 2453 gnome-panel
0.1 0.5 2834 kdeinit4: kded4 [kdeinit] e
0.1 0.5 2638 gnome-terminal --geometry=140x40
0.1 0.2 2498 /usr/bin/gtk-window-decorator

Interesting... Sometimes gnome-system-monitor shows me up to 50% CPU usage (e.g. if I move my mouse around very fast), but at the same moment ps shows 8.5% usage of /usr/bin/X. Does that mean that GSM doesn't give reliable information here? What could cause such a difference?

And, btw, I don't know if 8.5% is still a lot or not (seems to be, but who knows).

Juggler (phil-lancelotte) wrote :
Download full text (9.6 KiB)

This is the output of "ps aux"for 85% CPU usage, only showing >0.0%


root 11683 26.1 1.2 20568 12516 tty7 Ss+ 03:23 0:31 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-JoixxR/database -no
gdm 11724 0.0 0.0 3380 716 ? S 03:23 0:00 /usr/bin/dbus-launch --exit-with-session
root 11746 0.1 0.4 13084 4356 ? S 03:23 0:00 /usr/lib/gdm/gdm-session-worker
phil 11777 0.0 0.3 40840 3548 ? Sl 03:23 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
phil 11792 1.1 0.6 26144 6600 ? Ssl 03:23 0:01 gnome-session
phil 11841 3.6 0.1 3124 1332 ? Ss 03:23 0:03 /bin/dbus-daemon --fork --print-pid 8 --print-address 10 --session
phil 11845 0.4 0.4 95084 4520 ? Ssl 03:23 0:00 /usr/bin/pulseaudio --start
phil 11850 3.4 0.4 7776 4724 ? R 03:23 0:03 /usr/lib/libgconf2-4/gconfd-2
phil 11860 0.2 0.6 20472 6196 ? Ss 03:23 0:00 /usr/bin/seahorse-agent --execute gnome-session
phil 11863 0.2 0.2 6052 2264 ? S 03:23 0:00 /usr/lib/gvfs/gvfsd
phil 11875 1.3 0.9 97712 9632 ? Ssl 03:23 0:01 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
phil 11880 0.4 0.7 23236 7340 ? Ss 03:23 0:00 seahorse-daemon
phil 11885 0.2 0.6 18068 6224 ? S 03:23 0:00 /usr/lib/notify-osd/notify-osd
phil 11959 5.1 2.5 60752 25672 ? R 03:23 0:04 /usr/bin/compiz.real --ignore-desktop-hints --replace --sm-client-id 10b0e6270
phil 11960 4.8 2.2 72772 22720 ? S 03:23 0:04 gnome-panel
phil 11962 0.2 0.6 18672 6492 ? S 03:23 0:00 tracker-applet
phil 11964 1.0 1.4 30120 14432 ? S 03:23 0:00 python /usr/share/system-config-printer/applet.py
phil 11966 0.6 1.0 96420 10968 ? S 03:23 0:00 gnome-volume-control-applet
phil 11967 1.4 1.5 42016 15436 ? S 03:23 0:01 nm-applet --sm-disable
phil 11969 0.9 1.2 31500 12464 ? S 03:23 0:00 update-notifier --startup-delay=60
phil 11976 0.5 1.0 27540 11092 ? S 03:23 0:00 /usr/lib/tracker/trackerd
phil 11987 0.8 0.9 28112 9728 ? S 03:23 0:00 gnome-power-manager
phil 11991 0.2 0.2 18056 2616 ? Ss 03:23 0:00 gnome-screensaver
phil 11995 0.2 0.3 33516 3436 ? Ssl 03:23 0:00 /usr/lib/bonobo-activation/bonobo-activation-server --ac-activate --ior-output
phil 11997 0.3 0.3 13496 3068 ? S 03:23 0:00 conky -d -c /home/phil/.conkyrt
phil 12000 0.2 0.2 12864 3004 ? S 03:23 0:00 conky -d -c /home/phil/.conkyrc
phil 12009 10.6 0.4 15368 4312 ? R 03:23 0:09 conky -d -c /home/phil/.conkymid
phil 12011 1.9 1.3 35352 13808 ? S 03:23 0:01 awn
phil 12016 0.8 0.2 12864 2960 ? S 03:23 0:00 conky -d -c /home/phil/.conkyrb
phil 12028 0.9 1.1 47824 11596 ? Sl 03:23 0:00 Awn Terminal Applet n -p /usr/share/avant-window-navigator/applets/awnterm.des


aleandro (aleandrodasilva) wrote :

Updated today from Jaunty to Karmic . The CPU usage is enormous (about 60% each processor on a duo). I confirm this bug at the newest karmic update today. If you need other infos I could post you at demand the result of top, dmsg and lspci -vvnn.

aleandro (aleandrodasilva) wrote :

I tried to kill xorg. It seems that after xorg restart the CPU goes to normal parameters (about 5%). I tried to reboot and at the first reboot the CPU showed a normal behaviour. At second reboot all is as previously reported. I cannot say yet which application is involved in xorg behaviour.

Al Grabauskas (agrabauskas) wrote :

Don't know if this helps hone in on the issue, but here are the symptoms on the box I have that's similarly affected:

- it happens when i have two gui sessions on say vt7 and vt8 logged in as different users
- as i switch back and forth between the two, the Xorg related to the vt that's *NOT* visible goes to 100%
- sometimes it takes a minute or two after a vt switch to go up to 100%.
- when it goes to 100%, it does it suddenly - it doesn't "ramp up"
- it only saturates one of the two cores at any given time, though it does switch back and forth between them over time.
- it does not seem to be related to a screensaver, since it happens in far less than the 15 minutes that's set to kick in at.
- if Ii switch to a text session - say vt1, the high cpu remains with the Xorg pid it was already saturating (i.e. the one *not* visible prior to the switch to vt1). it doesn't saturate the other one.

This is a new karmic beta install, though I also ave an lv with a system that I upgraded into karmic that I could still boot into. That behaved the same way - that behavior is what drove me to try doing a new install.

All fwiw - hope it helps. I'd be happy to supply any info about my system that might be needed/useful.

Bryce Harrington (bryce) wrote :

X is a server which responds to client requests. If the client is posting a lot of requests it will drive up the CPU usage on X; this is not an X bug but rather an issue in whatever client application is driving X too hard. For assistance in troubleshooting issues with high CPU loads for X, see this troubleshooting guide: http://wiki.ubuntu.com/X/Troubleshooting/HighCPU

affects: xorg (Ubuntu) → ubuntu
Bryce Harrington (bryce) wrote :

Note this might be a dupe of bug 439138, which a lot of people ran into.

dariusan (dariusan) wrote :

I have exactly the same symptoms on my mac mini with intel graphics. After first login Xorg consumes constantly 30%. Only re-login helps.Then Xorg returns to normal unnoticeable CPU usage.

quietfanatic (thewallguy) wrote :

I have noticed this on my T61 with intel graphics. Resting CPU usage is around 20-25%, with Xorg taking around 15% and the rest by regular clients which interact with it -- gnome-panel, awn, and conky use about 3-5% constant CPU each. This is more than normal for all of these programs. Logging out and in again reduces all of these to more normal levels (around 0%).

dariusan (dariusan) wrote :

Could somebody put this bug's importance to high?
It is really annoying!!!!
It has been reported a long time ago. The manual workaround with a logout and login makes the bugfix look trivial.

Gilberto Olimpio (golimpio) wrote :

Ubuntu 9.10 64 on HP Pavilion dv6 (intel graphics)
Xorg is really hungry over here.

Al Grabauskas (agrabauskas) wrote :

"X is a server which responds to client requests. If the client is posting a lot of requests it will drive up the CPU usage on X; this is not an X bug but rather an issue in whatever client application is driving X too hard. For assistance in troubleshooting issues with high CPU loads for X, see this troubleshooting guide: http://wiki.ubuntu.com/X/Troubleshooting/HighCPU"

well, i knew that, and i'd poked around through all that before i posted, but i figured i'd better check it out again before replying. i've since messed around with different scenarios the last couple days.

the behavior i described in my previous post still seems accurate. i only get the high cpu if i have another gui login on another vt like vt8 or vt9. the cpu doesn't ramp up afaict unless i start an app in that second session. it doesn't appear to matter which app. once that happens, the high cpu does occurs, and behaves as described in my previous post in some detail, including the high cpu switching to whichever xorg process *doesn't* currently have the console.

i don't pretend to understand x11 except from a high level and very abstract pov - but could it be a kdm thing? (oops - forgot to mention i'm using kde.) anyway - i ask that just cause it seems like the possible connection re the high cpu usage "migrating" to whicever xorg process *isn't* currently being displayed.

just whatever i've gathered - hope it helps.

Brian Takita (brian-takita) wrote :

I tracked my issue to Vino. When I turned off the remote sharing the problem went away.

Al Grabauskas (agrabauskas) wrote :

well, it was a bit of a stab in the dark, but nothing else i'd tried worked.

it seems that if i turn off compositing on one of the two sessions the cpu issue no longer crops up. the jury's still out a bit, but it's been a while - i let it run over night that way, and prior to this, the cpu issue had gotten pretty constant and painful - to the point of kicking in fans and tripling the noise from my box. i could literally hear myself switch from one vt to the other - for a moment, anyway. then it'd crank right back up on the xorg that wasn't currently visible.

this is using kde. i don't know if it applies in any other windowing environment - haven't tried it.

dariusan (dariusan) wrote :

This issue also appears on gnome desktop: don't have cryptsetup, vino or any other gui login running. It is not a duplicate of bug 439138 too. Since that fix has already been released and i still have the problem with xorg using 30% cpu on my intel mac mini after first login.

raghu8linux (raghu8linux) wrote :

my AMD Phenom quad core with 4GB Ram integrated AMD 3300 graphics is running slow and I too found that xorg takes 80% CPU .
is there any fix. I could not find googling.

played around by switching off compiz, tested on KDE and gnome but of no use

raghu8linux (raghu8linux) wrote :

I have a 4gb RAM. the system monitor shows memory as 2.7Gib on ubuntu 9.10 32bit

I have installed Fedora11 32bit for testing if it same, surpricingly it shows 3.4 Gib

Also I tested with Ubuntu 8.10 64 bit version and here it shows 3.3Gib.

is there any bug in the application or any problem in 9.10

Sami Nieminen (sami-nieminen) wrote :

I am also experiencing the high cpu usage by Xorg process with the following scenario:

1. Two X sessions with two users (A and B) logged in
2. High cpu usage is triggered on user A's Xorg in 10 minutes after switching to user B
3. When switching back to user A, the cpu usage drops down
4. After 10 minutes user B's Xorg starts to use full cpu

This is a laptop with core duo. I suspect that the trigger for high cpu usage is the timer for powering off or dimming the display or some other powerdevil setting.

strace for the high cpu using Xorg gives something like this:

setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {94512, 5192525}) = 0
select(256, [1 3 7 9 11 12 13 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46], NULL, NULL, {0, 0}) = 1 (in [46], left {0, 0})
clock_gettime(CLOCK_MONOTONIC, {94512, 5332906}) = 0
setitimer(ITIMER_REAL, {it_interval={0, 20000}, it_value={0, 20000}}, NULL) = 0
read(46, "5\30\4\0Z\241\201\3\217\2\201\3j\0\24\0005\30\4\0[\241\201\3\217\2\201\3j\0\24\0"..., 4184) = 976
ioctl(8, 0x400c645f, 0xbf83a814) = 0
clock_gettime(CLOCK_MONOTONIC, {94512, 7638436}) = 0
ioctl(8, 0x400c645f, 0xbf839424) = 0

Kyu (sayyeah-net) wrote :

In my case, logout-and-login trick didn't work for me.
However, after some frustration, I remembered that I chose "keep local version" option on updating menu.lst. (I was currently on the old kernel, 2.6.28-16.)
When I changed the menu.lst to boot on the new kernel, 2.6.31-14, the problem has gone (amazingly) and xorg keeps CPU usage at around 0.9%.

My system is T61 with Core2Duo 2GHz, Intel 965 video, 500GB HDD and 4GB RAM, Ubuntu 9.10 32bit.
Hope this is useful to someone.

Matvei Fisenko (2matvei) wrote :

Same issue on karmic, kernel 2.6.31-15-generic. System is up-to-date. Hardware is Sony Vaio SZ651.
X process took enormous CPU time and makes browsing in firefox almost impossible.

dariusan (dariusan) wrote :

seems to be fixed by now..
i have updated my system to latest...

No high CPU usage anymore.

dariusan (dariusan) wrote :

nope, not fixed at all. Maybe somebody reverted some patches. After updating Xorg again, I get 30 percent CPU load again!

sfn (safin-poczta) wrote :

still the same about 70-90% of cpu usage on amd64 ubuntu 9.10.

Boboms (boboms) wrote :

I can confirm it on Samsung X118 laptop - Intel 4500 - Ubuntu 9.10 "Karmic Koala" x86, "clean" install.
I found about 70-75% Xorg CPU load after switching to native console mode - vt1, 2, etc. (Ctrl-Alt-F1,F2,etc) and back to vt7 (X11 Graphics mode).
Also I found same loading during about 10 - 15 seconds after wake up from "sleep" mode. The same situation is for both kernels: 2.6.31-17-generic and recently updated 2.6.31-19-generic.
Command in HTOP: /usr/bin/X ...

Sebastian Otaegui (feniix) wrote :

Same here.

T61 - ubuntu 9.10 32 bit

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

direct rendering: Yes
OpenGL renderer string: Mesa DRI Intel(R) 965GM GEM 20090712 2009Q2 RC3 x86/MMX/SSE2

CPU ~58% all the time

Sampi (kalaka) wrote :

Me too :(

After updating to the latest (July 2010) driver and kernel, Xorg takes a considerable amount of CPU.
Restarting the system fixes the problem as well.

Toshiba Satellite A305.
Intel GM956 GPU
Using metacity with compositing.

Sebastian Otaegui (feniix) wrote :

I have experienced something similar to Sampi's box behaviour but it is fixed by restarting X too.

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

metacity with composing too

Thinkpad T61

Can you test with Maverick? And can you tell us what applications you're launching that causes this high CPU usage? Thanks!

Changed in ubuntu:
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Ubuntu because there has been no activity for 60 days.]

Changed in ubuntu:
status: Incomplete → Expired

I am getting this exact same problem happening on my system. I do not know how to pinpoint it though. I am going to be tracking this problem down as long as I can to solve it. I am more than happy to give any developer help in solving this issue as I am a developer myself but not one that works on Ubuntu.

Changed in ubuntu:
status: Expired → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Ubuntu because there has been no activity for 60 days.]

Changed in ubuntu:
status: Incomplete → Expired
jeremias (jeremiasgoni) wrote :

I am getting this exact same problem, everywhere I googled, people said that Xorg is a server and it depends on the other programs if it's using too much cpu. In my case, i found out that if I mute the sound as soon as I start linux, Xorg keeps it's cpu usage under 5%.

Maybe it's not big help, but this could be usefull to pinpoint the problem.

Is there any way I can see what programs are sending "things" to Xorg?

gorgo (filter-my) wrote :

Xorg CPU usage gets quite high too on my Kubuntu 12.04 with both: integrated intel or dedicated nvidia graphics card.

Changed in ubuntu:
status: Expired → Confirmed
gorgo (filter-my) wrote :

Also note the high CPU usage is present with or without composite effects (at least in my case).

McFly81 (christian-lange-81) wrote :

I do have this issue too (Kubuntu 12.04). I have a Pentium Dual E2180 (quite old, I know) with an added ATI Radeon HD 3450 (installed fglrx "8.970-0ubuntu1", download from www.amd.com) to support two monitors (both 1920x1080).
When I do absolutely nothing (only have Google Chrome running), X consumes about 10% CPU Time. When I move a window, this goes up to about 30%.
Is there any information I can provide which could help identify the issue?

Michał Gołębiowski, thank you for reporting this bug to Ubuntu. Karmic reached EOL on April 30, 2011.
See this document for currently supported Ubuntu releases: https://wiki.ubuntu.com/Releases

Is this an issue in a supported release? If so, could you please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 449196

Please ensure you have xdiagnose installed, and that you click the Yes button for attaching additional debugging information. As well, please provide the missing information following http://wiki.ubuntu.com/X/Troubleshooting/HighCPU .

affects: ubuntu → xorg (Ubuntu)
Changed in xorg (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for xorg (Ubuntu) because there has been no activity for 60 days.]

Changed in xorg (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers