Since quite some time I was getting the below error when I am trying to run compiz. I was busy and also was not working in Gnome so did not look at this until today.
compiz (core) – Fatal: Root visual is not a GL visual.
on doing a grep in the Xorg log files found that the error is due to the mismatch of version between kernel module and the nvidia driver. The command to check the errors in the Xorg log file is
grep EE /var/log/Xorg.*
So, whats the solution, there are multiple but the best one is, do the following
modprobe -r nvidia
restart X Server.