Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [magic-sysrq]

The "magic sysrq" key sequence is a feature of the Linux kernel that, when enabled, provides debugging and disaster recovery features on the system console and serial console.

Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

Is there a way to immediately shut down without "sd X: Stopping Disk" on Linux

The sysrq+o is known to immediately shut down a Linux machine, and known for being similar to physically removing power source. It actually does so on small setups where there are not many ATA devices....
melonfsck's user avatar
  • 143
1 vote
0 answers
25 views

SysRq key on a TLC keyboard

I have a "Logitech G14 TKL SE" keyboard. In this keyboard, the print screen key is emulated with the Fn+Ins keys combination. Unfortunately, I'm not able to get the SysRq magic key ...
Víctor Iglesias Castán's user avatar
2 votes
1 answer
430 views

Disable sysrq f (OOM-killer) but leave other sysrq keys operational

I was following a guide for automatically decrypting the hard drive on boot, using self-generated keys, and tpm2 variables, and near the end it makes this point that seems to make sense: https://...
user000001's user avatar
  • 3,645
0 votes
2 answers
142 views

Is using the SysRQ Emergency Remount an acceptable way to clone hard disk?

I'm using Linux (Ubuntu) and I was told that I can use the method described below to clone the system's hard drive to another one - to plug into a new machine. (Without booting from a Live CD) It ...
melonfsck's user avatar
  • 143
2 votes
0 answers
252 views

How can I find out what changes the value in /proc/sys/kernel/sysrq?

For some reason the value stored in the /proc/sys/kernel/sysrq file on my system changes to 16. It happens quite frequently, like once-twice an hour but in a random moment of time. As I understand, I ...
GRbit's user avatar
  • 21
0 votes
1 answer
611 views

Alt+PrtSc+REISUB doesn't shut down computer

The computer froze and then I held down Alt+PrtSc and pressed R, E, I, S, U, B, one by one, but it didn't shut down. So I waited for some time and then again held down Alt+PrtSc and pressed R, E, I, S,...
istakanvd's user avatar
5 votes
0 answers
719 views

How can I map a specific keyboard key to be SysRq?

I am using Parabola GNU/Linux (Arch variant) on a MacBook Pro laptop. I would like to configure/enable the SysRq key, since I am experiencing fairly frequent system freezes, which are forcing me ...
Time4Tea's user avatar
  • 2,375
2 votes
1 answer
2k views

How to find out which key is the Sysrq

My Ubuntu 18.04 -whole system- freezes regurlary. It is a Dell Latitude 3510. I tried the Alt+PrintScreen (5mp)+r+e+i+s+u+b (2 mp delay between keystrokes) and the same with Alt+Home at the start. ...
Zsolt's user avatar
  • 21
0 votes
0 answers
32 views

What to do when system stops interacting with I/O devices?

Due to some applications misbehaving (which I have to force kill), there seem to be some secondary effects on my system. The screen output freezes, but the system stays responsive (I can ssh into the ...
Peeyush Kushwaha's user avatar
1 vote
1 answer
2k views

What's the difference between REISUB and a regular reboot?

I know doing REISUB is better than pressing the reset button, but what is the difference between doing this and executing reboot through the terminal or rebooting through the GUI?
AtilioA's user avatar
  • 123
2 votes
0 answers
27 views

System too busy for magic SysRq [duplicate]

Sometimes (perhaps once a month) my system stops responding so bad that it won't react to magic SysRq combinations (which are allowed and do work properly at all other times). I'm quite sure this is ...
The Vee's user avatar
  • 300
1 vote
0 answers
37 views

Using SysRq to collect state of system before reboot

I have a Debian Buster machine that freezes every now and then. No keyboard and mouse inputs are processed, but the screen still shows the login screen. Logs appear to show nothing out of the ordinary,...
Doug's user avatar
  • 111
5 votes
1 answer
12k views

If /etc/sysctl.conf doesn't exist, where is my sysctl storing configs?

I want to change two values using sysctl. One is the sysctl vm.swappiness=10 and the other, sysctl kernel.sysrq=1. However, when I run sysctl -p, it tells me sysctl: cannot open "/etc/sysctl.conf&...
Akshat Vats's user avatar
2 votes
2 answers
518 views

Reset via ssh on irresponsive machine

I have a machine I cannot physically access at the moment. Now this machine is irresponsive, in the sense that when I try to log in via ssh the output is /bin/bash: Input/output error and then the ...
Marco Venuti's user avatar
3 votes
1 answer
388 views

SysRQ+B (boot) not working but O (turning off) is

For some reason, my Linux machine will properly turn off when striking SysRq+O, but won't reboot as expected when doing SysRq+B. Both of these ones show up in the help message (with SysRq+H) and all ...
Obsidian's user avatar
  • 151
2 votes
1 answer
1k views

SysRq doesn't display any result on terminal

I use Mint 19.2, and I try to see CPU backtrace by the following process. $ sudo -s # sysctl -w kernel.sysrq=1 # echo l > /proc/sysrq-trigger But, nothing happened. I researched more ...
buck_banzai's user avatar
2 votes
0 answers
433 views

Undo Magic SysRq "remount-ro"

Is there a way to undo an accidental Magic SysRq "remount-ro"? On my notebook keyboard, this combination happens all too often... I tried to remount the roor partition with mount -o remount,rw /dev/...
quazgar's user avatar
  • 891
4 votes
1 answer
4k views

How to ensure SysRq is always enabled regardless of the kernel.sysrq setting?

Some Linux distributions have kernel.sysrq=16 which means only SysRq + s (sync) is allowed. As an example: Fedora (25 and 28) has it set as such in /usr/lib/sysctl.d/50-default.conf I had to create a ...
user avatar
0 votes
1 answer
193 views

Why does SaK kill gdm, which is running on a different VT?

I run Fedora Linux 28, and have enabled sysrq. I pressed Alt+PrtScr+K, to kill a non-responsive X session. But this also restarted gdm, and one other X session, which were running on different VTs. ...
sourcejedi's user avatar
  • 50.6k
2 votes
0 answers
191 views

Can't figure out the way to trigger Magic Sys Keys via keyboard debian 9 lxdm 0.53-2 xfce4.12.3

I use a debian 9 with Magic Sys Keys enabled : sysctl -a | grep sysrq kernel.sysrq = 1 if I trigger in CLI, it works : echo f > /proc/sysrq-trigger I have something like : emergency sync ...
Gilles Quénot's user avatar
0 votes
1 answer
489 views

Set kernel.sysrq = 1 in /etc/sysctl.d/10-magic-sysrq.conf using command? [duplicate]

I wish to use a single command line instead of opening the text editor to change the parameter of the file /etc/sysctl.d/10-magic-sysrq.conf to kernel-sysrq = 1 from any current parameter, even if ...
neverMind9's user avatar
  • 1,680
0 votes
0 answers
76 views

Under what circumstance could switching tty's and entering commands freeze?

I noticed, that when booted from a live disc, and the RAM is filled up nearly, the live DVD starts being accessed far more often (probably due to exhausted and squished block cache) and switching tty'...
neverMind9's user avatar
  • 1,680
0 votes
1 answer
102 views

SysRq output into |less, |more, |tee?

If I issue a SysRq command, how do I redirect that output (whether it is stdout or stderr is documented nowhere) to |less, |more or |tee?
neverMind9's user avatar
  • 1,680
0 votes
0 answers
540 views

How to stop a SysRq command?

I used SysRq+J (thaw), now I am being flooded with printk messages: emergency thaw on sr0. It will never stop. I do not wish to wait, until a SysRq command ends while blocking the terminal all the ...
neverMind9's user avatar
  • 1,680
1 vote
2 answers
454 views

Reasons for CTRL+PrtScr+R+E+I+S+U+B

If Linux stops responding one might be forced to make an unclean shutdown and in this case one might unknowingly just turn off the power. I read that you should try and make a soft reset with ctrl+...
Niklas Rosencrantz's user avatar
1 vote
0 answers
935 views

Cannot get kernel crash dump saved and reboot

I need to get a crash dump of my linux kernel. I am going to describe the scenario: Hardware: Notebook Dell E5450. Linux Distribution: Linux Mint 18.3 (Ubuntu 16.04). SysRq: enabled by /etc/sysctl.d/...
Antonio Petricca's user avatar
1 vote
1 answer
136 views

Can a magic sysreq key combo run a script?

I'm experiencing system hangs which seem to correlate with high RAM usage levels (though swap is mostly unused). I'd like to be able to kill thunderbird and other memory hogs via a script with a ...
Tom Hale's user avatar
  • 30.8k
0 votes
1 answer
1k views

does "echo -m > /proc/sysrq-trigger" run in process context when it runs from script?

we have a script which runs below sysrq command to get memory info in syslog and then script copies the syslog. echo -m > /proc/sysrq-trigger From documentation I see that at the at kernel level "...
ART's user avatar
  • 1,131
11 votes
1 answer
3k views

Why is Magic SysRq not enabled by default on some systems? Is there a risk?

While troubleshooting a Oracle Linux 6.3 server (RHEL Derivative) I tried to use some of the Magic SysRq Key commands for the first time. No such luck so I had to hard reboot. When it came back up I ...
Caesar Kabalan's user avatar
4 votes
2 answers
7k views

How to send SysRq command over ssh connection?

I am working on BeagleboneBlack based custom board, Recently I was debugging system hang issues, I had access to debug console using minicom, And I could enable log using key combination Ctrl+A, F `. ...
ART's user avatar
  • 1,131
1 vote
0 answers
1k views

Kernel Crash/ Cpu error?

First I will describe my system and then my problem: I have an Assus F555L laptop with an i3 and Intel Integrated Graphics. It is running Linux Mint 17.3 and Windows 10 dual booted. I do not have ...
Steven Perszyk's user avatar
0 votes
1 answer
461 views

What is the difference between 'reset' and 'ctrl sysrq b' (for Linux 2.6.x)

What is the difference between the two? In a Linux 2.6.x kernel.
Gregg Leventhal's user avatar
18 votes
2 answers
15k views

How to make SysRq working on laptop?

My /proc/sys/kernel/sysrq contains the number 502, but Alt+SysRq+... seems not to work on my HP Pavilion laptop. How can I fix that? Update 1: By the way: neither my print-screen-key nor any other ...
Al Klimov's user avatar
  • 557
21 votes
1 answer
6k views

How to discover whether magic SysRq key is enabled, and what keys invoke it?

How can I know what keys will invoke the magic SysRq key? Provided I am in front of a Linux machine which is not frozen (yet). I need something easier than trying all common combinations of magic ...
Quora Feans's user avatar
  • 3,865
3 votes
2 answers
810 views

What are the programs/commands which the magic SysRq key invoke?

From Magic SysRq key The magic SysRq key is a key combination understood by the Linux kernel, which allows the user to perform various low level commands regardless of the system's state. It is ...
Tim's user avatar
  • 102k
7 votes
0 answers
2k views

How to read the output of the show-memory-usage SysRq?

I couldn’t find any (recent) documentation on reading the output of the show-memory-usage SysRq (Alt+SysRq+m). So what can one learn from looking at it? Here is an example output form my box (Kernel ...
kirelagin's user avatar
  • 203
8 votes
2 answers
7k views

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

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'...
MightyPork's user avatar
  • 1,222
11 votes
1 answer
2k views

Why does Alt+SysRq+B not always trigger while REISU do?

On many different machines, when I come across a lockup, I often use Alt+SysRq+REISUB to reboot without too much losses. But I often noticed that although REISU commands work even when I just hold Alt+...
Ruslan's user avatar
  • 3,370
2 votes
2 answers
4k views

In Linux, why do you need to be root to write to /proc/sysrq-trigger?

WARNING: THE NEXT KEY COMBINATION WILL CRASH YOUR COMPUTER Ok, I get that this is an administrative tool and all, but I realized that any user can do ALT + SysRq + C. This link explains what I'm ...
Quick Question's user avatar
7 votes
2 answers
5k views

Remote executing Magic Sys Rq

Is it possible to execute Magic SysRq keys on remote machine, using SSH? For example I'm trying to run like this: xdotool key Alt+Sys_Req+H But I do not see any help in console, neither in /var/log/...
c0rp's user avatar
  • 275
8 votes
1 answer
3k views

How long should I wait between keystrokes when doing SysRq + REISUB?

I read this from here: The most useful combination is the Alt+SysRq/Prnt Scrn + R-E-I-S-U-B. The above basically means that while you press and hold Alt+SysRq/Prnt Scrn and press R, E, I, S, U,...
BufBills's user avatar
  • 3,115
4 votes
2 answers
8k views

What numeric key codes do I need to send for the magic sysrq functionality in a VNC session?

I have access to the system console of a KVM guest through VNC. What key codes do I need to send for the magic sysrq sequence (Ctrl+Alt+"REISUB") in Linux? Edit: In Linux under qemu, running showkey ...
user314104's user avatar
10 votes
1 answer
4k views

how to reboot a frozen FreeBSD server from the serial console?

Linux has the "magic sysrq key" to reboot frozen machines remotely, and it works over the serial console, but what about FreeBSD? Is there a way to send a "control-alt-delete" to FreeBSD servers on ...
anarcat's user avatar
  • 1,323
4 votes
1 answer
2k views

sysrq won't reboot with a keystroke, but will with echo "b" > /proc/sysrq-trigger

CentOS 6.2, 2.6.32-220.el6.x86_64 laptop. SysRQ is enabled for keyboard input, as is witnessed by: $ cat /proc/sys/kernel/sysrq 1 Common Magic SysRQ Keys are working such as alt-sysrq-h. However, ...
Wesley's user avatar
  • 14.3k
7 votes
2 answers
531 views

Linux /proc/sys/kernel: where are the files sysrq-sticky, sysrq-key, and sysrq-timer?

Documentation for Red Hat Enterprise Linux 3 (section 5.3.9.3) mentions these files in /proc/sys/kernel/: sysrq sysrq-key sysrq-sticky sysrq-timer The documentation for RHEL 5 also mentions them. ...
Mei's user avatar
  • 1,146
2 votes
2 answers
1k views

Sysrq keeps taking screen shots

I have enabled SysRq in the kernel like this: $su #echo 1 > /proc/sys/kernel/sysrq and confirmed that it worked. Fn-F1 is my SysRq key, but every time I press Alt-Fn-F1 and any other letter ...
rubixibuc's user avatar
  • 1,747
2 votes
1 answer
561 views

REISUB (Alt+SysRq+key) doesn't work on Slackware13.37_64, KDE

Under Slackware I never used the magical REISUB, and never used KDE (I don't know if it is important). But now I installed a Slackware13.37_64 with KDE, and, as far as I know, I didn't modify anything ...
jlsh's user avatar
  • 23
29 votes
2 answers
2k views

Recovering from Sys Rq + r

I had a really bad lockup of my X server and had to do a Sys Rq + r to release my keyboard from X and get into a console. I was able to kill the process that was locking up my system, and continue my ...
Bjarke Freund-Hansen's user avatar
38 votes
2 answers
16k views

What is raw keyboard mode?

In the magic sysrq key combinations, there is the combination alt+sysrq+r which, according to wikipedia, does the following: Switch the keyboard from raw mode, the mode used by programs such as ...
Lesmana's user avatar
  • 27.5k