Help answer threads with 0 replies.
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By craigevil at 2007-01-03 12:13
What to do if the desktop freezes?

In such a situation you dont always need the reset button. This could damage the filesystem or lead to loss of data. In any way the filesystem wont be clean after a hard reset (filesystem not clean). If nothing works, not even changing to a textconsole (alt-ctl-F1) or restarting the X-server (alt-ctl-backspace), there is still hope:
The SYSRQ-key (print-key, on the upper right side of the keyboard) will help you to cleanly reboot a frozen system.

The following sequence of key-combinations are possible:

# ALT+SYSRQ+R (should give back control of the keyboard )

# ALT+SYSRQ+S (issues a sync)

# ALT+SYSRQ+E (Sends term to all processes but init)

# ALT+SYSRQ+I (Sends kill to all processes but init)

# ALT+SYSRQ+U (filesystems are mounted readonly, prevents fsck at reboot)

# ALT+SYSRQ+B (reboots the system, without the previous steps this would be a hard reset).

Best give every step a few seconds to complete, ending all processes for example could take a little while.
The needed letters can be easily remembered with: "Raising Skinny Elephants Is Utterly Boring"

by Indiestory on Sun, 2007-02-18 21:23
i have seen this before and I'm going to have to ask the question. What do i do if i don't have a print key??

by wizcrack.fedora on Sat, 2009-03-14 05:08
Originally Posted by Indiestory View Post
i have seen this before and I'm going to have to ask the question. What do i do if i don't have a print key??
make use of the print screen key on the keyboard.. most keyboards come with it now so you shoul have no worries with this prob..

by ozminh on Mon, 2009-04-27 23:55
this does not work on my desktop(RHE4)

by theacerguy on Tue, 2009-06-09 10:54
ive tried on a frozen one packard bell imedia j4500 with i microsoft 2000 set keyboard and mouse(wireless) kubuntu 9.04

by DragonSlayer48DX on Sat, 2009-06-13 06:47
Originally Posted by ozminh View Post
this does not work on my desktop(RHE4)
Considering the original post was in 2007, the info may be outdated.

by craigevil on Sat, 2009-06-13 07:27
It sitll works but MAGIC_SYSRQ has to be compiled in your kernel.

Controlling the use of SysRq keys

There are some ways of controlling the use of SysRq keys(i.e. what can be used, enabling or disabling them completely), two ways of doing this are:-

1) Configuring the SysRq keys during kernel compilation itself.

There isn’t much here since you can only disable SysRq keys and not actually control or define what you can and can’t use. The option you are looking for is:-


2) Using proc sysrq trigger calls.

This is much more flexible than changing the configuration of the kernel but this has one downside with security which is explained after(since it is very minor). You use the echo command to achieve this for ease but you could also use any normal text editor to achieve this. Now the command is(you will need root permissions):-

echo * > /proc/sys/kernel/sysrqwhere “*” is a number, which can be any one of these:-

0 – disable sysrq keys completely

1 – enable all functions of sysrq

2 – enable control of console logging level

4 – enable control of keyboard (SAK, unraw)

8 – enable debugging dumps of processes etc.

16 – enable sync command

32 – enable remount read-only

64 – enable signalling of processes (term, kill, oom-kill)

128 – allow reboot/poweroff

256 – allow nicing of all RT tasks(control the nice level(priority) of Real Time tasks)

So you can define what SysRq keys can be used, and also define whether they are all on or off.

Now for the “downside”. For example you disable SysRq keys when you want to stop people(local) from doing key presses and then shutting down or messing up the PC during an important task. Now with configuring the kernel, you can stop SysRq keys from being used at all from the beginning of the boot process right uptil the end, with calling the proc sysrq triggers however, your option only takes place when it is executed(i.e. after the system has booted up) so there is a certain area of vulnerability with calling the triggers whereas there is no such thing in configuring the kernel, some people are that desperate to secure their systems to care about a few seconds, however do not blame me for it.

If it doesn't work I would assume it is either not in the kernel or is disabled by something like selinux or some other security feature.

by vharishankar on Sat, 2009-06-13 08:50
Sometimes (and surprisingly this happens more frequently than one might imagine) a freeze is a "hard-freeze" meaning which nothing you can do with the keyboard or mouse will work. You simply have to reset the machine.

Hard freezes occur either due to hardware trouble or a serious memory leak.

by Digital_Resistance on Wed, 2011-06-15 07:03
Thank you for this useful info.

Any updates since the last post?

by jamvilla on Fri, 2011-07-08 18:24

by Gyroman on Sun, 2014-11-23 21:01
Hey.. I have wexperienced screen freeze with Zorin7 when OS system bar at top 'disapeared' and no keyboard action other than Ctl Alt Del or equivalent (didn't know about Alt Sysreq B) so I was intersted in this article. BUT when I tried [Ctrl F1] just to see how getting a terminal worked THAT WAS ALL I GOT... ALL I COULD SEE.. AND COULD NOT EVEN EXIT FROM.

So I had to use the newly learned [Alt-Sysreq-B] it was the only one enabled..??

I could not even kill the terminal process (i was in) but I could list my other world as tty7 but did not know how to get back there from this fixed full screen terminal.?

'exit' only returned mme to the login process..? Where like ground hog day I just kept having to login and try to find a way out but there I could not find any way back..?

Could someone please tell me what is going on after Ctrl F1 gives a full screen tty and how do you get out of it.? Thanks


All times are GMT -5. The time now is 01:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration