What is Magic SysRq and how do I enable it?

I don’t have great PC specs so it’s not uncommon for it to completely freeze up. When this happens I have to hard reset my computer. And because it wasn’t shutdown properly, Fedora takes 10 or so minutes to boot up after as opposed to the 1 or 2 minutes after a proper shutdown.

When searching for solutions I can across this thing called “Magic SysRq” which is apparently a collection of key combinations that the kernel can recognize to help deal with a frozen computer. I’m a bit confused on what exactly it entails, and none of the key combinations I found do anything. Is it disabled in Fedora? Is there any way I can enable it? Thanks in advance for the help.

1 Like

Mostly yes, for security reasons.

sudo tee /etc/sysctl.d/90-sysrq.conf << EOF > /dev/null
kernel.sysrq = 1
EOF
sudo systemctl restart systemd-sysctl.service

QA/Sysrq - Fedora Project Wiki

1 Like