Sunday, June 12, 2011

Nerd Food: High CPU usage with NVidia

I recently bought myself a new shiny i5 Sandy Bridge rig, and I was really looking forward to Debian Testing 64-bit and stable Intel video drivers. No more NVidia and ATI binary drivers, I shouted to the wind! However, being rather averse to reading manuals and being generally stingy, I got myself a cheap deal on a Assus P8P67 motherboard. Yep, you read right, I was blissfully unaware that the P67 chipset didn't allow access to the Intel integrated video card and what I really wanted was the H67 or the Z68. Oh well. I grinned, moaned, cursed and subsequently placed my old and trusty NVidia GeForce 7300 GS on the motherboard.

All was going well, until I started using the machine in anger. For some reason my X server started using 100% of one of the cores, rendering the whole machine unusable for _several seconds_. This was rather disappointing as I have 8 GB of RAM and a Vertex 2 SSD. This thing should fly at all times. And indeed it did fly using nouveau - except nouveau gave me really low resolution (and of course no composition).

After much, much digging I finally figured out the problem. You need to have option UseEvents set:

Option "UseEvents" "True"

Now the machine is 100% responsive 100% of the time, even under high load! However, for some reason I'm still unable to run compiz even though composition works just fine under metacity. Oh well.


Sadly, my good-feeling didn't last long. Although the machine was hyper-responsive when I was using, my screen went totally black when I left the computer running overnight. Black Screen of Death you could call it. I guess this is what they meant by instability associated with UseEvents. Oh well. On the plus side, I've tried a few other options nicked from the Compiz NVidia page and things actually seem ok for the moment - knock on wood. The options are:

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "RenderAccel" "on"
Option "UseEvents" "false"
Option "RenderAccel" "True"
Option "DamageEvents" "True"
Option "TripleBuffer" "True"
Option "BackingStore" "True"

Notice UseEvents is set to false.