I just edited my post - there is a link at the end, explaining what I tried to convey here in few words.
… pretend it is frozen
I just edited my post - there is a link at the end, explaining what I tried to convey here in few words.
… pretend it is frozen
Thanks for the reply, it and this tutorial are really helpful.
Anyway, I am just impressed by how hidden these solution is given that the risk of not knowing it (broken filesystem due to repeated hard shutdown) can inflict the victim a deep grief. My laptop have been going frozen a couple times since using Manjaro, all of them during boot, sometimes after the GRUB OS selection but before splash screen or even before it even shows the GRUB page. When it happens, the screen is just completely blank but the keyboard keys are still lit.
If I had not had this frozen boot issue, I would not stumble upon this tutorial unless by chance, as I don’t know that the frozen boot issue exists and hard-resetting it is frowned upon (I had only used Windows or MacOS in the past and I hadn’t had this issue). So I guess, someone whose machine-LinuxOS combination happens to suffer from the frozen boot symptom is almost fated to have some small parts of his system broken due to him being forced to hard-reset, probably several times until he has a feeling that hard-reset sounds somewhat dangerous, is moved to Google it, and find a solution like this. This is only after some parts of his filesystem got corrupted, but he doesn’t know because future problems arising due to this haven’t surfaced. The point is, any plan to fix it in future updates?
@Nachlese Thanks for responding to @jawanari .
In the meantime, the tutorial has been adapted so it’s more clear as to what to do for the next person (I hope).
But you did and you did!
No!
No-once forced you to do anything! Linux is not Windows, so go read this:
All of it!
You mean the main reason of getting stuck at boot is the power problem? And what needs to be fixed is the kernel?
Indeed, no one forced linux user to hard shutdown when his machine got stuck during boot. It is the combination of human instinct and not knowing the correct way that forces him. When we don’t know the correct emergency shutdown such as this article, what else will come to mind to regain control of our computer other than moving our finger to reach the power button.
I simplified the method for execute it, I followed the solution which I found here:
Bash script:
#!/bin/sh
for c in r s u o; do
echo $c > /proc/sysrq-trigger
sleep 1
done
Saved as /usr/local/bin/reisuo
Inserted such script in sudoers (because only root can write to /proc/sysrq-trigger
) :
my-username ALL=NOPASSWD: /usr/local/bin/reisuo
I made a keyboard shortcut in Xfce (xfce4-keyboard-settings): which execute
sudo /usr/local/bin/reisuo
Works like a charme.
EDIT: i choosed kernel.sysrq=1
for enable REISUO.
my thoughts and criticism:
the script is missing the “e
” and the “i
” steps of the r e i s u o
sequence
(because either the first one, but certainly the second one, would kill the script itself)
and the “o
” as the last parameter might not work, as it relies on APM to shut down the system
… “b
” is for reboot ( r e i s u b
)
The time in between the commands (1 s) might not be enough to finish the “s
” step (flush to disk) before the “u
” step kicks in, unmounting all filesystems.
Essentially, the script forces a “sync” and then, after one second, an unmounting of all filesystems,
all while all processes are still running.
The “r
” is not even necessary with this script (I guess, from what I understand what it does).
This is all for cases when the system is seriously hung, as in: not functioning normally …
Of course the script probably works when this is not the case …
I’d rather just remember the sequence and what action each of the characters represent and use each one when necessary and appropriate.
For me is ok in such way; I just reported the method which I’m using.
Anyway this script works fine here.
This is all fine and dandy as long as Xorg still runs and processes your keyboard events…
Keep in mind though: “The magic SysRq key” on the other hand is directly understood by the linux kernel and will work in situations where that keyboard shortcut will not trigger the script.
Yes, I am aware of this; however the combionation of fn+SysRq keys are distant on my laptop’s keyboard and I’d have to use both hands only to press them, and I have no way to digit R E I S U O/ R E I S U B at the same time. I would need a third hand
A post was split to a new topic: What is the keyboard combination for SysRq on a Thinkpad T400p?
Sorry to come back here but on my recent unbooting Manjaro, both REISUB and REISUO don’t work. I have tried any possible combination for the SysReq equivalents provided in the original post. I still have to push the power button to hard turn off. I can confirm that the SysRq has been correctly enabled by testing REISUO when I get in the system successfully - it does shut the computer off. FYI, the kind of system freeze I often experienced is that the screen stays black before even the grub’s OS selection appears.
If your system doesn’t even reach grub, then Manjaro is not even loaded, so the key combination can’t work.
That’s what I suspect. Then the hard shutdown is safe?
I’ve got a hp laptop with a ryzen 5 and Radeon graphics.
The combo that worked for me was
alt+prt sc + r
letting go of r and prt sc and holding alt key the whole time…
then
prt sc + e
wait a few seconds
prt sc + i (graphical dropped into terminal screen here)
wait a few seconds
prt sc + s
wait a few seconds
prt sc + u
wait a few seconds
prt sc + b …computer reboots…
I did have to enable this functionality though, as described above.
Thanks for this, I really hate seeing journal messages about orphans.
Lol, I didn’t even know that manjaro had an update-grub alias, I always just did it manually same as back in arch. It’s not that long of a command anyways.
Thanks for this, I sometimes had to use the power button to force off my machine when it hung on shutdown when I couldn’t wait to see what was making it hang, it’s a good to know there’s a less cringe inducing alternative, I did not know this existed.
Just gotta find that SysRq key now
Edit: it was Alt+Print Screen, I think this is just standard for modern PCs probably (laptops included, mine is a laptop, recent too, like 2019 make maybe)
Easy way to find the right key if ur on X is to just run xev and try combinations until it tells you it’s sysrq.
@jawanari hard shutdown as you call it is not safe at all, i know someone personally who fried his PC doing it (don’t remember how exactly it broke, whether it wouldn’t get power at all (dead psu) or if it got power but didn’t POST (potentially dead cpu) just that it was fried and he bought a new one)
That is an extreme case and shouldn’t actually be possible though, but it can damage your hard drive, it will corrupt your filesystem almost guaranteed (though linux should be able to recover from that) it can also damage your SSD though i’m not sure to what extent.
Pulling the power plug though is a lot worse, a common way for people’s PCs to get fried, so definitely don’t do that either.
If your system is freezing before you even get to GRUB though, this is not a manjaro problem, it’s not a grub problem, it’s either a BIOS problem or faulty hardware problem.
Uff… I have a PhD in physics and work in science education at a university, but I hardly can even ask a specific question to address what I do not understand, cause I have fundamentally a hard time of following this tutorial. That also makes it impossible to me to provide a helpful constructive criticism of what to change to make it more legible.
I don’t have a PhD; only a BSc in chemisttry, but cannot answer your question because it’s not a question, so some tips:
This sequence helped me to figure out which keys worked and understand further …
journalctl -f
(hold Alt, press Fn+SysReq, press R, release Alt)
Oct 19 09:28:29 delphin kernel: sysrq: This sysrq operation is disabled.
(hold Alt, press Fn+SysReq, press E, release Alt)
Oct 19 09:28:31 delphin kernel: sysrq: This sysrq operation is disabled.
(hold Alt, press Fn+SysReq, press I, release Alt)
Oct 19 09:28:34 delphin kernel: sysrq: This sysrq operation is disabled.
(hold Alt, press Fn+SysReq, press S, release Alt)
Oct 19 09:28:38 delphin kernel: sysrq: Emergency Sync
Oct 19 09:28:38 delphin kernel: Emergency Sync complete
(hold Alt, press Fn+SysReq, press U, release Alt)
Oct 19 09:28:41 delphin kernel: sysrq: This sysrq operation is disabled.
(hold Alt, press Fn+SysReq, press B, release Alt)
Oct 19 09:28:44 delphin kernel: sysrq: This sysrq operation is disabled.
From there I figured out the keypresses were correct, and why they seemed to do nothing.
Next steps: reread the instructions above on how to enable the keys, especially the link to the documentation for kernel key shortcuts (in the REISUB steps).
Thank you for highlighting some super-useful hotkeys!
Thread tidied.
Honor The Dude.
A post was split to a new topic: I don’t know how to locate SysRq