How to Safely Exit When Ubuntu Freezes / Hangs

- - 1 comment
You’re working tirelessly on your project for hours. You are, as they say, ‘in the flow’. And, for a change, the computer too works flawlessly like never before. What more can you ask for?

However, we all know that days like those don’t come too often. A computer OS, no matter Windows, Mac, or Linux, is prone to hanging, freezing and crashing making our life difficult. What’s more, the constant problems lead to even bigger problems if you don’t exit your system safely during a freeze or hang. Our beloved Ubuntu too goes through these hiccups from time to time and exiting the desktop safely is the user’s number one priority. So, if you’re looking for ways to safely exit when Ubuntu hangs or freezes, here are some handy tips:

What to do when an application is misbehaving?

If you can move your mouse and access the launcher but only one application is hogging all your memory, you might be better off killing it. Let’s say Firefox is running with about 50 tabs open, and you notice a tremendous slowdown of your desktop. Oh yeah, the same kind of slowdown wherein moving your mouse seems like a painful experience. We've all been there.

So, to fix this problem you’d have to either kill Firefox or wait for it to start responding. Usually it’s better to wait, especially if you have 50 tabs open. However, if that isn't working simply press Alt + F2 and type in ‘xkill’ without the quotes.

Now, you’ll see a crosshair instead of your pointer. Simply click on Firefox, and you’ll see your desktop come back to normal.

Ctrl + Alt + Backspace

If your desktop is completely frozen or sluggish, then often times it’s better to restart the X server. This is always a better option as compared to hitting the reset button on your laptop. To start using it, you’d have to enable the option first. Go to ‘System Settings’ -> ‘Keyboard’. Then, go to ‘All Settings’ -> ‘Keyboard Layout’. There, click on a small button that says ‘Options’. Next, find the option that says ‘Key sequence to kill the X server’. Enable the option and you’re done. Now, anytime you get a frozen desktop, simply use the Ctrl+Alt+Backspace combo.

Magic SysReq key in case of a complete freeze

If your system is completely frozen, then you might want to restart it safely using the Magic SysReq key combo. Simply press Alt + SysReq (Print Screen) key then while holding those two keys, press R key for 1 or 2 seconds, then, after a small interval press E , the I, then S, the U, and finally B. Each key from R to B must be held for about 1 or 2 seconds.

So, to sum up, the combo is: Alt+SysReq+R+E+I+S+U+B

The best way to remember this key sequence is by using the mnemonic: Raising Elephants Is So Utterly Boring.

Written by: Abhishek, a regular TechSource contributor and a long-time FOSS advocate.

1 comment

  1. I usually use CTRL-ALT-F1, log in, then do a sudo killall Xorg.

    Interesting article, I'll keep these tips in mind. Hopefully I won't have to safely exit when Linux is freezing though... Ideally, that situation won't arise.