Linux – Alt+SysRq+T not working / Where do SysRq commands print to

arch linuxmagic-sysrq

My REISUB commands, and K, work flawlesly, but with T (it should print info about tasks), it prints nothing. H also doesn't work.

Alt+SysRQ+H
Alt+SysRQ+T

I tried in all tty's (even F10, which doesn't even have a login prompt), but nothing.

Things like K work all right, it kills the xserver and everything (handy, because it freezes all the time).

How to fix / where do they really print to?

I'm on Arch.

Best Answer

The default Arch Kernel should have the sysrq feature enabled in kernel (I'm using a custom one, but based the config on the default one). However, in the default kernel, the bitmask to control, which features of the sysrq keys are usable, is set to 0. I believe it is set to 16 (10000) somewhere during the boot on Arch, but I'm not sure where.

Provided the sysrq setting is compiled in the running kernel, one can check quite easily via:

$ cat /proc/sys/kernel/sysrq 
16

In this example it is set to 16 (=only emergency sync is enabled).

One can easily enable all sysrq functionality:

$ echo 1 > /proc/sys/kernel/sysrq

You need to do this as root, since echo does not work with sudo. Alternatively:

$ echo 1 | sudo tee /proc/sys/kernel/sysrq > /dev/null 

(the > /dev/null part is not strictly needed)

The sysrq configuration is explained in more detail in the kernel documentation, and even in the Wikipedia.

Also, if the problem is indeed that the bitmask is set so that required combinations are disabled, you should get a notification is syslog (at least I do):

kernel: SysRq : This sysrq operation is disabled.
Related Question