Unsolved

1 Rookie

 • 

1 Message

3719

December 28th, 2019 16:00

how to generate SysRq key combos on Dell XPS 7390

Hey friends,

I'm confused about the behavior of SysRq key combos on a new XPS 13 7390 with Ubuntu 19.10.
I can't seem to get any SysRq combo to have the desired effect, but I can get just one particular combo to print a help message in dmesg.

So, sysrq is enabled, as shown by:

cat /proc/sys/kernel/sysrq
1

 

Now, everything works if I send sysrq events through something like:

sudo bash -c 'echo p > /proc/sysrq-trigger'

 

But nothing works when I try to use the keyboard. I understand that Fn+R is the SysRq key on this laptop, so I'm trying things like Alt+Fn+R+p. No combinations seem to have any effect, other than Alt+Fn+R+b. This combo is supposed to reboot the machine. Instead, it prints the following help message in dmesg:


sysrq: HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) force-fb(V) show-blocked-tasks(w) dump-ftrace-buffer(z)

Does anyone have any insight? Is anyone able to use SysRq key combos?

Thanks!

- Andrei

1 Rookie

 • 

1 Message

June 4th, 2022 19:00

Hello,

Please check out the following links. They have the solutions to your problem.

https://linuxconfig.org/how-to-enable-all-sysrq-functions-on-linux

https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html

https://en.m.wikipedia.org/wiki/Magic_SysRq_key

You need to change the kernel parameter (Note that this is not a kernel cmdline parameter. Adding to grub etc doesn't work):

kernel.sysrq = 1

with sysctl or,

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

To enable all SysRq commands temporarily. The linuxconfig.org article shows permanent change as well.

For those who are looking for the SysRq magic on Dell laptops, I think this alt+fn+r combination works in general (mine Precision 7550, works).

One thing to clarify for others: you spelled capital R, I thought this was a shift+r. Which wasn't. To execute 1 or many (chaining) SysRq commands (the method worked on my device flawlessly): 

1. Sequentially press & hold Alt+Fn+R (first press Alt;  while holding Alt, press Fn; while holding Alt+Fn, press R) (lowercase R, not shift+R, just the R key)

2. Now you can release Fn and R keys. Release order doesn't matter, so long as you are holding Alt since the 1st step.

3. While holding Alt, press & release the desired SysRq command key: e.g. "m" for the mem info dump.

(4. Now, still, without releasing Alt, you can issue new SysRq commands one after another.)

Caveat: consecutive SysRq commands sometimes don't work, and the kernel simply ignores your requests. Possible solns to this problem are presented in the kernel.org article.

I am using LightDM, which uses tty7. So I can view kernel messages on tty1. e.g to see the mem info dump, go to tty1 and issue SysRq commands and immediately view results. Interestingly enough SysRq+h does not work on me, even with kernel.sysrq=1. Additionally, I have the

 Option "DontVTSwitch" "True"

As a ServerFlag on my Xorg config, which disables switching to other ttys. After issuing a SysRq+r, Ctrl+Alt+F# can switch ttys now. 

2 Posts

June 20th, 2023 06:00

"alt+fn+r" makes pressing "alternative + function + R" and that produces "Shift_Left+Print" and that produces a full screen shot, nothing more

No Events found!

Top