Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
38
views
Magic reset with a Lenovo Compact USB keyboard
I have a desktop linux machine, which I am using with my small Lenovo keyboard. This keyboard does not have a SysReq key, which means that I am unable to invoke the REISUB magic when things go south. Can I somehow define another keyboard shortcut that does the same thing? Using Ubuntu 22.04 at the m...
I have a desktop linux machine, which I am using with my small Lenovo keyboard.
This keyboard does not have a SysReq key, which means that I am unable to invoke the REISUB magic when things go south.
Can I somehow define another keyboard shortcut that does the same thing?
Using Ubuntu 22.04 at the moment.
mitchus
(205 rep)
Feb 6, 2025, 04:03 PM
• Last activity: Feb 7, 2025, 11:45 AM
5
votes
1
answers
4340
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. * Also tried this two while holding down the Alt constantly. * My `sysrq` is enabled,...
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.
* Also tried this two while holding down the Alt constantly.
* My
sysrq
is enabled, cat proc/sys/kernel/sysrq
showed a value 176
- what ever that means.
* The only way to shut it down is to take out the integrated battery from the inside of the laptop.
Is there a way to find out which key "hides" my SysRq?
Zsolt
(51 rep)
Sep 13, 2021, 06:51 PM
• Last activity: Apr 25, 2024, 04:07 PM
1
votes
0
answers
129
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 functionality. * I enabled it with: ```lang-shell sudo sysctl kernel.sysrq=1 ``` * If a do: ```lang-shell cat /proc/s...
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 functionality.
* I enabled it with:
-shell
sudo sysctl kernel.sysrq=1
* If a do:
-shell
cat /proc/sys/kernel/sysrq
I get the expect 1
as the result.
* If I look at journal with:
-shell
journalctl -f
I'm expecting to get something like this if the key combination is right:
kernel: sysrq: HELP :
But it doesn't appear.
The operating system is Ubuntu 22.04.
I tried different combinations with Alt, Alt Gr, Fn and Ins, all without success, just some undesired screen shots. Probably the issue here is with the keyboard. Any suggestions?
Víctor Iglesias Castán
(11 rep)
Mar 9, 2024, 04:13 PM
• Last activity: Mar 12, 2024, 10:50 AM
2
votes
1
answers
1039
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://blastrock.github.io/fde-tpm-sb.html#disable-the-magic-sysrq-key > The magic SysRq key allows running some...
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://blastrock.github.io/fde-tpm-sb.html#disable-the-magic-sysrq-key
> The magic SysRq key allows running some special kernel actions. The most dangerous ones are disabled by default, and you should keep them that way for maximum security.
>
> For example, one of them (f) will invoke the OOM-killer. This function could kill your lockscreen, giving full access to your desktop to a malicious user.
The problem is that I only found how to disable **all** sysrq keys, e.g. https://askubuntu.com/questions/911522/how-can-i-enable-the-magic-sysrq-key-on-ubuntu-desktop or https://askubuntu.com/questions/11002/alt-sysrq-reisub-doesnt-reboot-my-laptop , using something adding a
/etc/sysctl.d/90-sysrq.conf
file with this line:
kernel.sysrq=1
I would like if possible to be able to use all the other keys e.g. REISUB in case the system crashes, and only have the F
key disabled.
I also found this article https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html , that mentions adding a bitmask like:
2 = 0x2 - enable control of console logging level
4 = 0x4 - enable control of keyboard (SAK, unraw)
8 = 0x8 - enable debugging dumps of processes etc.
16 = 0x10 - enable sync command
32 = 0x20 - enable remount read-only
64 = 0x40 - enable signalling of processes (term, kill, oom-kill)
128 = 0x80 - allow reboot/poweroff
256 = 0x100 - allow nicing of all RT tasks
but I don't understand how to have only sysrq-f disabled, and all other keys at their default value.
The current setup on my laptop (debian 12), is the following:
$ grep -IirF sysrq /etc/sysctl.*
/etc/sysctl.conf:# 0=disable, 1=enable all, >1 bitmask of sysrq functions
/etc/sysctl.conf:# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
/etc/sysctl.conf:#kernel.sysrq=438
$ grep -IirF sysrq /etc/sysctl.d/*
/etc/sysctl.d/99-sysctl.conf:# 0=disable, 1=enable all, >1 bitmask of sysrq functions
/etc/sysctl.d/99-sysctl.conf:# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
/etc/sysctl.d/99-sysctl.conf:#kernel.sysrq=438
user000001
(3795 rep)
Nov 5, 2023, 07:32 AM
• Last activity: Nov 5, 2023, 06:51 PM
0
votes
2
answers
314
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 assumes that the system's disk is `/dev/sda`, the partition mounted as root is `/dev/sda1`, and an empty...
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 assumes that the system's disk is
/dev/sda
, the partition mounted as root is /dev/sda1
, and an empty disk to clone it to is /dev/sdb
.
u > /proc/sysrq-trigger
Remounts all filesystems including the one mounted as root read-only.
-fy /dev/sda1
Corrects the filesystem errors caused by forcing the R/O remount.
if=/dev/sda of=/dev/sdb
clones the disk to the empty one.
-fy /dev/sdb1
fixes the newly cloned filesystem. At this step it usually tells about fixed block checksums.
-f
Reboots the system. At this step I disconnect the newly cloned disk, and plug it into a new PC.
I've used this method two times, and all machines are working fine, but I'm afraid that doing that could cause some dangerous filesystem issues? If yes, why? And should I avoid using this method to clone hard disks in the future?
melonfsck - she her
(150 rep)
Oct 25, 2023, 09:38 PM
• Last activity: Oct 27, 2023, 01:29 PM
6
votes
1
answers
5628
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 file as `/etc/sysctl.d/95-sysrq.conf` where I manually set `kernel.sysrq=1` so it's available as...
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 file as /etc/sysctl.d/95-sysrq.conf
where I manually set kernel.sysrq=1
so it's available as soon as possible (but possibly not soon enough depending on situation):
$ grep -nHi sysrq /usr/lib/sysctl.d/* /etc/sysctl.d/*
/usr/lib/sysctl.d/50-default.conf:16:# Use kernel.sysrq = 1 to allow all keys.
/usr/lib/sysctl.d/50-default.conf:17:# See http://fedoraproject.org/wiki/QA/Sysrq for a list of values and keys.
/usr/lib/sysctl.d/50-default.conf:18:kernel.sysrq = 16
/etc/sysctl.d/95-sysrq.conf:1:kernel.sysrq=1
**Is there a way to enable Sysrq from early boot, possibly also ignoring any setting for kernel.sysrq
?**, for example adding a kernel boot parameter (e.g., cat /proc/cmdline
for current ones) such as from the Grub boot menu (or in xen.cfg
's kernel=
line).
user306023
Sep 7, 2018, 01:55 AM
• Last activity: Jul 13, 2023, 04:40 PM
2
votes
0
answers
413
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 can't use `inotify`, because files under `/proc` aren't actually files. So how can I find out what...
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 can't use inotify
, because files under /proc
aren't actually files. So how can I find out what changes this value?
UPD:
Tried to change kernel config in /boot to have
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0001
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
And also editing /etc/sysct.conf to have
kernel.sysrq=1
And finally just echo 1 > /proc/sys/kernel/sysrq
.
The last one helps for a bit, but later it drops to 16 again.
GRbit
(21 rep)
Jan 19, 2023, 05:19 PM
• Last activity: Jan 20, 2023, 08:40 AM
4
votes
2
answers
8298
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` and the command `sendkey alt-sysrq-h` in the QEMU monitor reveals keycodes 99 ( SysRq ?), 56...
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
and the command sendkey alt-sysrq-h
in the QEMU monitor reveals keycodes 99 (SysRq?), 56 (Alt), and 35 (H). Using UltraVNC Viewer's Send Custom Key command, none of those numeric codes came out correctly when entered and viewed through showkey
.
user314104
(379 rep)
Dec 15, 2013, 10:55 PM
• Last activity: Oct 18, 2022, 08:14 AM
0
votes
1
answers
958
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 , U , B . Then it turned to a black screen with a tiny white line on the top left corn...
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, U, B.
Then it turned to a black screen with a tiny white line on the top left corner. Then I did Alt+PrtSc+REISUB several times, and there was no visible response. I held down the power button and shut it down.
These are the last few lines of log before I powered off the computer:
11:17:53 kernel: sysrq: Keyboard mode set to system default
11:17:53 kernel: sysrq: Keyboard mode set to system default
11:15:38 kernel: 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)
11:15:35 kernel: 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)
11:15:31 kernel: 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)
11:15:26 kernel: 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)
11:15:20 kernel: 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)
11:15:15 kernel: 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)
11:15:00 kernel: 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)
11:14:57 kernel: 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)
11:14:56 kernel: 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)
11:12:05 kernel: ---[ end trace a43d1a9c4ed7a4a1 ]---
11:12:05 kernel: Modules linked in: nls_iso8859_1 snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi intel_rapl_msr snd_hda_codec snd_hda_core snd_hwdep snd_pcm mei_hdcp intel_rapl_common intel_tcc_cooling x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm snd_seq_midi snd_seq_midi_event crct10dif_pclmul snd_rawmidi ghash_clmulni_intel aesni_intel crypto_simd cryptd rapl intel_cstate snd_seq snd_seq_device snd_timer i915 gigabyte_wmi wmi_bmof snd efi_pstore drm_kms_helper cec rc_core ee1004 i2c_algo_bit fb_sys_fops syscopyarea joydev input_leds soundcore mei_me sysfillrect sysimgblt mei mac_hid acpi_pad acpi_tad sch_fq_codel msr parport_pc ppdev drm lp parport ip_tables x_tables autofs4 hid_generic usbhid hid crc32_pclmul e1000e i2c_i801 nvme i2c_smbus nvme_core ahci xhci_pci libahci xhci_pci_renesas wmi video
11:12:05 kernel:
11:12:05 kernel: R13: 00007ffd70516ca8 R14: 00007f606a9e6018 R15: 00007ffd70516bb8
11:12:05 kernel: R10: 00007ffd7051d090 R11: 0000000000000293 R12: 0000000000000000
11:12:05 kernel: RBP: 00007ffd70516ca4 R08: 0000000000000000 R09: 0000000000000000
Despite the log shows "Keyboard mode set to system default", the computer didn't shut down, even after I had waited for several minutes. How do I make REISUB work?
OS is Ubuntu 20.04.3 LTS.
edit: These are the entries of syslog at about the time the freeze happened.
11:12:01 kernel: RAX: feff8d06657e1cc0 RBX: ffffe01c08836000 RCX: 0000000000000007
11:12:01 kernel: RSP: 0018:ffffaf8f8127bac0 EFLAGS: 00010202
11:12:01 kernel: Code: 3d 3d 01 48 29 c8 41 8b 48 20 89 c6 48 0f af f1 41 0f b6 48 24 48 c1 ee 20 29 f0 d3 e8 41 0f b6 48 25 01 f0 d3 e8 48 8d 04 c2 8b 20 4d 85 e4 0f 84 af 00 00 00 48 c7 00 00 00 00 00 41 8b 70
11:12:01 kernel: RIP: 0010:memcg_slab_free_hook+0x70/0x230
11:12:01 kernel: Hardware name: Gigabyte Technology Co., Ltd. B365 M AORUS ELITE/B365 M AORUS ELITE-CF, BIOS F2 08/13/2019
11:12:01 kernel: CPU: 0 PID: 1949 Comm: Socket Thread Not tainted 5.13.0-37-generic #42~20.04.1-Ubuntu
11:12:01 kernel: general protection fault, probably for non-canonical address 0xfeff8d06657e1cc0: 0000 [#1] SMP PTI
Mar 26 10:45:19 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 10:45:19 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 10:45:19 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 10:45:19 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 10:45:19 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 10:45:19 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 10:45:19 gnome-shell: g_dbus_connection_emit_signal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Mar 26 10:45:19 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 10:45:19 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 11:03:49 dbus-daemon: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.81' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:03:49 systemd: Starting Fingerprint Authentication Daemon...
Mar 26 11:03:49 dbus-daemon: [system] Successfully activated service 'net.reactivated.Fprint'
Mar 26 11:03:49 systemd: Started Fingerprint Authentication Daemon.
Mar 26 11:03:59 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 11:03:59 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 11:03:59 NetworkManager: [1648263839.2005] agent-manager: agent[7cccc8467972acfa,:1.81/org.gnome.Shell.NetworkAgent/1000]: agent registered
Mar 26 11:03:59 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.freedesktop.FileManager1' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:03:59 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 11:03:59 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 11:03:59 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.gnome.Nautilus' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:03:59 gnome-shell: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Mar 26 11:03:59 gnome-shell: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
Mar 26 11:03:59 gnome-shell: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
Mar 26 11:04:19 systemd: fprintd.service: Succeeded.
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.gnome.ControlCenter.SearchProvider' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.gnome.Nautilus' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.gnome.Calculator.SearchProvider' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Activating service name='org.gnome.Calendar' requested by ':1.43' (uid=1000 pid=1517 com
m="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Activating service name='org.gnome.Characters.BackgroundService' requested by ':1.43' (u
id=1000 pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Activating service name='org.gnome.seahorse.Application' requested by ':1.43' (uid=1000
pid=1517 comm="/usr/bin/gnome-shell " label="unconfined")
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.se
rvice' requested by ':1.43' (uid=1000 pid=1517 comm="/usr/bin/gnome-shell " label="uncon
fined")
Mar 26 11:04:41 systemd: Created slice apps.slice.
Mar 26 11:04:41 systemd: Created slice apps-org.gnome.Ter
minal.slice.
Mar 26 11:04:41 systemd: Starting GNOME Terminal Server..
.
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Successfully activated service 'org.gnome.ControlCenter.SearchProvider'
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311]
Successfully activated service 'org.gnome.seahorse.Application'
Mar 26 11:04:41 dbus-daemon: [system] Activating via syste
md: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.servic
e' requested by ':1.184' (uid=1000 pid=5785 comm="/usr/bin/gnome-calendar --gapplication
-service " label="unconfined")
Mar 26 11:04:41 systemd: Starting Time & Date Service...
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.Terminal'
Mar 26 11:04:41 systemd: Started GNOME Terminal Server.
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.Characters.BackgroundService'
Mar 26 11:04:41 dbus-daemon: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 26 11:04:41 systemd: Started Time & Date Service.
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.Calendar'
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.Nautilus'
Mar 26 11:04:41 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.Calculator.SearchProvider'
Mar 26 11:04:43 dbus-daemon: [session uid=1000 pid=1311] Activating service name='org.gnome.gedit' requested by ':1.119' (uid=1000 pid=5780 comm="/usr/bin/nautilus --gapplication-service " label="unconfined")
Mar 26 11:04:43 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.gnome.gedit'
Mar 26 11:04:48 dbus-daemon: [session uid=1000 pid=1311] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by ':1.2' (uid=1000 pid=1308 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Mar 26 11:04:48 systemd: Starting Tracker metadata database store and lookup manager...
Mar 26 11:04:48 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.freedesktop.Tracker1'
Mar 26 11:04:48 systemd: Started Tracker metadata database store and lookup manager.
Mar 26 11:04:48 dbus-daemon: [session uid=1000 pid=1311] Activating via systemd: service name='org.freedesktop.Tracker1.Miner.Extract' unit='tracker-extract.service' requested by ':1.2' (uid=1000 pid=1308 comm="/usr/libexec/tracker-miner-fs " label="unconfined")
Mar 26 11:04:48 systemd: Starting Tracker metadata extractor...
Mar 26 11:04:48 tracker-extract: Set scheduler policy to SCHED_IDLE
Mar 26 11:04:48 tracker-extract: Setting priority nice level to 19
Mar 26 11:04:48 dbus-daemon: [session uid=1000 pid=1311] Successfully activated service 'org.freedesktop.Tracker1.Miner.Extract'
Mar 26 11:04:48 systemd: Started Tracker metadata extractor.
Mar 26 11:04:51 systemd: gnome-terminal-server.service: Succeeded.
Mar 26 11:04:58 systemd: tracker-extract.service: Succeeded.
Mar 26 11:05:11 systemd: systemd-timedated.service: Succeeded.
Mar 26 11:05:18 tracker-store: OK
Mar 26 11:05:18 systemd: tracker-store.service: Succeeded.
Mar 26 11:05:19 rtkit-daemon: Supervising 6 threads of 5 processes of 1 users.
istakanvd
(1 rep)
Mar 26, 2022, 04:56 AM
• Last activity: Apr 1, 2022, 01:48 PM
5
votes
0
answers
1031
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 currently to have to hard-reboot the system. I have checked `/proc/config.gz` and it seems the SysRq key...
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 currently to have to hard-reboot the system. I have checked
/proc/config.gz
and it seems the SysRq key is enabled in the kernel config:
CONFIG_MAGIC_SYSRQ=y
So, my questions are as follows:
a) How can I verify what (if any) key is currently mapped to SysRq?
b) I would like to remap the Apple 'Command' key to SysRq (since I don't believe it is currently being used). How can I do that?
**Edit:**
Referring to the answer given here , the contents of `/proc/sys/kernel/sysrq' is as follows:
$ cat /proc/sys/kernel/sysrq
0
this seems to indicate that the SysRq key is disabled (despite apparently being enabled in the kernel config) - why is that? (note that I don't believe that linked answer addresses part a) of my question).
Time4Tea
(2628 rep)
Dec 18, 2021, 10:28 AM
• Last activity: Dec 19, 2021, 12:03 AM
0
votes
0
answers
68
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 machine, and verify that no program is hogging CPU / memory). It gives the appearance of being "froz...
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 machine, and verify that no program is hogging CPU / memory).
It gives the appearance of being "frozen" though, because moving the mouse or keyboard doesn't do *anything*. The keyboard's caps lock key doesn't lead to caps light toggling.
Plugging the devices in / out doesn't help. However, the
reisub
sequence works to reboot the system, so perhaps the system doesn't stop receiving input, only the output.
I'm mostly having trouble understanding where the issue could be. But I'm in a fortunate situation of being able to ssh into the machine and have full control over it, so I'd like to know what I should try next time this happens.
System-specific details: Ubuntu 20.04 with default GNOME and X11.
Peeyush Kushwaha
(586 rep)
Nov 29, 2020, 12:26 PM
• Last activity: Nov 29, 2020, 03:21 PM
1
votes
1
answers
2324
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?
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
(123 rep)
Sep 15, 2020, 12:18 AM
• Last activity: Sep 15, 2020, 08:47 AM
2
votes
0
answers
29
views
System too busy for magic SysRq
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 due to a resource starvation rather than due to a deadlock, because this happens progressively an...
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 due to a resource starvation rather than due to a deadlock, because this happens progressively and the signs are the same every time:
1. some demanding process takes up 100% CPU and starts allocating large amounts of memory (this is intentional: typically a calculation of some sort),
2. memory allocation goes out of hand (I have a widget to watch resource usage in the toolbar),
3. process switches become laggy, I can't issue the command to cancel the task fast enough,
4. mouse stops moving and keyboard input does not go through,
5. if any music was playing, it goes into a ~3-second loop and then stops.
In several hopeless seconds, everything is completely frozen. This is when every guide tells you to use SysRq, but that does not react either. Allow me to say again, I am absolutely sure I am using the right key combination for the machine and under any other condition I could to S+U+B, or launch the OOM killer, or anything else, but after the first two steps happen my system seems to be beyond the point of no return.
Surely enough, the keyboard will still send interrupts to the processor, so the fault is on the kernel's side for not processing them with enough priority (I would expect absolute priority over everything else and unconditional immediate execution of these requests). **Is it somehow possible to request reserving some minimal resources in the kernel, in terms of guaranteed CPU time and memory, so that my SysRqs *always* go through?**
I'm currently running 5.8.5 kernel in an Arch Linux distribution, if this makes any difference. I have a feeling that the swapping mechanism may be involved, but haven't been able to diagnose this hypothesis properly. I have 12GB of RAM + 4GB swap.
Edit: I'm not interested in workarounds like identifying the offending process(es) and limiting its resources in advance. I'm leaving that for the last resort.
The Vee
(310 rep)
Sep 8, 2020, 12:36 PM
• Last activity: Sep 8, 2020, 02:10 PM
1
votes
0
answers
79
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, so it feels like i've got to do something to capture more data "in the moment" I want to use `SysR...
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, so it feels like i've got to do something to capture more data "in the moment"
I want to use
SysRq
to collect more information before rebooting - what approach should i take?
Doug
(111 rep)
Aug 22, 2020, 08:39 PM
6
votes
1
answers
17162
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": No such file or directory```, but ```sysctl -a``` returns [this][1]. So, I want t...
I want to change two values using sysctl. One is the
vm.swappiness=10
and the other, kernel.sysrq=1
. However, when I run -p
, it tells me : cannot open "/etc/sysctl.conf": No such file or directory
, but -a
returns this .
So, I want to ask where is my system storing sysctl config?
Akshat Vats
(489 rep)
Jun 25, 2020, 01:55 PM
• Last activity: Jun 25, 2020, 03:54 PM
2
votes
2
answers
672
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 connection closes. I want to remotely reset the machine via `echo 'reisub' > /proc/sysrq-trigge...
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 connection closes.
I want to remotely reset the machine via echo 'reisub' > /proc/sysrq-trigger
(which I believe should be possible since the kernel and ssh are still running). I have tried the following
ssh -T "echo 'reisub' > /proc/sysrq-trigger"
but ssh is still trying to call /bin/bash
and gives the same error. Is there any way to run the command directly (via ssh) instead of first calling bash?
mvphys
(101 rep)
May 23, 2020, 05:11 PM
• Last activity: May 23, 2020, 07:22 PM
3
votes
1
answers
507
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 my SysRq options are enabled: ``` $ cat /proc/sys/kernel/sysrq 1 ``` I use a 11-years-old m...
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 my SysRq options are enabled:
$ cat /proc/sys/kernel/sysrq
1
I use a 11-years-old machine (Intel Q9550 / ASUS P5E3, assembled by myself) that currently runs a Fedora 31
linux distribution, but the problems shows up at least since Fedora 25
. I first suspected the custom kernels from this distribution to be the cause, but it seems to occur with self-compiled genuine kernels too.
It also used to work in the past and with other distribs such as Knoppix, but I can't remember when it started to happen.
Nothing happens nor shows up when I do SysRq+B, neither on console nor dmesg log. Every other option (in particular, R, E, I or S) seems to be OK, and to produce log trafic. Does anybody know what could cause the reboot operation to be disabled ?
This leads my to a "secondary" question:
Inside the kernel source, at rows 447
and 469
of drivers/tty/sysrq.c
, I can see:
&sysrq_reboot_op, /* b */
…
/* o: This will often be registered as 'Off' at init time */
NULL, /* o */
So rebooting (which not currently works for me) is supposed to be always defined by default while turning off (which does work) is set to NULL, then defined at init time. I couldn't find which is this actor, nor at what exact time this powering off option is enabled. Could you help me on this too ?
Many thanks in advance for your help.
EDIT : lastest kernel at write time is 5.5.1
but the code quoted above belongs to 5.4.15
and older, and I'm running the Redhat's 5.4.15-200.fc31.x86_64
package.
Obsidian
(161 rep)
Feb 25, 2020, 11:38 PM
• Last activity: Feb 26, 2020, 04:19 PM
2
votes
1
answers
1353
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 online and I tried the following input key check, and the response for the command was this. # dmesg | grep -i sysrq...
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 online and I tried the following input key check, and the response for the command was this.
# dmesg | grep -i sysrq
[18494.528450] sysrq: SysRq : Show backtrace of all active CPUs
[18494.528496] sysrq_handle_showallcpus+0x17/0x20
[18494.528499] __handle_sysrq+0x9f/0x170
[18494.528502] sysrq_filter+0x98/0x3e0
Even when I tried
echo h > /proc/sysrq-trigger
, the result woundn't be displayed, either. But, dmesg | grep -i sysrq
replied:
[21964.365327] sysrq: 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)
enter code here
By these dmesg
responses, I believe the OS, at least, recognizes a letter from echo
command as a SysRq input.
How can I have the OS display a result of echo l > /proc/sysrq-trigger
on the current terminal?
buck_banzai
(65 rep)
Aug 14, 2019, 09:58 PM
• Last activity: Aug 15, 2019, 09:09 AM
0
votes
1
answers
500
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.
What is the difference between the two? In a Linux 2.6.x kernel.
Gregg Leventhal
(7788 rep)
Mar 14, 2016, 03:40 PM
• Last activity: Dec 26, 2018, 10:50 PM
0
votes
1
answers
532
views
Set kernel.sysrq = 1 in /etc/sysctl.d/10-magic-sysrq.conf using command?
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 other lines are in that file. Is there not something similar to a *where*?
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 other lines are in that file.
Is there not something similar to a *where*?
neverMind9
(1720 rep)
Apr 30, 2018, 12:02 AM
• Last activity: Nov 1, 2018, 07:35 AM
Showing page 1 of 20 total questions