Comment 19 for bug 988079

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [nvidia] Dismal compiz performance on HP Z600 with 30" landscape monitor

Kenneth, All,

I have been profiling and debugging compiz with the nvidia driver today and have found some unexpected performance bottlenecks that we previously didn't know about:

1. NVIDIA driver 295.* changed; they have now changed the default setting of "Sync To VBlank" in the driver from enabled to disabled. Being disabled means apps (like glxgears or Chrome) will throw damage events at the server completely unthrottled. And compiz has to handle a lot more than it used to (when Sync To VBlank defaulted to on).
So two fixes are required for this:
  (a) Enable "Sync To VBlank" in nvidia-settings. And remember to log out/in again.
  (b) Compiz needs to be more efficient in damage event handling. I'm looking into this but see also #4 below.

2. NVIDIA driver 295.* changed again, and apparently dropped all MESA GLX extensions. Compiz usually defaults to using GLX_MESA_copy_sub_buffer to redraw small regions of the screen efficiently. If it can't use that then it will fall back to glCopyPixels which is slow. But those are not the only two rendering options compiz has...
Solution: Enable CCSM > Workarounds > "Force full screen redraws (buffer swap) on repaint". This will force compiz to use glXSwapBuffers, for better hardware acceleration.

3. `CCSM > Workarounds > "Force full screen redraws (buffer swap) on repaint' was not working before, but it will now. It wasn't working because of #1, which is required for compiz to enable GLX_SGI_swap_control for more efficient pipelining of frame rendering. If you enable #1, then this workaround will now provide the boost that it didn't yesterday.

4. (bug 1005569) A simple stupid bottleneck has been found in compiz event handling which was amplified by #1. This has been fixed and the fix will be in the next update for compiz (timeline still uncertain).