Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[HowTo] Dealing with unresponsive applications or desktops

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2044
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 151 times
Been thanked: 212 times

[HowTo] Dealing with unresponsive applications or desktops

#1 Post by Hallvor »

Skill level: Beginner
Tested on: Debian Bullseye

Unresponsive applications or even unresponsive desktop environments are not common in Debian, but it can happen. Here is how you can deal with them without holding the power button for a hard shutdown. This howto was tested on Debian Bullseye, but should also work on later versions.


Unresponsive applications

Some applications can't be closed normally from the GUI. Here are a few ways to deal with that:

Method 1: Force quit from the GUI.

Open KSysGuard, Task Manager or an equivalent.
Find the unresponsive application in the list of running processes.
Right click on the process.
Click "End process" or "Kill process" to quit the application.


Method 2: Use xkill


Open the Terminal by pressing Ctrl+Alt+T on your keyboard. (You can use Ctrl+Alt+Esc in KDE or Alt+F2 and enter the command in KRunner.)
Type the command xkill and press Enter
Your cursor will now turn into an X or skull and crossbones.
Click on the unresponsive application window to force quit.


Method 3: Use the Terminal (option 1)

Open the Terminal by pressing Ctrl+Alt+T on your keyboard.
Type the command

Code: Select all

ps aux | grep nameoftheapplication
to find the process ID (PID) of the misbehaving application. (Replace nameoftheapplication with the actual name of the application, for instance firefox.)
Note the process ID of the unresponsive application.
Type the command

Code: Select all

kill PID
. Press Enter. (Replace PID with the actual process ID number you just noted.)

Method 4: Use the Terminal (option 2)
Open the Terminal by pressing Ctrl+Alt+T on your keyboard.
Type the command

Code: Select all

killall nameoftheapplication
, for instance

Code: Select all

killall firefox
.


Unresponsive desktop environment



Method 1: Get to a virtual console

Press Ctrl+Alt+F2 (or any function key between F2 to F6) to get to a virtual console.

If you are able to get to a virtual console, you can log in as root or use the following command with sudo to restart the x server.

Code: Select all

systemctl restart display-manager

Method 2: Restart the X server (if the keyboard shortcut is enabled)


Note: This will not work unless you have enabled the shortcut.
Press Ctrl+Alt+Backspace to restart X and get back to the login screen.


Method 3: Safely restart your computer with REISUB


I use this method only as a last resort when everything else has failed.
Press and hold down the Alt and SysRq (or Print Screen) keys on your keyboard.
While holding down the Alt and SysRq keys, type the following keys (slowly) in sequence:
R: Switch the keyboard from raw mode
E: Send the SIGTERM signal
I: Send the SIGKILL signal
S: Sync all mounted filesystems
U: Remount all filesystems in read-only mode
B: Reboot the system

Your system should now shut down and reboot normally.

If you have a hard time remembering the sequence, think of this sentence: Raising Elephants Is So Utterly Boring, or as I prefer: Reading Every Inch Stimulates Understanding Better.


Edits:
16.04.23: Fixed typo and added KDE Plasma shortcut for xkill. Thanks to sunrat.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
kent_dorfman766
Posts: 540
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 59 times
Been thanked: 70 times

Re: [HowTo] Dealing with unresponsive applications or desktops

#2 Post by kent_dorfman766 »

IMHO, xkill should be a menu option on anyone's pulldown menus. Highly useful but not well known.

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [HowTo] Dealing with unresponsive applications or desktops

#3 Post by sunrat »

xkill shortcut is Ctrl-Alt-Esc here on Bullseye Plasma. It turns the cursor into a skull and crossbones.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2117
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 232 times

Re: [HowTo] Dealing with unresponsive applications or desktops

#4 Post by FreewheelinFrank »

Wayland has a "check-alive" feature that will ping an app to ask for a response (pong) to say if it is busy with a task. If Wayland gets no response, it assumes the app has frozen and calls it irresponsive. Some apps as yet fail to return this "busy" pong. At least this was true for me some time ago.

If apps in Gnome on Wayland produce a pop-up saying they may be unresponsive, but are actually just working on a task, it is possible to edit the check-alive-timeout period to a longer period. Default is 5 seconds, which could be too short.

Details here.

Post Reply