How to deal with a frozen screen? [duplicate]

Possible Duplicate:
What should I do when Ubuntu freezes?

My OS is Ubuntu 12.04. Sometimes the screen suddenly becomes frozen, except that the mouse can move around. I have no choice but to hit the power button of my laptop.

In Windows, whenever screen becomes frozen, I just hit Ctrl+Alt+Delete to invoke task manager, which is still responsive, and kill the processes that consumes most resources and are likely the culprit of the freezing.

But in Ubuntu, I don't know what some good way to deal with such a situation.

Thanks!


Solution 1:

Try to switch to a different workspace with Ctrl + Alt + (///). Unless your system is completely frozen it should be able to switch workspaces.

In the new workspace look for System Monitor in the dash, it is like Windows Taskmanager.

you should then be able to "kill" the process by right clicking on it.

If this doesn't work you can restart your desktop without having to do a hard shut-down by logging into one of your virtual desktops Ctrl + Alt + (F1 to F6) then enter the following commands

sudo stop lightdm

you will get a notification: lightdm stop/wait then enter the following

sudo start lightdm

this will restart your Xserver and send you back to the login screen on your desktop or straight to your desktop if you log in automatically.

Note; this is still a semi-nuclear option, it will kill any programs that are running and you will lose any unsaved work but it is safer for your computer than holding the power button.

There is also a text based task manager called "top" that you can access from a terminal or your virtual desktops but it's directions are rather long, you can get information on how it works by entering this into a terminal

man top

and the command to launch the actual "text task manager" is:

top

Solution 2:

There's a safe way to reboot a frozen Ubuntu:

  • Hold down Alt+Sys Rq(PrtScn key)key combination. There will be no visible output,while hold down the key combination,
  • press these keys in the order,one by one

    R E I S U B

    Spells “busier” backwards,and the system will be reboot after B is typed in the safe way.

  • links here

    Solution 3:

    You can switch to another tty by pressing Ctrl-Alt-F2, then type command top to find out which process used too much your CPU or Memory or I/O, then kill it if you want your system be responsing. (You need to consider whether it is safe to cancel a process, usually it's fine. like a browser firefox)