How to reboot / turn off your frozen computer: REISUB/REISUO

As I see too many people using a hard power off during freezes, I'm creating this small tutorial on how to turn off your computer when everything is frozen. Whenever you see someone saying they had to "Power Off" their system without mentioning they had to REISUB their system, send them here! :innocent:

REISUB (reboot)

REISUB (also known as the magic SysRq key) is a mnemonic for:

and is a gentle way of rebooting your system by doing the following:

  • Switch the keyboard from Raw mode, used by programs such as X11 and SVGALib, to XLATE (translate) mode
  • Send an End signal (SIGTERM) to all processes, except the boot process, allowing all processes to end gracefully
  • Send an Instant kill (SIGKILL) to all processes, except the boot process, forcing all processes to end .
  • Sync all mounted filesystems, allowing them to write all data to disk.
  • Unmount and remount all mounted filesystems in read-only mode.
  • ReBoot the system

In fact, the only data you lose is since your last [auto]save as the system is shut down gracefully.

Before you read any further, ensure all your work is saved!

How to invoke the REISUB procedure?
First we have to unlock the SysRq key so:

  • Add to your grub GRUB_CMDLINE_LINUX_DEFAULT the sysrq_always_enabled=1 variable.
    OR
  • Execute echo kernel.sysrq=1 | sudo tee --append /etc/sysctl.d/99-sysctl.conf
    AND
  • Reboot normally if you had to add one of these parameters, come back here and read the rest of the blurb... :wink:

There is a special System Request key on all keyboards called SysRq and:

  • on full-size keyboards it's called by pressing Alt+SysRq
  • on most laptop keyboards it's called by pressing Fn+Alt+PrtSc if the SysRq key is missing.

If you're on a full-size keyboard, keep the Alt key pressed, on a laptop keyboard, keep the Fn+Alt key combination pressed.

Now lightly tap these keys waiting at least 1 second in-between keypresses: R E I S U B

There! If you actually followed the above instructions, your system just rebooted gracefully and you did not damage your HDD (if you still have one) by forcing it into PARK mode forcefully nor was your EXT4 or NTFS transaction journal rolled back.

Congratulations!

:innocent: :+1: :clap:

For even more info, Read the Fine Manual here :innocent: :wink:

REISUO (Turn off)
  1. Read the REISUB section above and then you'll know what this means:
  2. R E I S U O will turn your machine Off instead of reBooting it...
Light tap on power button (<5 seconds)
  1. Sometimes (If only the UI is frozen), you can still switch to one of the TTYs by pressing Ctrl+Alt+F2 or F3, ... and gently tap the power button there.
  2. If your entire system is frozen, it depends on your Desktop Environment (DE) and has to be set up beforehand!
    To ensure that your power button effectively shuts down your computer instead of going to sleep / Hibernate / ... in the future, follow these steps for your DE:
  • In Gnome:

    Details

    Execute the following command:

      gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'
    
  • In KDE:

    Details
    • Go to System Settings
    • Type energy
    • in all of the On AC Power, On Battery and On Battery tabs, set the check-mark on Button events handling and the Even when an external monitor is connected
    • When power button pressed to Shut Down as per below screenshot:
      Screenshot_20200217_182628
  • In XFCE:

    Details
    • Go to the Applications menu or System settings
    • Clock Power Manager
    • From When Power Button is pressed: select Shutdown.

That's it! If all of your data is saved, just press the power button lightly and your system will shut down gracefully from now on!

Keep power button suppressed (>5 seconds)

See section "Pull circuit breaker on House / Street / Block" below...

Yank power cord from a laptop without battery or a PC without UPS

See section "Pull circuit breaker on House / Street / Block" below...

Pull circuit breaker on House / Street / Block

Please! Do not do this!

Unless you're using ZFS or BTRFS and have ensured they use redundancy, you will lose data!
Maybe not the first time, maybe not the second time, but eventually, you will!

Use REISUB, REISUO or a light tap instead!

21 Likes
How to use only Nvidia Card?
After random amount of time System Sluggish, No Network KDE Plasma
[Stable Update] 2020-04-18 - Kernels, Browsers, VirtualBox, LibreOffice. KDE-Frameworks
30 Sec shutdown.
I can't use or uninstall snap applications
No Suspend/Hibernate
Manjaro not able to resume from sleep on Dell Precision 7530
Cannot Reboot/Shutdown While Docked
Stop jobs on shutdown
Vmetal
Random OS Crashing
Suspending locks input
systemd-journald consuming my cpu
systemd-journald consuming my cpu
Fallback mode and Intel-ucode
Cannot install/update/remove virtualbox-ext-oracle
How to permanently enable the SysRq key?
Laptop Waking From Sleep While Closed
How to get coredump for my applications
Manjaro KDE XServer /nvidia Driver crash (I think)
Random OS Crashing
Stuck on BIOS screen after force-shutdown
Inspiron 15-3552 suddenly freezes
system becomes unusable some time after resume from suspend
KDE freezes randomly + graphical glitches
Prevent disabling of USB before and after suspension
Alloc Magic is broken
How to permanently enable the SysRq key?
Lost Grub or Efi boot partition
Cannot boot after failed timeshift restore
Issue with Wifi auto disconnecting and hanging the system.
pamac: Failed to prepare transaction: could not find or read package
Massive memory leak that makes the pc freeze after the last kernel and amd ucode update
PC beeps before shutdown
Lenovo C940 - Reboot/Shutdown hangs with Kernels 5.5 and 5.6. Working fine with 5.4
Stuck on Acer Logo
Include out-of-memory warnings or protection by default (e.g., earlyoom or nohang)

Just gonna say it here because its how I learned it ...

Raising Elephants Is So Utterly Boring

7 Likes

It is worth mentioning that sysrq value on manjaro is 16 and thus has limited functionality.

Note: Please be aware that "REISUB" itself is just a mnemonic thing, is not any kind of general recommendation of key press sequence to take back control of unresponsive system, you shouldn't blindly press in this sequence each time without knowing their actual function as noted below.
-- https://wiki.archlinux.org/index.php/Keyboard_shortcuts

2 Likes

Edited...

I've linked to https://wiki.archlinux.org/index.php/Keyboard_shortcuts#Kernel instead of the Wikipedia article...

:innocent: :bowing_man:

...or BUSIER backwards.

1 Like

I learned that one after .. the elephants always stuck.

I usually close all programs and then terminal

shutdown now

Am I doing this wrong?

1 Like

I learned Elephants too but the Zombies stuck:

Zombie_underworld_evil_face

cc @Yochanan

Nope, that's correct. Let me add FROZEN to the title...

Since we have systemd .. I think the cleaneast is that -
systemctl reboot
systemctl poweroff
etc.

[and to clarify .. not for thread .. not for reisub or elephants ... but as far as response to @fbodymechanic or direct commands go for doing those operations ... systemctl will attempt to kill things logically, etc]

β€œThe system is busier than it should be” (Especially before some kernel fix in 2019, using swap could cause constant disk usage and system freeze for hours)

Another way to reboot if your system breaks but you can still switch ttys.
Ctrl+alt+f3
Tap the power button
Success! Your system will shutdown! Now turn in back on.

1 Like

Included now! Thanks for the tip!

REISUB did not work for me. Is there a reason that the value is 16 and not 1?

It is a dangerous thing - in theory it is possible to damage a system not intended for the mentioned key press sequence - the immediate thought is - security - but I don't know.

A REISUB is dangerous on Manjaro?

:scream:

So delete the entire thread / make it private then???

It may be dangerous on any system since it forces process shutdown -it's nice know - but I think the real reason that sysrq is 16 on Arch is the security concern - still it is a guess - as I really don't know.

1 Like

With physical access to a powered-on system, no security holds anyway...

You got me worries for a minute there! :sweat_smile:

If it does not work for you:

$ su -
Password: 
[marco-T61 ~]# echo "kernel.sysrq=1" > /etc/sysctl.d/99-sysctl.conf
[marco-T61 ~]# exit
logout

Notes:

  • sudo did not not work, so I used su - (first time ever on Manjaro)
  • You need to re-boot for this to take effect
  • On my T61, it looks as if you would need to hold the blue Fn key to access SysRq, but it worked with just Alt+SysRq. Neither Fn, nor Ctrl were required for me. But, you may need to experiment adding them to your key-chord.
3 Likes

Or you could add to your grub GRUB_CMDLINE_LINUX_DEFAULT sysrq_always_enabled=1 variable.

2 Likes

Forum kindly sponsored by