There’s no questioning that Linux is one of the most stable operating systems prevailing in the market, but it has its limitations as well. Since the OS functions on scripts, codes and kernels, there is always a possibility that it will crash. And, one of the common crashes in a Linux environment is the freezing of the X server. No matter how hard you try to bring the interface back to life, it just doesn’t respond.
These freezes often occur in workstations which have a graphical user interface. Due to some unknown bugs created in the graphical hardware or software, the entire screen along with the windows and tabs become still and unresponsive. Though the mouse can be hovered around the screen, the OS fails to receive any inputs. Earlier, the only way to fix this issue was by rebooting the entire system, which resulted in a loss of any unsaved programs and tasks. But that need not be done anymore, as there are four other alternate solutions to coming out of this freeze.
The Keyboard Shortcut:
We all know that the keyboard shortcut Ctrl+Alt+Backspace was disabled by the developers after they received back to back complaints from users, claiming loss of work and data, when pressed accidentally. This shortcut, which restarts the X server can be enabled, and is perhaps one of the most instant ways to fix the server freeze. To enable this shortcut, users need to reach the ‘Options’ tab under the ‘Keyboard Utility’ window and check on the dialog box. Once enabled, press this shortcut to restart the X server. Now, don’t ask me if you can use the same keyboard combination with other issues, because this action is triggered by the X server and will not respond if the freeze is due to other reasons.
Toggle between Various Consoles:
Linux OS offers its users a number of virtual consoles. Out of all, only one console runs on the X server, while the rest run on text consoles. During a frozen condition, you can use the keyboard shortcut Ctrl+Shift+Fx [where ‘x’ represents the console number, which ranges from F1 across F7] to recover. The Function Key ‘7’ represents the X server and users can use the other function keys (1 to 6) to toggle to a different console and type in the command to restart the X server. This is a convenient way to kill the freeze, but the only issue is that the coding to restart the X server depends upon the user’s display manager.
The Unharnessed Potential of SysRq Key:
The SysRq key in Linux plays a very vital role in system troubleshooting. It has the ability to respond to inputs even if the computer is dead, because the command from the SysRq key directly reaches the kernel of Linux OS and is initiated from the OS’s keyboard driver.
At times, there may arise a situation where the X server has taken over the keyboard and not even a single keyboard combination is responding to the input. In this case, you can press the combination Alt+SysRq+r to dispossess the keyboard functions from the X server. Once done, you can use the above mentioned shortcuts or use the combination Alt+SysRq+k to kill the X server along with other applications and programs.
Linux offers another set of keyboard combinations, which ultimately reboots the entire system. If you haven’t got anything important open and want to fix a server freeze, this combination may prove helpful. Do not tap, but hold the keys Alt and SysRq and while holding, type in the following command sequentially as mentioned: “reisub”. In case you’re wondering, here’s what the code stands for:
r – Retains the keyboard control from the X server
e – Initiates a signal to end all processes
i – Kills every process and closes them forcefully
s – Empties the cache data
u – Mounts back the system’s read only files
b – Restarts the computer
In Linux, SSH offers a comprehensive remote operating environment and allows the user to transfer files, streamline traffic and deploy file systems remotely. It is encrypted and provides a safe and a private environment to execute any remote tasks. During a server freeze, SSH can be very well implemented to kill the server over the networks. For users who have an SSH setup in their Linux system, they can simply log in to the server from another system and type in the command to terminate the graphics manager respectively. This forms a convenient way to recover from a frozen server screen and get back to what you were up to.
These are some of the alternate methods to fixing and coming out of an X server freeze, without actually losing any current data. The next time you encounter such a situation, follow any one of the procedures mentioned and get back to your work almost instantly. If you continue to have problems with your computer it may be worth contacting your IT support provider.
About the Author
This is a guest post by Lance Goodman of dishtvoffer.com, a site that offers savings and current information on Dish TV. Click here for more info as well as dish.com services.