Forcing compiz to use ccsm settings and play better with nVidia
Desktop effects are cool. But they are getting way cooler when you use tools like ccsm, which give you total control over all those fancy effects that you can show off to Windows users, or your (girl|boy)friend, or even to yourself while there’s nothing else to do. However, regarding a huge number of plugins and/or options available in ccsm, setting all things up nicely takes quite a while. It is rewarding, but again – you wouldn’t rather go through all of this again, would you? But what to do if your precise compiz setup suddenly refuses to work, leaving you with plain and default (and boring) settings, that are far away from being cool as you wanted? Read on.
That is exactly what happened to me lately: I’ve ran my Smart Package Manager to find and install all available updates as usual, rebooted machine, and then noticed that all my compiz settings were gone, being restored to default but not-so-cool values. Moreover, trying to restore ccsm config from backup file didn’t work either. Great! Someone, somewhere decided to change the way standard system packages work, and after my usual system update I’ve been left all alone with a problem. Whoever did it: good work! Keep it up! Anyway, google is always handy, so I’ve ran into couple of interesting pages, and found out the following:
- In order to make compiz use ccsm setting instead of whichever else, it needs to be started with
--replace ccpparameter. - I was always wondering why is my office laptop fitted with built-in Intel video card is always performing a way better in terms of rendering 3D effects than my home machine with dedicated nVidia video adapter. That was a great mystery of all times for me, until I’ve learned that
--loose-bindingparameter does the trick, and now I can enjoy shiny effects on my desktop without a single glitch.
Bored by reading? Here’s the juice
So, the only thing left is to actually make it work each time I log into my desktop. The easiest way of doing this, is adding new item in System -> Preferences -> Personal -> Sessions dialog. Click New button, give it Compiz done right name and following command:
compiz --replace ccp --loose-binding
WARNING! Above command DOES NOT apply to Intel video card equipped machines! For Intel machines you first need to add following line somewhere into /etc/profile file:
export LIBGL_ALWAYS_INDIRECT=1
And then as a new command for your session:
compiz --replace ccp --indirect-rendering
Enjoy.
Sources:
Compiz Fusion Wiki – Troubleshooting
Compiz Fusion Wiki – FAQ