Smoother Compiz-Fusion Graphics
Posted: March 16th, 2009 | Author: admin | Filed under: Compiz, Ubuntu | No Comments »How does it work?
Compiz has the same priority as every other application on your computer. This means that if your computer is being bogged down by other applications, your Compiz effects will start to slow down. Windows users may quickly be annoyed by this, because in Windows, the entire GUI is kernal code, giving it a much higher priority. This quick guide allows you to quickly and easily increase the priorty of Compiz.
What You Need
sudo apt-get install compizconfig-settings-manager
If you don’t already have CompizConfig Settings Manager, you are missing out on all of the fun of having Compiz.
The Magic
1. Open up your favorite text editor and copy and paste these 2 lines:
#!/bin/bash pidof compiz.real | xargs renice -5
Save the file as nice_compiz wherever you would like. I saved my in ~/Applications/nice_compiz
2. Make the file executable. This can be done most simply by navigating to it in Nautilus, right click on the file and click Properties. Under the Permissions tab check “Allow executing file as program“.
3. Make a keyboard shortcut to nice_compiz in CompizConfig Settings Manager:
- Go to System -> Preferences -> CompizConfig Settings Manager. Click the General Options button (the first one in the list), and go to the Commands tab.

- Under commands, add the command
gksudo /path/to/app/nice_compiz
Where /path/to/app/ is the location of your text file you created earlier.

- Under the Key Bindings drop down, add a keyboard shortcut for your new command. Do so by clicking the button that says Disabled to the right of your command number. Check enabled, then Grab Key Combination. I chose the arbitrary shortcut Windows + =.
Your Done!
Press your new keyboard shortcut and you should see a password prompt. After correctly entering your password, you will see smoother graphics until you restart.
To double check if it worked, open System Monitor, under Processes look at the Nice value of compiz.real. You can try raising and lowering this value for a higher or lower priority. The minimum value is -20, the lower the value, the better your graphics performance (but lower performance for the rest of your machine).
Know Your Linux? I originally wanted to run this script on startup, but could not find a place to put it where it would be ran as root and compiz.real would already be loaded. If anyone figures this out, please leave a comment on how you did it.