5 Things to do when your Linux system GUI freezes

Got a frozen Linux desktop? Several factors cause your Linux system to become non-responsive. Here are the five things you can do before hitting that Power reset button.

All operating systems freeze at some point and, Linux distributions are no exceptions. In this post, we are going to look at five methods you can apply to your frozen system before thinking of plugging out the power cable or holding down the power button to power off the PC.

Frozen GUI is mostly characterized by:

  • A single program stops responding and can’t close the window.
  • Nothing responds to mouse clicks or keyboard keys presses.
  • The mouse can’t move completely.

Major causes of a Frozen GUI

Some of the common causes that cause freezing/hanging in Linux are either software or hardware related issues. They include; system resources exhaustion, application compatibility issues, under-performing hardware, slow networks, device/application configurations, and long-running un-interruptable computations.

However, the main issue is mostly resource exhaustion, which often leads to a Deadlock. With that mind, let’s look at five things to do when your Linux system GUI freezes.

Things to do when your Linux desktop GUI freezes

1. Close Frozen Applications Using the X-Window

It is one of the easiest ways to kill freezing applications. There are several ways to open the X-Window. One is executing the command xkill in the terminal, as shown below.


Execute command xkill from Terminal
Execute command xkill from terminal

Your cursor will change from an arrow sign to an X sign, as shown in the image below. Click on the stubborn application window you wish to close anywhere but preferably on the exit button.

ubuntu-freeze-xkill cursor sign
ubuntu-freeze-xkill cursor sign

Alternatively, if you are unable to launch the terminal, you can use the following key combinations. Alt + F2 will open a dialog box where you will type the command xkill and hit Enter/Return key.

Using Alt + F2 command to open dialog box
Using Alt + F2 command to open the dialog box

This method is applicable in situations where your GUI has frozen, but you still have power over the mouse, and you can apply mouse clicks. Unfortunately, there are situations where even the mouse is frozen, and you cannot move the cursor. Here, you will need to apply the second method below.

2. Use the Linux Terminal

If it were a program running on the terminal, the easiest way would press Ctrl + C to stop it. This combination sends a SIGINT signal that interrupts/stops the program. In other systems, the ‘Delete‘ or ‘Break‘ can perform the same action.

Stop a program from Terminal using Ctrl + C
Stop a program from the terminal using Ctrl + C

Alternatively, if the process wasn’t running in the terminal, you can launch the terminal to stop it by their (Process Identification Number) PID’s. Press the combination Alt + F2 to open the dialog box. Type the command, gnome-terminal, and hit the Return/Enter key to start the terminal. 

From this point, we will use several utilities to see running processes in the system. One of the standard programs is TOP that comes preinstalled in most Linux systems. You can still use other services like HTOP if installed in your system. Launch the program and close the process that seems to consume much of the system memory.

Use TOP program to Close programs
Use the TOP program to Close programs

For example, in the image above, we will stop Firefox using the PID, which is 4240. Execute the command below.

sudo kill -9 4240

3. Use the Console (Virtual Terminal) to Kill Processes

If all of the above, including the terminal, doesn’t work, you will need to revert to Console mode. To enter Console mode, use press the combination Ctrl + Alt + F3. Your GUI interface will disappear and, you will drop into the Virtual Terminal, as shown below. You might be required to sign in with your username and password.

Press Ctrl + Alt + F3 to drop to Console mode
Press Ctrl + Alt + F3 to drop to Console mode

To come out of the console and return to the Graphical User Interface (GUI), press Ctrl + Alt + F2.

Just like in the Terminal, here, we can also use several commands and utilities to stop the running process. Since I have installed HTOP in my system, I will execute it and kill the processes using their PID’s.

Use HTOP to kill running programs in the console
Use HTOP to kill running programs in the console

Fortunately, with HTOP, unlike TOP, you don’t have to execute the KILL command. Select the process that you wish to stop and press the F9 (kill) key.

4. Use Putty to Login Remotely via SSH

Other than performing the above tasks on your native machine, you can access it remotely via putty and execute the same commands. Here, you will need to have an SSH server running and configured correctly on your target system. In this post, we will use putty to stop troubleshoot and stop the process on a remote Ubuntu server.

To install putty, execute the command below.

  •  Ubuntu/Debian
sudo apt-get install putty
  • CentOS, Red Hat and, Fedora
sudo dnf install putty
sudo yum install putty

Launch Putty
Launch Putty

Launch putty and enter the Ip-address of the target machine in the highlighted section, as shown in the image above. Click “Open”. You can get the Ip-address of any Linux system by running the command ifconfig.

Note, if the target PC is on a private network (i.e., is assigned a private address), you will need to be on the same network to get remote access on the system.

You will have to log in with your username and password, as shown in the image below.

Connect to Frozen system remotely using putty
Connect to Frozen system remotely using putty

Once you have an active session, you can now start troubleshooting for issues on the system. One of the common ways is using process utilities to check for all running processes in the system. In this example, we will launch TOP by executing the top command.

Launch TOP in Putty
Launch TOP in Putty

You can check some of the processes that are consuming the most memory and kill them using their PID’s. Some of the common kill commands include; pkill, kill, kill -9, killall. See the examples below.

pkill gedit
kill [Process_PID]
kill -9 [Process_PID]
killall -u [username]

You can check more options to use with the various commands using the –help option. For example, pkill –help will give you a list of all options you can use with the pkill utility.

5. Use Alt + SysRq + [Option-Keys] in the Console

The SysRq (System Request) is a specific combination of keys used to communicate directly with the Kernel regardless of the system state. It gives users the ability to send low-level commands to the Linux Kernel.

The SysRq key is commonly on the same key as Prnt-Scrn or the Home button. However, this might differ from one PC brand to another.

SysRq Ket on the keyboard
SysRq Ket on the keyboard

To use the SysRq, we will first need to go into console mode, as shown in the previous method. Press the combination Ctrl + Alt + F3. To revert to GUI, press Ctrl +Alt + F2. In case you cannot drop to console, follow the steps below.

Step 1) Press Alt+SysRq+R. It is a combination used to get the keyboard.
Step 2) If you were not able to drop to console previously, now run the Ctrl + Alt + F2 combination again.
Step 3) Press Alt+SysRq+ E. It terms all the processes running on the system.
Step 4) Press Alt+SysRq+ I. It Kills all running and stalled processes.
Step 5) Press Alt+SysRq+ S. It’s a combination to sync all your disks connected to the system preventing data loss.
Step 6) Wait for the OK message on the console. You can also check your HDD lights to see if the sync was successful.
Step 7) Press Alt+SysRq+ U. It re-mounts all disks connected to the system as read-only.
Step 8) Wait for the OK message. However, if it doesn’t appear, wait for 30 seconds and assume it finished then proceed.
Step 9) Press Alt + SysRq + B. Its a combination to forcefully reboot your PC.

All the letters used here follow the order R-E-I-S-U-B. They must be executed in the same order for this method to work on your system. Some of the common mnemonics used for these letters are ‘Reboot Even If System Utterly Broken’ or ‘Raising Elephants Is So Utterly Boring.’

There are more SysRq combinations that you can use on your frozen GUI other than the REISUB. You can find them in the Linux Kernel sources, SysRq Documentation.


Those are methods you can use to recover your system from a frozen state. They are here to save you from using the last resort that would be performing a physical reset or power on/off, which might lead to data loss. If you have another method that works for you, feel free to share it with our readers in the comment section.

Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.


  1. “The SysRq key is commonly on the same key as Prnt-Scrn or the Home button. However, this might differ from one PC brand to another.”

    The majority of keyboards available on residential and small business PCs in the U.S. today are devoid of a label for the SysRq function. It would be more useful to reword the quoted section above state that if this is the case with your keyboard, use the PrtScr (Print Screen) as its substitute, in case the keyboard manufacturer has still met the standard convention. Newbies here might take your advice too literally, and not try the PrtScr key without a designated key on their keyboard.


Please enter your comment!
Please enter your name here




How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

5 Ways to Open a Terminal in Ubuntu

Even though Ubuntu supports many applications with amazing Graphical User Interfaces (GUI), there are always reasons why users prefer using the Terminal to perform different tasks.

How to install Wine on Fedora Workstation

Linux distributions are becoming more and more popular every day, and Fedora Workstation is not left behind. This popularity brings forth the need to run Windows applications on Linux distros like Fedora. Windows has quite some excellent Software that is not available for Linux.


Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

13 ways to use the copy command in Linux (with examples)

Being a Linux user, copying files and directories is one of the everyday tasks that you have to carry out. It can be copying a file to make a backup or copy it to another partition, directory, or external storage drive.

5 Best Application Launchers for Ubuntu

Ubuntu is one of the most used Linux distributions worldwide. It is also the reason why it has the maximum number of available programs for itself. Today we are going to talk about one category of those programs, the application launchers.

Installing multiple Linux distros on a USB drive

A bootable Linux USB drive, which also referred to as a Live USB drive, is a drive containing files that enable a computer to boot into a specific Linux distro. It is most commonly used to test-drive various Linux distros before installing on the computer for use as a daily driver.

10 ways to use the Chown command with examples

Any file in a Linux system belongs to a particular owner(s) and a group. It is one of the many features that maintain security in Linux systems. For example; If a file belongs to say UserA, then UserB cannot manipulate the data depending on any additional permissions set unless the user has permission to do that.