Thursday, June 23, 2011

Ubuntu 11.04 slowness and high CPU usage

I noticed extremely high CPU usage on my ThinkPad X40 after upgrading from Ubuntu 10.10 to 11.04 a while back.  This rendered the laptop nearly unusable, heated the system up quite a bit, and kicked the fan on all the time.  This was with the Unity interface disabled (it doesn't work on my hardware anyway) and almost nothing of interest running.

A bit of searching revealed that many others have the same problem: there seems to be an issue with the 2.6.28 series kernel provided with 11.04.  I decided to try a newer kernel to see if the problem goes away without me having to troubleshoot further.  There are a number of ways to do this, but I added the kernel PPA and upgraded the kernel packages:

sudo add-apt-repository ppa:kernel-ppa/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-image-generic linux-headers-generic

and then rebooted.  This gave me the 2.6.39-0-generic which runs much better: the system is nice and cool, CPU usage is quite low, the fan is barely on, and applications run normally.

Hopefully this helps someone out.  As before, it seems that little to no testing was done on a large range of popular hardware.

Update

I had another case of 100% CPU usage and this time it was due to a process, "upowerd" taking nearly 100% CPU.  I don't know how to resolve this one yet but you can get the system back to being usable by simply killing that daemon:

sudo killall upowerd

3 comments:

em said...

Your solution work for me too !

thanks,
-em-

Unknown said...

Good!

Anonymous said...

Thank You. Rascicho