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 Answers 4

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.

3
  • This got me part of the way there. Some of my workspaces/viewports were missing (only 4 of 9 showed up), and the panel and launcher were missing. I had to give it the ol' "sudo service lightdm restart" unfortunately.
    – colan
    Feb 9, 2012 at 17:10
  • it may be helpful for me. thx
    – Searene
    Feb 17, 2012 at 8:14
  • 1
    Of all the similar answers for this (and related) question(s) I've seen around, this one seems to me to be the most accurate, thanks! The only problem remaining is how to remember it when you need it ;) Jan 16, 2013 at 16:16
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.

4
  • yeah, That's a solution that will work. I like to keep a clean desktop, I don't use icons or a panel. This will work though. May 16, 2011 at 19:12
  • If you have a Terminal open you can use the mouse to copy&paste the needed characters (including a trailing linefeed) into the terminal - that usually works even if the terminal doesn't have the focus. May 16, 2011 at 19:24
  • So I will have to keep something open with the characters needed? I mean I could do character by character of - c o m p i z (space) r e p l a c e (space) & May 16, 2011 at 19:34
  • If you don't have something with the needed chars you first need to run a command that outputs them, maybe using the chars from your prompt. May 16, 2011 at 19:53
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.

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .