Note #2024-04-29-001

Srijan Choudhary Srijan Choudhary

Using sysrq on my laptop - documenting mostly for myself.

My laptop has started freezing sometimes, not sure why. Usually, I can just force power off using the power button and start it again, but it has happened twice that I had to recover the system by booting via a USB drive, chrooting, and recovering the damaged files using fsck or pacman magic.

The linux kernel has:

a β€˜magical’ key combo you can hit which the kernel will respond to regardless of whatever else it is doing, unless it is completely locked up.

(More details on archwiki and kernel doc)

To enable, I did:

echo "kernel.sysrq = 244" | sudo tee /etc/sysctl.d/sysreq.conf
sudo sysctl --system

However, to trigger this on my laptop, I was not able to find the right key combination for SysRq. I was able to make it work using an external keyboard that has a PrintScreen binding on a layer, by using the following:

Press Alt and keep it pressed for the whole sequence: PrintScreen - R - E - I - S - U - B

Currently, PrintScreen on my external keyboard is bound to Caps lock long press + Up arrow.

Interactions

πŸ” 3 reposts