Original post by @đabby Manjaro Forum
REISUB (also known as the magic SysRq key) is a mnemonic for:
and is a gentle way of rebooting your system by doing
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:
echo kernel.sysrq=1 | sudo tee --append /etc/sysctl.d/99-sysctl.conf
There is a special System *R equest key on most keyboards called SysRq on all English language and most international keyboards.
Stamp (or Stampa on old Olivetti keyboards)
Once you've located your SysRq key, please keep the Alt key pressed.
Now lightly tap these keys waiting between 1 second (fast, new machines) and 6 seconds (older or resource-starved machines¹) in-between keypresses : REISUB
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.
Read the REISUB section above and then you'll know what this means:
REISUO will turn your machine off instead of rebooting it...
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.
To do the same from within your Desktop Environment (DE) this has to be set up beforehand!
So 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:
gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'