What to do with frozen desktop?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Rhinox
Level 2
Level 2
Posts: 58
Joined: Wed Aug 16, 2017 12:26 pm

What to do with frozen desktop?

Post by Rhinox »

A strange thing happened to me for the first time: system (mint cinnamon 19, fully updated) got frozen. I was doing something (do not remember what), and suddenly I could not do anything. I had 2 or 3 windows opened, but I could no more switch to them. No button worked, no start menu, nothing. I could move mouse cursor, but nothing more. I could left/righ-click anywhere on desktop, nothing happened...

I tried some keyboard-combos I remembered from old time (i.e. ctrl+alt+del, ctrl+alt+break, ctrl+f2, ctrl+alt+f2, alt+f2, alt+f4, ctrl+c, etc), but nothing happened. I waited a few minutes, then I did hard-reset.

Is there someting better I could do in such a situation? Some keyboard-combo that restarts desktop, or somehow switch to console to do clean shutdown?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: What to do with frozen desktop?

Post by gm10 »

Ctrl+Alt+Backspace is the default combo for killing off the X-session, getting you back to the login screen. But with the desktop/X frozen, that might not work. In that case hold down Alt+SysRq and slowly type REISUB to gracefully shut down and reboot your system (O at the end instead of B turns it off). This works on all Linux systems since it's a kernel function. SysRq is usually mapped to the PrtScr key by the way - on some laptops you need to press Fn in addition to activate it.
Rhinox
Level 2
Level 2
Posts: 58
Joined: Wed Aug 16, 2017 12:26 pm

Re: What to do with frozen desktop?

Post by Rhinox »

I tried crtrl+alt+backspace too, but it did not work. Concerning that alt+sysrq trick: does it have to be "alt" (the left one)? On my keyboard, the right one is labeled "altgr". If it must be only "alt" (the left one), then I have to call someone to help me, as I need two hands just to keep left "alt" and "sysrq" pressed...

That "alt+f2/f3/f4" (or ctrl+alt+f2/f3/f4) combo does not work anymore? I remember a few years ago it got me to console, while desktop was still running...

Anyway I'm not sure only desktop froze. But I could still move mouse-cursor, so at least something worked...
gm10

Re: What to do with frozen desktop?

Post by gm10 »

Alt Gr also works on most keyboards, just try it to be sure it works on yours. Remember you only need to press 3 keys at a time - technically the combo is Alt+SysRq+R, Alt+SysRq+E, etc. - these are all separate commands. It's not hard to do.

Ctrl+Alt+F1...F12 is still the shortcut to switch between terminals. The default graphical session is on tty7. The Ctrl key is only needed to switch while in an X session since the Alt+ combos are remapped (e.g. Alt+F4 to close a window). With the X session frozen in your case it's conceivable that these didn't work.

PS: There's also Alt+SysRq+K to have the kernel kill the X session (all running processes really). That combo is disabled by default though in Mint's configuration, you'd have to re-enable it.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: What to do with frozen desktop?

Post by all41 »

fwiw
On every system I now have, or have had in the past, desktop or laptop,
the sequence is:
Hold down the Alt key and continue holding.
Then press and release the SysRec (PrtScn) key, then enter r e i s u b
all while continuing to hold the Alt key down
Everything in life was difficult before it became easy.
gm10

Re: What to do with frozen desktop?

Post by gm10 »

all41 wrote: Sat Jul 21, 2018 4:16 pm fwiw
On every system I now have, or have had in the past, desktop or laptop,
the sequence is:
Hold down the Alt key and continue holding.
Then press and release the SysRec (PrtScn) key, then enter r e i s u b
all while continuing to hold the Alt key down
Thanks, learned something, never tried it like that. So even only 2 keys at a time are necessary.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: What to do with frozen desktop?

Post by all41 »

gm10 wrote: Sat Jul 21, 2018 4:18 pm
all41 wrote: Sat Jul 21, 2018 4:16 pm fwiw
On every system I now have, or have had in the past, desktop or laptop,
the sequence is:
Hold down the Alt key and continue holding.
Then press and release the SysRec (PrtScn) key, then enter r e i s u b
all while continuing to hold the Alt key down
Thanks, learned something, never tried it like that. So even only 2 keys at a time are necessary.
type REISUB to gracefully shut down and reboot your system
this makes it even more graceful?
Everything in life was difficult before it became easy.
gm10

Re: What to do with frozen desktop?

Post by gm10 »

all41 wrote: Sat Jul 21, 2018 4:27 pm
type REISUB to gracefully shut down and reboot your system
this makes it even more graceful?
For sure, you'll get all the ladies like that. :lol:
mintmux

Re: What to do with frozen desktop?

Post by mintmux »

First post here. My Linux Mint 20 Ulyana froze, so I came here looking for a solution. There were some forms of frozen life - the mouse was barely alive, responding very slowly at times.

First tried a couple of graceful options, like

Ctrl+Alt+F1 to get a terminal window.
Alt+SysRq+F to kill memory intensive processes. This used to work on my Linux Mint 19.3 Tricia. But no more, I thought surprising. Maybe I changed the old config at some point.

The less graceful REISUB-method described above to reboot did however work. It appeared some signals went through, while others did not.

Further investigation led to /etc/sysctl.d/10-magic-sysrq.conf. It configures how the SysRq key with combinations responds. The file has only one integer value, kernel.sysrq, with different flags explained in the file. Note that adjusting it can have security implications.

In my old Linux Mint 19.3 Tricia the value for the kernel flags was 244. In the newer Ulyana it was 176. Two flags had been switched off (not sure why, I guess for security reasons):

# 4 - enable control of keyboard (SAK, unraw)
# 64 - enable signalling of processes (term, kill, oom-kill)

After enabling these flags, in my case by setting the kernel.sysrq value to 244 and rebooting, hitting the Alt+SysRq+F combo (equivalent to Alt+PrtSc+F on my machine) could kill processes.

Note: I rebooted to reload config, but that is not needed. Setting the same variable in /etc/sysctrl.conf has the same effect, after you issue 'sudo sysctl -p' .
Locked

Return to “Other topics”