-   Linux - Software (
-   -   X Process: Occasional High CPU Load (

Fahrion 07-09-2005 06:51 PM

X Process: Occasional High CPU Load
Okay, this problem has me completely stumped:

Occasionally, my entire system would seem to lag, and the mouse, keyboard, and other running programs would seem to pause and unpause every half-second or so. Running "top" reveals that the X process, which is usually at under 10% CPU usage, jumps to 30%-40% usage, and stays that way. I've tried comparing "ps -A" outputs before and during a high CPU load period, but there are no new or exited processes, and the only difference seems to be in the X CPU usage.

This problem almost always occurs while I'm using Firefox and visiting something image-intensive, which made me suspect at first that it was a Firefox problem, although I've later had it happen in Konqueror, and at least once when I wasn't using a web browser at all. For example, if I try visiting and scroll the view, the problem will invariably occur. Closing the offending program will usually cause X to go back to normal. Minimizing the program will also occasionally solve the problem, as is switching desktops. However, if I try to restore the Firefox/Konqueror window, the problem resurfaces after a while.

I then suspected that it might be an Internet-related problem, as it commonly occurs when I'm using Firefox, and it never happens with Konqueror if I use it in file-browsing mode, but there is no suspicious network activity, and as I've stated before, I've had it happen at least once when I was not using either web browser.

I'm currently running Kanotix, which is Debian unstable with a 2.6.9 kernel. I am using a "non-intrusive" 6.8.2 installation described here: This problem did not occur immediately after I started using the server, so that does not seem to be the issue. This problem has only started recently, possibly after I uninstalled some Debian packages that I wasn't using, although none of them (to the best of my memory) related to X. I can't remember the exact list of packages I removed anymore, anyway. The computer I'm using is a Thinkpad T42 with an ATI Radeon Mobility, and is using the "radeon" driver.

I'd appreciate any help or suggestions that you can come up with.

adz 07-10-2005 05:38 AM

This vaguely sounds like a problem I had. Mind you I had it with FreeBSD but some of the symptoms sound similar. Check out this thread for a description of my problem and the solution that was arrived at. Essentially, just disabling ACPI solved it.

Fahrion 07-10-2005 06:10 PM

You know, I did come across your thread while searching for answers, but I haven't touched acpi settings since I installed Linux on this laptop; furthermore, I really don't want to resort to disabling ACPI since this is a laptop, and I don't want my battery life to suddenly go down the drain. I've also seen many pages recommending ACPI over APM for my particular laptop, and none of them seem to report similar problems. But thanks for the suggestion, and maybe I'll try it out just to see what happens.

I also found another thread somewhere recommending disabling the Composite extension in; however, that didn't seem to work either. I'm not entirely sure whether I did disable it successfully. What I did was put in

Section "Extensions"
Option "Composite" "Disable"

inside xorg.conf. However, /var/log/Xorg.0.log still says that it's still being loaded (it says "(II) Initializing built-in extension COMPOSITE"). Note that the Extensions section was not in xorg.conf before I modified it, so maybe the extension wasn't even taking effect at all. Changing "Disable" to "Enable" doesn't do anything either.

adz 07-11-2005 05:06 AM


I really don't want to resort to disabling ACPI since this is a laptop
Just try disabling it to see what happens. If things improve then it gives you a clue as to what's wrong. If it is ACPI then it's probably a kernel problem so an upgrade and/or compile may be on the cards.

I also found another thread somewhere recommending disabling the Composite extension in; however, that didn't seem to work either. I'm not entirely sure whether I did disable it successfully.
Put the command xdpyinfo | grep Composite and see what you get. If you get nothing, it's disabled. If you get something then it's running.

Fahrion 07-11-2005 07:41 PM

Disabled ACPI: Nope, problem still occurs. I didn't quite realize how how much my system was set up to use ACPI until half a million kernel modules failed to load and cpufreqd stopped scaling, which was expected, but also my (beloved) Trackpoint stopped working as well. Odd.

Composite: Made sure that it was disabled, but still no change. I've now re-enabled it again.

I also tried a different tactic, which was switching back to XFree86 rather than (which, thanks to the non-intrusive installation, involves only changing a single symlink). So far, the problem SEEMS to have stopped; I'll try using XFree for a while to see what happens. If this is the case, then the problem probably lies in some recent change that was done to my configuration.

Fahrion 07-16-2005 04:05 PM

Okay, I think I've finally gotten the problem to a manageable situation. Debian has just added to sarge (Yay!), and so I decided to try out the Debian packages. This immediately caused the following things:

- The problem with the mysterious CPU loads seems to have stopped. I'd still like to know why Debian doesn't have this problem, but my compiled does (and why it didn't initially have this problem)
- I conveniently forgot to un-symlink my non-intrusive installation that I compiled from scratch, so the packages rewrote it. Damn, but oh well.
- A problem that I had with XFree86, which was that the music from amaroK would skip every time I resized/moved/switched windows or tried to open up the K menu or submenu that had a lot of items in it. This happens even if the KDE Sound System is set to realtime priority and buffering is set to max. DMA is already enabled (a common solution I found on the forums for this kind of problem) and my system is reasonably fast.

Seems that you can't win 'em all.

Now, the sound skipping problem REALLY irritates me, and was what caused me to switch from XFree86 to in the first place. Now because that did not occur with that I compiled, I know it's possible for to behave right, and I'd welcome any possible answers to this bizzare behavior.

However, I've got the sound to not skip with the following steps: I switched amaroK's sound engine to GStreamer instead of aRts. Now window switching doesn't cause skips. I then found out that menu translucency was causing a high CPU spike with opening the K menu, and for some reason setting the menu translucency from XRender to Software Blend solves the problem.

adz 07-16-2005 07:47 PM

Yeah transparency is a little dodgy at the moment. Very CPU intensive.

All times are GMT -5. The time now is 04:38 PM.