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

On my system, Ubuntu freezes occasionally. The entire display becomes unresponsive - the mouse still moves but nothing happens on click, and with the keyboard I can press Ctrl+Alt+F1 to go to a login prompt.

When I log in from the prompt, it appears all my programs are still running as normal. Yesterday for example I was converting some videos and running top showed the avconv process still running. I left it going for several hours and eventually it had completed the task perfectly. (What actually appeared to cause the freeze was opening Transmission from the notification area, but killing the process from the command line didn't make the system responsive again.)

Anyway, after reading through this question it seemed like restarting the GUI was the way to go. So I ran sudo service lightdm restart but it closed all the programs down when logging out.

So for future use, is there a way to restart only the GUI and go back to exactly where I was? Everything else in the linked thread is about rebooting or restarting the OS.

share|improve this question
I know that it's possible to run a parallel X session (e.g. on Ctrl+Alt+F8), keeping that one running. But I don't know how. – bohdan_trotsenko Oct 31 '12 at 20:19
in that situation the X server got broken, but didn't close the connection to the running apps, so they continued to 'work' – bohdan_trotsenko Oct 31 '12 at 20:21
up vote 1 down vote accepted

The answer in a single word:


Unfortunately X applications which are running will be terminated when X closes. Since closing the X server, and restarting is what fixes your problem... there is probably no way around it.

share|improve this answer

Try simply typing unity --replace. This should restart Unity without stopping any running programs.

share|improve this answer

I have this problem also and so far there's no fix (if it's a bug) or a better solution without losing all the open applications.

But right now the only way I can restore the whole thing without closing the applications and restarting, since I can still open a terminal (Ctrl + Alt + F1) I just do a pm-suspend which suspends the machine and just start it again. I does restart it but at least I still have the applications open the same way before the freeze started and it only takes a few seconds compared to a couple of minutes when rebooting the machine.

Hopefully that will help someone temporarily till this thing gets a fix.

share|improve this answer

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.