How can I retrieve messages that splash on the screen, just before shutdown? [Solved]
How can I retrieve messages that splash on the screen, just before shutdown? [Solved]
A few times, when I did a shutdown (or restart), I happened to see a number of text lines, right before the computer shut down completely. About 3 times there were about 10-15 of such text lines. It flashes by too fast to be able to read them. Is there a program that let's me look back what these messages were?
Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-15-amd64
OS Type: 64-bit
Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-15-amd64
OS Type: 64-bit
Last edited by SO2001 on Thu Jul 07, 2022 12:05 am, edited 1 time in total.
Re: How can I retrieve messages that splash on the screen, just before restarting?
Try var/log/boot.log. I had to open it as root.
Re: How can I retrieve messages that splash on the screen, just before restarting?
Newbie question: how do I open var/log/boot.log as root?
In the right click context menu I can change "ownership to root" or "ownership to active user". Should I select one of those 2 options? I dont dare mess with these on my own, afraid I will bork the system....
In the right click context menu I can change "ownership to root" or "ownership to active user". Should I select one of those 2 options? I dont dare mess with these on my own, afraid I will bork the system....
- Eadwine Rose
- Administrator
- Posts: 14477
- Joined: Wed Jul 12, 2006 2:10 am
Re: How can I retrieve messages that splash on the screen, just before restarting?
I just click edit as root. And then don't edit it 

MX-23.6_x64 July 31 2023 * 6.1.0-34amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030
Re: How can I retrieve messages that splash on the screen, just before restarting?
Code: Select all
sudo cat /var/log/boot.log
So, here's it: https://forum.mxlinux.org/viewtopic.php ... 20#p684220
Re: How can I retrieve messages that splash on the screen, just before restarting?
You can install KDE's KSystemLog via Synaptic/Discover/.. or terminal:
Code: Select all
sudo apt install ksystemlog
Re: How can I retrieve messages that splash on the screen, just before shutdown?
I rightclicked the boot.log file in var/log/boot.log and selected "ownership to active user". Afterwards I changed it back to "ownership to root". The bootlog file gave information about one startup yesterday. No other startups info. And it only seemed to be info about starting the OS up, not shutting it down.
I have installed Ksystemlog now. I have changed the settings to save the logs for multiple boots, because what I am eager to find out is what the messages are right before shutdown (or restart), not the ones during startup. Right before the screen goes completely black before shutdown, sometimes there are a lot of textlines.
Now I am waiting for these textlines to appear again and now they (ofcourse) dont :).
Ksytemlog has lots of information and I guess that I have to select the systemlog, because that seems to have the most relevant info. In the systemlog tab I then select the date tab, so I can scroll down to the time my computer shut down.
But again, now I have to wait for these messages to appear again... :)
I have installed Ksystemlog now. I have changed the settings to save the logs for multiple boots, because what I am eager to find out is what the messages are right before shutdown (or restart), not the ones during startup. Right before the screen goes completely black before shutdown, sometimes there are a lot of textlines.
Now I am waiting for these textlines to appear again and now they (ofcourse) dont :).
Ksytemlog has lots of information and I guess that I have to select the systemlog, because that seems to have the most relevant info. In the systemlog tab I then select the date tab, so I can scroll down to the time my computer shut down.
But again, now I have to wait for these messages to appear again... :)
Re: How can I retrieve messages that splash on the screen, just before shutdown?
Yes, I had one of those moments again, that right before shutdown, some 15-20 textlines very briefly appeared. I searched for the time my computer shutdown in the system log of the program Ksystemlog, but I couldnt find/recognize the messages. Because Ksystemlog keeps putting in new entries in the system log all the time, while I was reading, I couldnt keep the page frozen at one point, for me to read all the many entries well.
No biggie, it's nice to have Ksystemlog installed anyway, especially if there are severe errors, then Ksystemlog is the place to look, as far as I know. And there arent any severe errors. That's positive!
No biggie, it's nice to have Ksystemlog installed anyway, especially if there are severe errors, then Ksystemlog is the place to look, as far as I know. And there arent any severe errors. That's positive!
Re: How can I retrieve messages that splash on the screen, just before shutdown?
Here you go:SO2001 wrote: Thu Jul 07, 2022 12:22 pm I searched for the time my computer shutdown in the system log of the program Ksystemlog, but I couldnt find/recognize the messages. Because Ksystemlog keeps putting in new entries in the system log all the time, while I was reading, I couldnt keep the page frozen at one point, for me to read all the many entries well.
https://docs.kde.org/stable5/en/ksystem ... ading.html
KSystemLog provides an easy way to control the reading and the monitoring of log files. Indeed, sometimes you only need to analyze some existing log lines. In this case, you cannot tolerate the appearance of a new line. You can deactivate the monitoring of log files by clicking on the Stop button. This stops the opened log files from being updated while still letting them get filled by other processes. Of course, you can reactivate the monitoring by clicking on Resume, which will display the log lines added since the last pause.
Re: How can I retrieve messages that splash on the screen, just before shutdown?
I know you were asking about a way to "look back what these messages were", but I do not believe that is possible from the system logs because the file system is being dismounted as part of the shutdown (halt) procedure.
There are other ways to record this information such as taking a video or image of the screen during shutdown or using a video capture card (from another computer?) to record the video output from the motherboard, etc., but they are not really practical.
I found a way that will pause the end of the rapidly scrolling text that occurs during a shutdown or restart. While it will NOT write that information to a log file, it will pause the text so it can be read and then "Enter" is used to complete the shutdown (halt).
While this works to read the text, it will not allow scrolling or paging the text so there is no way to read any text above the top line in the screen.
PgUp/Dn does not work, Shift+PgUp/Dn no longer works (see bullet below), and the 25+ special key combinations I tried do not work. I tried the screen and tmux commands but that is useless here because any command to enter needs the Enter key to run, and that same key is what resumes the shutdown process.
However when pausing the text, "Shutting down system..." will remain on the screen indefinitely and the keyboard, while recognized, will have no effect on the system regardless of any key or key combination used (the "Press Enter to continue" prompt never appears). The only thing to do at this point is to remove power from the computer or reset or hold the power switch in for several seconds so the motherboard will take control.
The pause function DOES work on MX-21 Xfce 5.10.0-15 (I also tested with 4.19.202-antix.1-amd64-smp) but both will only pause on the last full screen of text. Any text above that is not accessible, at least not that I am aware of.
I took a video of the monitor showing the shutdown text scrolling by. I was using the pause feature and pieced together two images from that video so all the lines of text appear in this one image. The text has stopped scrolling and is waiting for the Enter key to finish the shutdown (Ctrl+D or typing in "exit" will also work) as can be seen on the bottom line. The red rectangle at the top shows the text that cannot be seen when the "Press Enter to continue" line is displayed at the bottom. A 1920x1080 screen is being used so with that screen resolution and my system there are only five lines that cannot be read.
Since you said that you were new (Post #3) I will try to make the procedure as easy as possible by using the Terminal so only commands are needed to configure the files.
In testing I used MX-21 Xfce with the Thunar file manager so I don't know if KDE will produce the same results.
1. In /etc/init.d/, create a new document called "pause_hook". There are several ways to do this but the easiest will be to simply run the below command. When this command is pasted into the terminal a warning will appear "Unsafe Paste" because the command contains line feeds. If you trust the code (I do) then click on "Paste". If not then use the text in the next code window to manually add it to the "pause_hook" file.
If you want to manually put the text into the "pause_hook" file then use this text:
2. Make the Step 1 file executable by running the below command:
If the command is successful then the output should look like this:
3. Run the below command so the script will be run at shutdown or reboot. This will add "pause_hood" as a service:
4. Now "pause_hood" needs to be enabled. Create /etc/pause_hook.conf and add "PAUSE_HOOK_ENABLED=true" (without the quotes) in the "pause_hook.conf" file. An easy way to do all of that is to run the below command (see the step 1 "Paste" warning - it's okay to click on "Paste" at this point - otherwise do it manually):
That's it. The next time there is a shutdown or restart, the scrolling text will (should) be paused until "Enter" is used to complete the action.
To disable the pause on shutdown/restart, just go into the /etc/pause_hook.conf file and comment out the only line there, which will then look like "#PAUSE_HOOK_ENABLED=true" (without the quotes). To enable it, just un-comment it (remove the number symbol "#"). This must be done as root of which there are several ways. One way, in Thunar, is to right-click that file and select "Edit as Root".
There are other ways to record this information such as taking a video or image of the screen during shutdown or using a video capture card (from another computer?) to record the video output from the motherboard, etc., but they are not really practical.
I found a way that will pause the end of the rapidly scrolling text that occurs during a shutdown or restart. While it will NOT write that information to a log file, it will pause the text so it can be read and then "Enter" is used to complete the shutdown (halt).
While this works to read the text, it will not allow scrolling or paging the text so there is no way to read any text above the top line in the screen.
PgUp/Dn does not work, Shift+PgUp/Dn no longer works (see bullet below), and the 25+ special key combinations I tried do not work. I tried the screen and tmux commands but that is useless here because any command to enter needs the Enter key to run, and that same key is what resumes the shutdown process.
- Shift+PgUp/Dn did work a few years ago to page up/down when paused but not now because beginning with kernel 5.9 it is no longer supported (thank you Linus Torvalds) https://www.phoronix.com/scan.php?page= ... Scrollback
I also tested MX-21 using the 4.19.202 kernel because I thought Shift+PgUp/Dn would work with kernels earlier than 5.9 but it did not.
However when pausing the text, "Shutting down system..." will remain on the screen indefinitely and the keyboard, while recognized, will have no effect on the system regardless of any key or key combination used (the "Press Enter to continue" prompt never appears). The only thing to do at this point is to remove power from the computer or reset or hold the power switch in for several seconds so the motherboard will take control.
The pause function DOES work on MX-21 Xfce 5.10.0-15 (I also tested with 4.19.202-antix.1-amd64-smp) but both will only pause on the last full screen of text. Any text above that is not accessible, at least not that I am aware of.
I took a video of the monitor showing the shutdown text scrolling by. I was using the pause feature and pieced together two images from that video so all the lines of text appear in this one image. The text has stopped scrolling and is waiting for the Enter key to finish the shutdown (Ctrl+D or typing in "exit" will also work) as can be seen on the bottom line. The red rectangle at the top shows the text that cannot be seen when the "Press Enter to continue" line is displayed at the bottom. A 1920x1080 screen is being used so with that screen resolution and my system there are only five lines that cannot be read.
Since you said that you were new (Post #3) I will try to make the procedure as easy as possible by using the Terminal so only commands are needed to configure the files.
In testing I used MX-21 Xfce with the Thunar file manager so I don't know if KDE will produce the same results.
1. In /etc/init.d/, create a new document called "pause_hook". There are several ways to do this but the easiest will be to simply run the below command. When this command is pasted into the terminal a warning will appear "Unsafe Paste" because the command contains line feeds. If you trust the code (I do) then click on "Paste". If not then use the text in the next code window to manually add it to the "pause_hook" file.
Code: Select all
sudo tee /etc/init.d/pause_hook <<!
#! /bin/sh
### BEGIN INIT INFO
# Provides: pause_hook
# Required-Start:
# Required-Stop: halt reboot
# Default-Start:
# Default-Stop: 0 6
# X-Stop-After: umountroot
# X-Interactive: true
# Short-Description: Pause before halt or reboot
# Description:
### END INIT INFO
do_stop () {
[ -r /etc/pause_hook.conf ] && . /etc/pause_hook.conf
[ "\$PAUSE_HOOK_ENABLED" = true ] && read -p "Press Enter to continue" reply
}
case "\$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '\$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: \$0 start|stop" >&2
exit 3
;;
esac
!
If you want to manually put the text into the "pause_hook" file then use this text:
Code: Select all
#! /bin/sh
### BEGIN INIT INFO
# Provides: pause_hook
# Required-Start:
# Required-Stop: halt reboot
# Default-Start:
# Default-Stop: 0 6
# X-Stop-After: umountroot
# X-Interactive: true
# Short-Description: Pause before halt or reboot
# Description:
### END INIT INFO
do_stop () {
[ -r /etc/pause_hook.conf ] && . /etc/pause_hook.conf
[ "$PAUSE_HOOK_ENABLED" = true ] && read -p "Press Enter to continue" reply
}
case "$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
!
2. Make the Step 1 file executable by running the below command:
Code: Select all
sudo chmod -c 755 /etc/init.d/pause_hook
Code: Select all
mode of '/etc/init.d/pause_hook' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
Code: Select all
sudo update-rc.d pause_hook defaults
Code: Select all
sudo tee /etc/pause_hook.conf <<!
PAUSE_HOOK_ENABLED=true
!
To disable the pause on shutdown/restart, just go into the /etc/pause_hook.conf file and comment out the only line there, which will then look like "#PAUSE_HOOK_ENABLED=true" (without the quotes). To enable it, just un-comment it (remove the number symbol "#"). This must be done as root of which there are several ways. One way, in Thunar, is to right-click that file and select "Edit as Root".
You do not have the required permissions to view the files attached to this post.