How do I recover when Compiz crashes?

Solution 1:

If it's "just" a compiz crash, you should be able to restore it from one of the TTYs, even if the keyboard isn't working in X.

  1. hit ctrl+alt+F1 to get to the console

  2. Login with your usual username and password

  3. Type the following:

    DISPLAY=:0.0 compiz --replace &

  4. If compiz is still really hanging, you may need to kill it with more authority and try again:

    killall -9 compiz

    DISPLAY=:0.0 compiz --replace &

  5. Then hit Alt+Left Arrow until you get to the screen where X is running.

Solution 2:

If the mouse is still working after such a crash you could add a starter for /usr/bin/compiz --replace so you can start with a mouse click.