System freezes are an occasional occurrence across all operating systems, and Linux distributions are not exempt. In this discussion,
we’ll explore four methods to address a frozen Linux system before resorting to drastic measures like unplugging the power cable or forcefully holding down the power button.
Common Signs of a Frozen GUI:
- A specific program becomes unresponsive, preventing the closure of its window.
- Mouse clicks and keyboard inputs yield no response.
- Complete immobility of the mouse cursor.
Implementing the following methods can potentially resolve the issue and restore normal system operation.
Freezing or hanging in Linux can stem from various causes, either related to software or hardware. These encompass challenges such as system resource depletion, compatibility problems with applications, sluggish hardware performance, slow network connections, device or application configurations, and extended uninterrupted computations.
Primarily, the leading concern often revolves around resource exhaustion, commonly resulting in a deadlock. With this in mind, let’s explore five actionable steps to take when encountering a frozen GUI in your Linux system.
Read: How to speed up Linux
Encountering a frozen Linux desktop GUI can be a challenging situation, but there are effective steps you can take to resolve the issue:
- Open the X-Window, which provides a straightforward method to terminate unresponsive applications.
- Execute the command xkill in the terminal to activate the X-Window.
This swift action allows you to selectively close problematic applications and regain control of your desktop environment.
To close an unresponsive application, follow these steps:
- Access the Unresponsive Application:
- Open the unresponsive application window.
- Terminate Using X-Window:
- Observe your cursor’s transformation from an arrow to an X sign.
- Close the Application:
- Click on the unresponsive application window.
- Preferably, click on the exit button within the window.
If you encounter difficulties launching the terminal, you can employ key combinations as an alternative. Follow these steps:
- Open Dialog Box:
- Press Alt + F2 to open a dialog box.
- Enter xkill Command:
- In the dialog box, type the command xkill.
- Execute the Command:
- Hit Enter/Return key to execute the command.
This method proves effective when your graphical user interface (GUI) is frozen, but your mouse remains responsive, allowing you to initiate mouse clicks. However, in situations where even the mouse is unresponsive and cursor movement is impossible, you may need to resort to the second method outlined below.
If you are dealing with a program running in the terminal, stopping it is straightforward. Follow these steps:
- Interrupting Program Execution:
- Press Ctrl + C to send a SIGINT signal, effectively interrupting and stopping the program. In other systems, ‘Delete’ or ‘Break’ might perform a similar action.
- For Non-terminal Processes:
- If the process isn’t running in the terminal, you can stop it using the Process Identification Number (PID). Open the terminal by pressing Alt + F2 to access the dialog box. Type gnome-terminal and press Enter/Return to launch the terminal.
- Identifying and Closing Processes:
- In the terminal, use utilities like TOP or HTOP to view running processes. For instance, launch TOP, identify the process consuming excessive system memory, and proceed to close it.
To kill a process, refer to our detailed guide here.
If the previous methods, including terminal commands, prove ineffective, you can switch to Console mode. Follow these steps:
- Access Console Mode:
Press Ctrl + Alt + F3 to transition to Console mode. This action will replace your
graphical interface with a Virtual Terminal.
- Login if Necessary:
You may be prompted to sign in with your username and password upon entering Console mode.
If you need to exit the console and return to the Graphical User Interface (GUI), simply press Ctrl + Alt + F2.
Similar to the Terminal, the console provides various commands and utilities to halt running processes.
In addition to performing tasks locally, you can manage your system remotely using PuTTY, executing commands seamlessly. For remote access, ensure that an SSH server is running and properly configured on your target system. To address issues and halt a process on a remote Ubuntu server, follow these steps using PuTTY for remote access.
To install PuTTY, execute the appropriate command based on your Linux distribution:
sudo apt-get install putty
For CentOS, Red Hat, and Fedora:
sudo dnf install putty
sudo yum install putty
To start putty, type the target machine’s Ip-address in the section marked in the image. Then, press “Open”. Use the command ifconfig to find the Ip-address of any Linux machine.
If the target PC has a private address, you must be on the same network to access it remotely.
Enter your username and password to log in.
After you connect to the system, you can begin to fix any problems. A common method is to use process utilities to see all the processes running on the system, such as the TOP command.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.