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.
- 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
- 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>.
- 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.