SysRQ not working

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Hemanti
Level 1
Level 1
Posts: 9
Joined: Fri Dec 27, 2013 2:23 pm

SysRQ not working

Post by Hemanti »

I have installed Linux Mint 20.2 on my new Thinkpad P14s Gen2 AMD. I found in the manual, that SysRQ should be Fn+S. Unfortunately, it doesn't work, though. I have read, that I should hence press Alt + Fn + S - S - Fn + reisub to reboot. To debug, I try this:

I switch to tty2. I want to do SysRQ + h, but as soon as I type Fn + S, it goes back to the tty that I was on before. That might be the GUI or tty1.

Why is that? Can you help me to get SysRQ working?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: SysRQ not working

Post by JoeFootball »

Hemanti wrote: ... that I should hence press Alt + Fn + S - S - Fn + reisub to reboot.
The way I would interpret that to be is: While holding down the Alt key through the entire sequence, press Fn + s together, then separately press r e i s u, and then o to Shutdown (or b to Reboot).
Hemanti
Level 1
Level 1
Posts: 9
Joined: Fri Dec 27, 2013 2:23 pm

Re: SysRQ not working

Post by Hemanti »

That's actually what I was trying to express. :D

My problem is, that I press and hold Alt, then press and hold Fn and as soon as I press S, the console will jump back to the last used console (e.g. Cinnamon).
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: SysRQ not working

Post by Termy »

This might help you understand the Magic System Request Key:

https://www.kernel.org/doc/html/latest/ ... sysrq.html

More often than not, you can switch to another TTY, log in, then simply restart the computer from there; that's usually what I do, if I can't fix the problem from there.
I'm also Terminalforlife on GitHub.
Hemanti
Level 1
Level 1
Posts: 9
Joined: Fri Dec 27, 2013 2:23 pm

Re: SysRQ not working

Post by Hemanti »

Thank you for your reply! It's an interesting page for sure. The following might be relevant in my case:

I hit SysRq, but nothing seems to happen, what’s wrong?

There are some keyboards that produce a different keycode for SysRq than the pre-defined value of 99 (see KEY_SYSRQ in include/uapi/linux/input-event-codes.h), or which don’t have a SysRq key at all. In these cases, run showkey -s to find an appropriate scancode sequence, and use setkeycodes <sequence> 99 to map this sequence to the usual SysRq code (e.g., setkeycodes e05b 99). It’s probably best to put this command in a boot script. Oh, and by the way, you exit showkey by not typing anything for ten seconds.
So I went to tty2, enter the given command, and this is my output (commented by me):

Code: Select all

$ showkey -s
0x9c # no idea where this comes from - didn't press a button yet
0xe0 0x63 # press [c]Fn[/c]
0x38 0xb8 0x38 0x54 0xd4 0xb8 # press and release [c]s[/c] while holding [c]Fn[/c] all the time  
0xe0 0xe3 # release [c]Fn[/c]
None of that is 99, so I guess I should try setkeycodes <sequence> 99, just what would be the appropriate <sequence>? There are too many possibilities here, and I'm afraid of breaking something.
Locked

Return to “Other topics”