The easiest way to see if it works is to try. Search for kernel.sysrq, and set the desired value. To change this value permanently, edit /etc/nf. To set a different value temporarily, run the following command: sudo sysctl -w kernel.sysrq=value On newer ones, there is more fine control over which commands are enabled.Īny value above 1 means some commands are enabled. On older systems, you had 2 options: 0 & 1. To confirm it is enabled, run the following: sysctl kernel.sysrq As previously mentioned it is compiled and enabled in most distributions. To confirm the option was set when the kernel was compiled, you can attempt to locate your current kernel’s config file in /boot. Compiled and enabled by default in most distributions, only a Kernel Panic should be able to prevent this from working. This is useful in a situation when the entire user stack is dead. If compiled in the Kernel and enabled in a file, Linux provides you with the means to send preset requests directly to the kernel. Linux holds one more feature for situations like this. Don’t give up yet, once again, more than likely an illusion. Sometimes, even switching to a TTY does not work. When everything else fails, talk with the Kernel using SysReq This will kill all child processes and, if all goes well, your login manager will restart presenting you with your graphical login screen.ģ. You can kill the window manager, X server or login manager.You can attempt to kill a defunct program with the kill or killall command.Once you are logged in you have a few options. Your system should regain some stability here this is in parts because the virtual console where X and everything else is running is not a priority anymore. If your attempt to change the virtual console is successful, you will be prompted for your user and password. When dealing with an unstable system, even requesting a change of VC can take a little time, so be a little patient. The above keystroke gives you access to VC 1 through 6. You can request a different VC by pressing CTRL+ALT+F from another VC. Attempting to access another one can give you back control. Linux has multiple VC’s available to you. They are represented on the filesystem as /dev/ttyX. X Window System runs on a Virtual Console ( VC), also referred to as TTY. While it may seem like the root of the User Stack would be X. Remember the stack of programs inside the user stack? Let’s work with this image for a little bit. Sometimes, you will not be so lucky, the system may seem completely dead. Revive a frozen Linux system with virtual consoles (TTY) Xkill kills instantly without questions asked. Xkill works faster than the traditional X icon or right-clicking the window on the taskbar and clicking close. Then you can execute xkill and point the cursor at the defunct window and click it away. If you are lucky, it will popup sooner then later. If you are using a Linux desktop, your first step should be an attempt to use your window manager’s execute command (alt+f2 in Ubuntu) feature. This concept will help newer Linux users understand some of the tasks we will perform later. You can imagine that list of programs, including the X server, as another stack inside the User Stack. More than likely X server, a window manager and some programs. Somewhere inside the User Stack, you have programs running. We want to find a way to avoid a reboot or at least provide the cleanest reboot possible to avoid corruption.įor the purpose of this article, Linux can be seen as a set of 2 stacks: The Kernel Stack and The User Stack. At this point, we are not looking to save any unsaved work. ![]() One can attempt a few tricks with Linux in such a case. Then comes the awful feeling as you push and hold “Power”. Linux is known to be very stable, but even the most stable system can encounter situations that cause it to become unresponsive.
0 Comments
Leave a Reply. |