XOrg causing high CPU in Ubuntu
Having added the system monitor applet to my taskbar panel, turns out while running ubuntu my latop was running at about 40-50% CPU. Less than ideal considering Ubuntu should be speedy
Turns out, the Xorg process was hogging the CPU. By running the command top at the terminal as root, it was easy to see this. A bit of background… Xorg provides the graphical enviornment for linux, usually referred to as X or X11. It is commonly used with other windows managers like GNOME or KDE.
In my particular case, my laptop comes with an NVIDIA 8400, and I ran across this post:
The url seemed to describe exactly the issue I was facing. So I went ahead and applied the fix. It is an edit of the Xorg config file located at /etc/X11/xorg.conf. All that is needed is to add the line Option “UseEvents” “on” under the “Device” section. This basically instructs the Xorg software to offload some functions to the video card. In some instances, Xorg will start consuming resources while waiting for the hardware to process a particular function. Instead of waiting for the hardware in such a resource intensive manner, Xorg sets a hardware poll so the video card will notify the XOrg software once its done instead of having the software polling the hardware continuously.
This tip reduced my Xorg CPu usage to 2-10% 🙂