Comment 45 for bug 270377

Revision history for this message
levien (levien) wrote :

Anakin, you're brilliant! I've been trying to track down the cause of this problem for ages, and your suggestion has just helped me find it. Apparently the redraw problems are caused by a race condition, which occurs with compiz in combination with nvidia driver versions above 177.76. According to nvidia developers at the nvnews forums: "[the cause of the problem] is a race condition between the X server and compiz that's the result of a fundamental design problem in the way the Damage extension works." and "[fixing it] will require more changes to the Damage and GLX extensions, the X server, Compiz, and the NVIDIA X driver."

Because it is apparently caused by a design problem, it will probably take some time before the problem is fixed. The only real way to ensure it doesn't happen is not to use compiz. But on some systems it helps to change settings that affect the timing of pixmap uploads to the GPU. You can for instance try to disable the compiz "--loose-binding" option, or play with the powermizer settings.

I just had a look at the wrapper script that launches compiz in Ubuntu. It enables --loose-binding on nvidia hardware (which in turn works around a performance issue with texture binding on nVidia cards), but it only seems to do this when indirect rendering is disabled (the default setting). So in theory this should disable --loose-binding without having to edit the wrapper script or (re)start compiz by hand every time:

mkdir -p ~/.config/compiz; echo INDIRECT=0 >> ~/.config/compiz/compiz-manager

It just adds "INDIRECT=0" to the configuration file ~/.config/compiz/compiz-manager, to force indirect rendering. This will of course degrade performance and disable some effect plugins, but if it works I would much prefer it to having the current redraw problems...

See also:
http://www.nvnews.net/vbulletin/showthread.php?t=120892
http://www.nvnews.net/vbulletin/showthread.php?t=124470