Maybe a dumb question - but I can’t seem to execute commands with SysRq on the Laptop. I’ve tried a bunch of key combinations, mainly trying with PrtScr (combo key with F11). Any help would be appreciated thanks.
@RandomUser - it was set to 16 already. I tried changing to 256, but that didn’t seem to help - I don’t think any of the commands are working.
I’m on Fedor 35 KDE FYI:
Linux 5.14.12-300.fc35.x86_64 x86_64.
Yea I tried pressing Alt + Fn + F11 + CMD, Alt + Fn + Shift F11 + CMD, Alt + Fn + Ctrl + F11 + CMD, and various other combos.
Yea I tried Function Lock before and retried after reboot just now for sanity - no luck - can anyone confirm that (some) combo actually works on their machine? I’m lost at this point.
I have also confirmed that the SysRq functionality does indeed work on my distribution, by testing it via writing commands to /proc/sysrq-trigger. Therefore it’s for sure an issue with getting the hotkey to work.
I can confirm it works on my end (Fedora 35) with
PrtScr (SysRq) +
Function lock off:
PrtScr(which is also
SysRq) there is no need to hold
Function lock on:
Fnto convert it into
Press the key combo, and it should work. On Fedora 35, if the command is supposed to output to the console, it should show up in the journal. Follow the journal with
journalctl -f. If the combo is disabled:
sysrq: This sysrq operation is disabled.
Reminder that any value >1 is a bitmask, so 16 only turns on
enable sync command and changing it to 256 only turns on
allow nicing of all RT tasks. If you want to selectively enable e.g. both, then set it as
0 = everything disabled and
1 = everything enabled.
@Michael_Wu - thanks for the tips, after looking at journalctl, I realized that the operations were being send out, but were indeed disabled, due to my misunderstanding of the bitmask setting. After, setting it to 1, I was able to perform the commands successfully. Thanks!
I can confirm that @Michael_Wu’s solution works on Xubuntu 20.04
This is actually the opposite of my experience here. I do not have
fn lock enabled and i do need to hit the fn key for this to work. So the keybinding is, for me: alt fn F11 r, in order.
Presumably you do not need the fn key if
fn lock is enabled, but I haven’t tested that.
This is on Debian 11 bookworm.
That would mean you have function lock disabled, meaning the F11 key is now Print Screen. By definition, you should not need to press fn as that would turn Print Screen into F11 in the combination:
When on, keys F1 to F12 behave as applicable, with meanings defined by the application being used at the time. When off, new behaviour is used: F5 means “open”, F10 means “spell” etc.
I believe you simply have the opposite definition!
To test, you can just press fn + esc to toggle function lock (the esc key shows
fn lock at least on the US English ANSI keyboard).
Yes, I believe this is the problem. In my definition,
fn lock on means that it’s as if
fn was always pressed and therefore the the F-keys always send their equivalent multimedia key. E.g. F11 with
fn lock on, always sends PrtScr.
Am I getting this backwards?
It’s a bit confusing, but yeah in the definition, the functions refer to
F12 (Functions 1-12), and not the “new behaviour”/secondary function e.g.
In the case of F11/Print Screen, e.g. while in a program, the F11 key performs the respective program’s
F11 function. Print Screen is that “new behaviour”, essentially the secondary function.
I remember the days when the keys were usually just F1-F12 and there were no secondary functions – so “function lock” “locks” those primary F1-12 functions in place.
Typing this up helped me solidify my understanding as well!
that actually makes perfect sense, of course. thanks, TIL!