Wednesday 8 September 2010

nvidia, opengl, compositing: play nice!

I was pleased to see this in the ChangeLog for the nvidia drivers 256.53:
"Fixed a bug that caused extremely slow rendering of OpenGL applications on X screens other than screen 0 when using a compositing manager."
Well that sounds nice.  Hands up who runs compiz on an nvidia card with two screens using xinerama?  You might notice your GL screensavers run incredibly slow.  Here's some examples, for testing I used glmatrix which you might be able to run directly via /usr/lib/misc/xscreensaver/glmatrix.

I have a Core(TM)2 Duo CPU T9500 @ 2.60GHz laptop with an nVidia Quadro FX 1600M, 1920x1200 screen and a second 1920x1200 LCD.  I've loaded the new 256.53 nvidia module.  Here are the results:


Compositing manager screen 0 screen 1Performance
none (gnome + metacity) glmatrix @ 1920x1200 nothingFPS: 29
Load: 12%
none (gnome + metacity)glmatrix @ 1920x1200glmatrix @ 1920x1200FPS: 29 (both)
Load: 12%
compiz & emeraldglmatrix @ 1920x1200nothingFPS: 29
Load: 12%
compiz & emeraldglmatrix @ 1920x1200glmatrix @ 1920x1200FPS: 4 (both)
Load: 90%
compiz & emeraldnothingglmatrix @ 1920x1200FPS: 5
Load: 83%

As you can see, there is little difference between one or two full screen gl effects running without a compositing manager.

However, any effects on the second screen while running compiz is enough to drastically degrade performance.

As a second test, I ran six glmatrix hacks at their default resolution (about 640x480) on screen 0 with and without compiz.  The results were the same:
FPS: 14 - 20
Load: 45 - 70%

No comments:

 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan