Adding "compiz --replace" at Startup Applications is a perfectly fine workaround. I found that sometimes this problem is caused by some configuration file. See this bug report at launchpad.
In my case, the problem was caused by a file named "gnome-wm.desktop" at "~/.local/share/applications/" and was solved after deleting it. The content of this file was:
[Desktop Entry]
Exec=gnome-wm
Hidden=true
Name=Window Manager
NoDisplay=true
Type=Application
X-GNOME-Autostart-Notify=true
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Product=gnome-session
X-GNOME-Bugzilla-Version=2.32.0
X-GNOME-Provides=windowmanager
X-Ubuntu-Gettext-Domain=gnome-session-2.0
I added to the startup application "compiz --replace"
Working fine now
If anyone have a better solution (if this is a bad one) please share
– bhappy Aug 07 '11 at 23:12