What do we need to check after a forced shutdown?

Today I ran into a system freeze (probably caused by LibreOffice) and, not having thought of other possibilities (Ctrl+Alt+Del, Ctrl+Alt+F1), I forcibly shut down the laptop from the power key.
I thought, therefore, that it would be useful to investigate what happens to the system in these cases and whether it is necessary to verify the integrity of any component at the next boot of the system (file corruption, file system corruption, etc.); or that journalctl doesn’t show more errors than it used to.
Thanks to those who want to give feedback.

1 Like

I would run top through a terminal and check your memory for clues of reaching abnormal high levels of usage.

A better way to stop a frozen program might involve using a terminal command of “ps ax” and within that list of output look for something within the COMMAND column that has a link path to Libre running. From there simply input the command kill (followed by a space) and then the PID number for where Libre is running. This might unlock Libre and shut down the program with return to normal operation of the operating system and desktop session. If you are locked into the frozen state and unable to call up a terminal to try this option you could, as suggested in your thread writing, Ctrl Alt F1,2,3,4 or to any other text line session, log back into your account and call up ps ax that way to kill the program freezing your desktop session, then return to the GUI you were in. After this procedure you should at least be able to tell whether LIbre is causing the problem or some other deeper troubleshooting is necessay.

1 Like

In KDE you can also just enter “kill appname” in the start menu (kickoff) or krunner (which use the same modules).

But this is about “what does a shutdown process do that may be important” if I understood correctly.

this would be the difference between systemctl shutdown -h now or short shutdown now and poweroff.

You can see what the system does on a normal shutdown with journalctl -b -1 -r (from last to first) and all these things where likely skipped.

Thank you for your feedback.
Yes, I’ll definitely do that next time. The problem is that I don’t know if it would have worked since it was really all frozen.

Yes, that’s what I did. In that session there is no shutdown (as is normal), precisely because the system was brutally shut down. In the next session the registry detected that the previous shutdown “was not clean”, so somehow the system knows what happened.
If it happens again, I hope to be able to use a less brutal solution.

1 Like

Current systems include filesystem checks at startup (see man 8 systemd-fsck). If there are serious problems the system may take a long time to boot while fsck (filesystem check) runs, /lost+found may contain “recovered” data, and journalctl -b -g fsck should report non-zero exit status for fsck.

2 Likes

There don’t seem to be any critical messages here. So, if I understand correctly, everything should be fine.

The system should be good – there might be loss of recent changes to any documents that were being changed in applications.

1 Like

Only if the system is not unresponsive. You can use the kill command in Gnome too. It’s a Linux thing, not a desktop thing.

1 Like

Yes for sure, and the fact that we have no good way to kill stuff when the system doesnt respond is a problem.

The command works, but not in every GUI. In KDE you can type that in the searchbar and it autocompletes running programs.

1 Like

Well I think you can from the popup command entry window in Gnome too, I just haven’t tried that yet.

1 Like

One thing to be aware of is QA/Sysrq - Fedora Project Wiki which might allow for a more graceful shutdown. This is also an interesting read magic sysrq - What's the difference between REISUB and a regular reboot? - Unix & Linux Stack Exchange

1 Like

I’ve had this a few times a couple of weeks back, it was caused by one or more Gnome extensions I had installed from their extension website. Never again!.
People here are suggesting a kill command but don’t seem to realise that there is no way for the system to accept your keyboard input. Gnome is frozen and you cannot flip to console, bring up menu’s or load GUI apps, no 3 key combo works no way to offer a kill command.

If you have sshd running on that box, you could try that if the freeze happens again.

1 Like

In my case, there are no extensions installed. It all started with a LibreOffice crash. One thing to keep in mind, however, is to wait; Sometimes by waiting the system recovers for a few moments and maybe at that moment you can open a shell. Maybe.