Wrestling with this today, in order to figure out the Linux REISUB emergency shutdown process for my Lenovo Carbon X1, here is what I found: (Note that these instructions are specific to Linux.)
First, check to see if emergency SysRq is even enabled:
cat /proc/sys/kernel/sysrq
It will output 1 if enabled, 0 if not enabled. If it is not enabled, you can temporarily enable with:
echo 1 > /proc/sys/kernel/sysrq
I found (using sudo showkey) that the left and right ALT keys on my thinkpad output different keycodes. Also, that the SysRq is mapped to Alt+PrtSc, not to Alt+S. So on the thinkpad, it is LeftAlt+PrtSc.
The correct sequence for REISUB on my Thinkpad is:
LeftAlt-PrtSc-R : switch keyboard from Raw mode to Xlate
LeftAlt-PrtSc-E : send SIGTERM to all processes except boot, so they can gracefully exit
LeftAlt-PrtSc-I : send SIGKILL to all processes except boot, to kill any stubborn stragglers
LeftAlt-PrtSc-S : Sync all mounted filesystems, so that caches get written to the disk (prevent data loss)
LeftAlt-PrtSc-U : Remount all mounted filesystems in readonly mode (prevent filesystem errors)
LeftAlt-PrtSc-B : Reboot
(wait a few seconds between each command)
You can test whether your emergency SysRq is working this way:
sudo journalctl -f
LeftAlt-PrtSc-S
This will sync files and you should see a system journal entry that says
Aug 04 17:32:27 hostname kernel: sysrq: Emergency Sync
Aug 04 17:32:27 hostname kernel: Emergency Sync complete
(You can also safely use SysRq-M that will print a bunch of memory info into the log.)
For more info, including how to enable SysRq permanently if you want it, see https://forum.manjaro.org/t/howto-reboot-turn-off-your-frozen-computer-reisub-reisuo/3855
Maybe this will save someone else some time.