Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A few months ago compiz suddenly stopped working. That is, it got to a refreshrate where the redrawing is more than noticeable. It took 5 seconds to redraw a chat window. Ever since I've been using metacity instead, but I've found myself missing some plugins badly.

I found the following solution:

 export __GL_YIELD="NOTHING"; compiz --replace

This works fine, everything is fast again with compiz. But how to make sure this variable is always set whenever I run compiz?

I'm using standard nVidia drivers, failed to get the open source ones working.

share|improve this question
Just create a launcher and put it into startup applications.. – karthick87 Dec 18 '10 at 14:39
That will slowdown booting, as it will reload the window manager on boot. First time compiz will boot very, very slow. – Dykam Dec 18 '10 at 14:42
up vote 0 down vote accepted

You can make the script and edit /desktop/gnome/session/required_components/windowmanager to point to that script, then gnome-session will still only start compiz once but will use your script to do so.

Or, if it still works, you can put 'export __GL_YIELD="NOTHING"' in your ~/.gnomerc file.

share|improve this answer

You could create a simple script to launch Compiz with:

# /bin/sh
compiz --replace &

Name it something like launch-compiz, make it exacutable (chmod +x launch-compiz), and place it somewhere in your PATH like /usr/local/bin Then simply typing launch-compiz in the Alt-F2 run dialog or a terminal will work.

Alternatively, if export __GL_YIELD="NOTHING" doesn't have any ill effects under Metacity, you can add it to your ~/.bashrc file. That will ensure that that environmental variable is always set. Then you can just luanch Compiz as you normally would.

share|improve this answer
Making such a script is pretty easy, only that doesn't of course work with how Gnome launches compiz the default way. Besides, what is the & for at the end of the script? – Dykam Dec 20 '10 at 10:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.