Comment 322 for bug 269904

Revision history for this message
Kyle Brenneman (kyle-brenneman) wrote : Re: Screen refresh problems with nvidia on intrepid

I've attached a patch that fixes the problem.

To give a little more detail on the race condition:

The problem is that when the X server receives a request to do some drawing, it will send the drawing commands to the video driver and then it immediately sends out the damage event. That works as long as the GPU only processes one command at a time, in the order they were given.

But, an Nvidia GPU can handle multiple command streams at the same time. If the X11 rendering takes long enough, then Compiz will try to redraw the screen while the application's rendering is still in progress.

The GL_EXT_x11_sync_object extension was created to fix this exact problem. It lets you use an X11 fence as an OpenGL sync object, so you can make Compiz's rendering wait until any X11 rendering has finished.