9

Often compiz will crash and leave the keyboard useless. Normally I drop to the console and restart GDM.

Is there a solution where I can start Compiz back up without losing everything in the current session?

compiz --replace &

That's how I usually restart Compiz when it crashes and I can still use the keyboard.

(If you have a tip on how to prevent Compiz from crashing I've posted here https://askubuntu.com/questions/42096/fresh-install-of-11-04x64-displaycompiz-constantly-failing

??? - Am I right that Compiz is failing or is it X?

4 Answers4

11

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.

Eric
  • 909
1

My solution is similar to Eric's solution.

Except I do just type "unity" as it seems to work a lot better for me:

ctrl+alt+f1 - Takes you to command prompt

login
> unity

alt+left to get back the gui.

For me it looks a mess for about 20 seconds. But then, I actually get back all my windows and can continue working like nothing happened.

"DISPLAY=:0.0 compiz --replace &" Did not work for me and I lost a lot of the functionality.

"sudo service lightdm restart" restarts the whole thing and you loose all your windows. Maybe its faster than rebooting.

I believe that compiz is really the issue here and has something to do with too many tabs open. If I flick back to the terminal, I can actually see this bug: "intel_do_flush_locked failed no space left on device" A few people are complaining about it around the internet.

SpiRail
  • 273
1

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.

0

There is this script secReplaceWindowManager.sh.

Each 10s it will check if there is a window manager running, if not, it will start it; you can also replace them at will (currently it supports compiz and metacity).
It is interactive so requires to be run on ex. a xterm like xterm -bg darkorange -e "secReplaceWindowManager.sh;bash"&disown.