I don’t use compiz on my work computer(HP 520 laptop), but I do use compiz on my own laptop which has a NVIDIA 8400GS video card, the main reason I don’t use it on the HP 520 is that: it’s really too slow to run compiz smoothly with the default settings of Xorg and intel driver, but I hear that the 3D performance has been greatly improved in kernel 2.6.29, so I spent some time to get compiz work well with the HP 520(Intel 945GM video card).
glxgears showed me a very disappointed score: only ~90FPS,my god! I decided to upgrade to kernel 2.6.30-rc2-git8(latest ebuild available in Gentoo portage), after the kernel upgrade finished, I rebooted with the new kernel, everything went well except the glxgears score was still super low, and this was a error message said:
Failed to initialize GEM. Falling back to classic.
After searching with google, I was told that PAE(Physical Address Extension) doesn’t work with GEM, yes, I had PAE enabled with my kernel because I had 4G memory installed on this laptop before, but there is only 3G now so I turned PAE off then re-compiled the kernel, but I got another message when I ran glxgears:
xupeng@road / $ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
310 frames in 5.0 seconds = 61.833 FPS
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 1238 requests (1222 known processed) with 0 events remaining.
Google told me that vsync is enabled by default with intel driver, to disable vsync, driconf is needed to change the default settings, so I emerged driconf and then ran driconf with root, change the system-wide settings to disable vsync by default, just like the following screenshot:
the resulting settings are:
# cat /etc/drirc
<driconf>
<device screen="0" driver="i915">
<application name="all">
<option name="vblank_mode" value="0" />
</application>
</device>
</driconf>
After all these were done, I restarted the X server, then glxgears ran with a score of about 1000FPS:
xupeng@road ~ $ glxgears
5201 frames in 5.0 seconds = 1040.175 FPS
5246 frames in 5.0 seconds = 1049.012 FPS
5208 frames in 5.0 seconds = 1041.566 FPS
4970 frames in 5.0 seconds = 993.778 FPS
Well, it’s good enough to run compiz smoothly.