PDA

View Full Version : [SOLVED] Xorg periodically spikes in CPU usage



physiker
June 24th, 2010, 04:59 AM
I just upgraded from Ubuntu 9.10 to 10.04 LTS, and my system seems to have developed a weird problem. Every few minutes, especially when I'm using chrome, VLC, or the screensaver is running, Xorg will start to spike in its CPU usage - spikes occur several times per second, and generally go up to 50-100%. Spikes seem to be composed of half "System" and half "User" according to my System Monitor applet thing.

Weirder than the problem is the thing which seems to stop this behavior - going to a terminal which is running top and hitting enter a few times seems to invariably return the CPU usage to usual (within seconds). There does seem to be a ~10 second period where the system monitor shows a few % "System" activity. Xorg starts up again with the same spikes within minutes, however.

EDIT: It looks like almost any keyboard input to any terminal also stops the Xorg CPU use - things which change the state of the other terminal, e.g. hitting the spacebar, typing a letter, will work, while hitting CTRL or SHIFT does not suffice to return the CPU use to normal.

I'm using an NVIDIA proprietary driver (which system->administration->hardware drivers says is (version current) and Recommended). My graphics card is a GeForce 9400 GT. I'm using Kernel 2.6.32-22-generic, and x86_64 Ubuntu.

Any ideas? Let me know what other information would be helpful to post, and thanks in advance.

Here's my xorg.conf file:


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@crested) Sun Feb 1 20:25:37 UTC 2009

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder62) Tue Mar 24 06:15:32 PST 2009

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Keyboard0" "CoreKeyboard"
# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
# InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

Section "ServerFlags"
Option "Xinerama" "0"
EndSection

# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#
# # generated from default
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/psaux"
# Option "Emulate3Buttons" "no"
# Option "ZAxisMapping" "4 5"
#EndSection

# commented out by update-manager, HAL is now used and auto-detects devices
# Keyboard settings are now read from /etc/default/console-setup
#Section "InputDevice"
#
# # generated from default
# Identifier "Keyboard0"
# Driver "kbd"
#EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Gateway FPD1730"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9400 GT"
EndSection

Section "Screen"

# Removed Option "metamodes" "CRT: nvidia-auto-select +0+1050, DFP: nvidia-auto-select +0+0"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "CRT: nvidia-auto-select +0+13, DFP: nvidia-auto-select +1280+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection

VH-BIL
June 24th, 2010, 05:19 AM
Are you sure it is Xorg?

Have you tried

top
in the console to find out what is using all the CPU?

physiker
June 24th, 2010, 06:23 AM
Yes; as I mentioned, top is the way I am able to get the problem to go away momentarily.

Here's a prototypical example of what top displays for Xorg during one of these spiking episodes:



PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
...
1420 root 20 0 177m 84m 33m R 52 2.1 184:29.56 Xorg

VH-BIL
June 24th, 2010, 06:07 PM
Try using the vesa driver just to see if it is a driver problem.

physiker
June 25th, 2010, 12:14 AM
I hit remove in the 'Hardware Drivers' GUI about an hour ago (I assume this now means I'm using the vesa driver? - that package is definitely installed...) So far, despite using VLC and chrome, Xorg has behaved.

So, looks like it's a graphics card issue..

VH-BIL
June 25th, 2010, 12:18 AM
try a driver at:
http://www.nvnews.net/vbulletin/showthread.php?t=122606

physiker
June 25th, 2010, 08:34 AM
Alright, that seems to have done it [no problems for several hours]. Thanks for your help!

VH-BIL
June 25th, 2010, 08:47 AM
Did you try the nvidia driver from the nvidia site?

physiker
June 25th, 2010, 09:53 AM
Indeed - I got the 64-bit version of 256.35 from the link you posted, and roughly followed the instructions at
http://jeffhoogland.blogspot.com/2010/04/installing-nvidia-driver-in-ubuntu-1004.html for installing it.

VH-BIL
June 25th, 2010, 10:01 AM
If the plymouth boot screen is not working after installing that driver you can use this:
http://news.softpedia.com/news/How-to-Fix-the-Big-and-Ugly-Plymouth-Logo-in-Ubuntu-10-04-140810.shtml