Comment 37 for bug 151674

Revision history for this message
Felix Gladisch (murky) wrote :

I was searching for a solution for more than one year and I was very frustrated about all these "Enable Sync To VBlank in Compiz"-Answers. So I started to get into this Compiz- and nVidia-Constellation and searched for a solution on my own. And I finally can say: I found it. The Problem is, that Ubuntu is starting Compiz with the session immediatly and is ignoring the VSync of Nvidia. So you have to start Compiz after 'nvidia-settings -l'.

Let's Start.

(I am using the german version of Ubuntu 9.10, so the names of programs can be different, than explained)

1. You have to disable Compiz in Appereance by turning off the Desktop Effects.
2. Create a new Entry in your StartUp-Programs with the command: nvidia-settings -l
3 Create another Entry in your StartUp-Programs with the command: compiz-wait
4. Now open your Terminal and type: sudo gedit /usr/local/bin/compiz-wait

Now copy this text into the Editor:

#!/bin/bash
sleep 3
compiz --replace --sm-disable --ignore-desktop-hints
emerald --replace

Save & Exit.

The last line is optional, it is only necessary, if you are using Emerald.

5. Type in the Terminal: sudo chmod a+x /usr/local/bin/compiz-wait

You can try the command "compiz-wait", if it is not working you must customize the parameter after
compiz. In my case, they are dong the job.

Now restart your computer, after logging in it takes 3 seconds before starting compiz, so wait for that. You can
change the amount of seconds in the script above, if your computer is slow and is showing the Ubuntu Logo, when
compiz starts. In some cases its breaking the script.

I hope, that will help some of you, and even the developers.