# [SOLVED] direct kernel commands

## Lovot

Is it possible to basically have a keyboard shortcut that tells the kernel to kill X in the event it freezes. Some things segfault and freeze my screen, and X has the keyboard under it's control, so I can't kill X, even when ctrl+alt+backspace still worked.Last edited by Lovot on Mon Dec 14, 2015 12:58 am; edited 1 time in total

----------

## depontius

Look up the "Magic SysRq Key".  It's not all-powerful, but it does grab the keyboard out from under X, let you sync your drives, remount them read-only, then reboot or power off.  There's more it can do, but those are the important things.  If there's any trace of life left in the kernel, it will work.  Take a look in /etc/sysctl.conf, where it's disabled by default, for some reason.

----------

## NeddySeagoon

Lovot,

You want the magic SysReq key and associated keystrokes.

As its a security risk if you have physical access to the console, you will need to check that you have kernel support for it.

----------

## Lovot

Thank you both, it turns out I had magic SysReq enabled the whole time, and it also didn't matter because the X freezes seem to take the whole system down with them, so the only solution I have is to avoid the exact conditions required for a freeze. Will mark as solved.

----------

