5

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.

  • It could be disabled at kernel compile-time. What is the value of CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE in your kernel config (in /boot/config-3.whatever) ? – wurtel Nov 18 '14 at 8:15
  • @don_crissti I did that, got no response :( | @wurtel sorry, there's no such file. my /boot has only grub initramfs-linux-fallback.img initramfs-linux.img vmlinuz-linux – MightyPork Nov 18 '14 at 10:23
6

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.
  • 1
    I'm pretty sure I don't use a custom kernel in any of my Arch systems, but all of them report 16. – muru Apr 19 '15 at 13:32
  • Yes, I just mentioned it in case I had accidentally changed this somewhere compared to the Arch stock kernel. Your finding verifies I hadn't =). – Wild Penguin Apr 19 '15 at 13:36
  • Your documentation link is dead. – kasperd Feb 12 '18 at 1:11
  • @kasperd link fixed. – Wild Penguin Feb 13 '18 at 10:45
2

From the Kernel section on the Arch Linux Keyboard shortcuts wiki page

If you wish to have it enabled during boot, edit /etc/sysctl.d/99-sysctl.conf and insert the text kernel.sysrq = 1. If you want to make sure it will be enabled even before the partitions are mounted and in the initrd, then add sysrq_always_enabled=1 to your kernel boot command line options.

  • 1
    Can use simply sysrq_always_enabled (without =1) according to the doc - I've tested this and can confirm ;-) – Marcus Linsner Sep 7 '18 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.