Skip to content

Instantly share code, notes, and snippets.

@ulidtko
Created February 5, 2021 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ulidtko/e403735cf01e62a447ac572c61c2b61a to your computer and use it in GitHub Desktop.
Save ulidtko/e403735cf01e62a447ac572c61c2b61a to your computer and use it in GitHub Desktop.
# Oh come on! It's 2020! Stop freezing on OOM, you *clumsy penguin* !
kernel.sysrq = 244
# = 128+64+32+16 +4
# 256+128+64+32+16+8+4+2+1
# ^ ^ ^ ^ ^ ^ ^ ^ ^
# | | | | | | | | |
# | | | | | | | | | 0 - disable every SysRq function.
# | | | | | | | | `- 1 - enable every SysRq function.
# | | | | | | | `--- 2 - enable control of console logging level
# | | | | | | `----- 4 - enable control of keyboard (SAK, unraw)
# | | | | | `------ 8 - enable debugging dumps of processes etc.
# | | | | `-------- 16 - enable sync command
# | | | `----------- 32 - enable remount read-only
# | | `------------- 64 - enable process signals (term, kill, oom-kill)
# | `----------------- 128 - allow reboot/poweroff
# `--------------------- 256 - allow nicing of all RT tasks
# of course, arch default is... 16.
# which breaks the well-known Alt-SysRq-REISUB spell; I find that disgraceful.
# HINT: use SysRq+F to unleash the reaper
#
# thanks to this guy --> https://superuser.com/a/1402025/58037
@ulidtko
Copy link
Author

ulidtko commented Jan 3, 2023

Ubuntu 22.04 default: 176 = 128 + 32 + 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment