Skip to content

Instantly share code, notes, and snippets.

@TBog
Last active July 30, 2021 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TBog/697df1023467872332cfe62ec0b57438 to your computer and use it in GitHub Desktop.
Save TBog/697df1023467872332cfe62ec0b57438 to your computer and use it in GitHub Desktop.

The next time X crashes, don't hit the hard reset button before trying a few other things first:

Try shutting down X gracefully with <Ctrl>+<Alt>+<Backspace>. You may have to first reconfigure your OS to re-enable this key combo, which recent distros have turned off by default. Instructions here: http://askubuntu.com/questions/367983/how-do-i-enable-ctrl-alt-backspace-to-kill-the-x-server If that doesn't work, try switching to a TTY console with <Ctrl>+<Alt>+<F1> and do:

reboot

or

poweroff

Use sudo if you need to.

If that still doesn't work, it's time to try the sysrq methods which will pass system calls to the kernel at a very basic level.

  1. First, try <Alt>+<Sysrq>+<k>. Again, this combo is disabled in a default install. Instructions to re-enable are here: http://askubuntu.com/questions/526691/alt-prtsc-k-not-working
  2. If SysReq key works, you can kill processes one-by-one using <Alt>+<SysReq>+<F>. Kernel will kill the mostly «expensive» process each time. If you want to kill all processes for one console, you can issue <Alt>+<SysReq>+<K>.
  3. Lastly, if all else fails, do REISUB as explained here: https://ubuntuforums.org/showthread.php?t=617349

Only when all else fails should you hit the physical reset button, which is pretty much the nuclear option when it comes to the OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment