You are not logged in.

#1 2021-11-21 01:31:40

boman112
Member
Registered: 2021-11-21
Posts: 4

Unable to Achieve a "Silent Shutdown"

The Problem

I've been following the ArchWiki for a silent boot experience and have been successful at silencing all boot messages. Unfortunately, it seems this doesn't apply to shutdowns/restarts and I'm unable to find any documentation or solution that removes the single line that keeps plaguing my nearly perfectly silent boot up/shutdown process.

As I said, the bootup process is completely clean and silent. When attempting to shutdown or restart the system however, I will get a line that says:

[xxxx.yyyy] reboot: Power down

or

[xxxx.yyyy] reboot: Restarting system

I have attempted using various different kernel parameters and settings that I could find through searching the web or just tinkering with what I already knew but no matter what... this message persists. I assume its coming from systemd or the kernel itself but at this point I don't know and am just getting frustrated that something that should be simple is so obtuse/non-intuitive. If anybody could help me identify definitively where this message is coming from, or even better how to disable it, I would be infinitely grateful.

Current Configuration

I've gone through many different kernel parameters/configurations, but here is what I currently have (producing the same shutdown/restart messages in screenshots above) in case there is something obviously missing or might prove useful otherwise.

*OS:

Arch Linux

*KERNEL AND SYSTEMD VERSION:

5.15.2-arch1-1
systemd 249 (249.6-3-arch)

*KERNEL PARAMETERS:

rw quiet loglevel=0 rd.systemd.show_status=no rd.udev.log_priority=0 vt.global_cursor_default=0 nowatchdog modprobe.blacklist=iTCO_wdt

*MKINITCPIO HOOKS:

HOOKS=(base udev autodetect modconf block filesystems keyboard)

*KERNEL.PRINTK VALUES:

/etc/sysctl.d/20-quiet-printk.conf contains the line
"kernel.printk = 0 0 0 0"

Offline

#2 2021-11-21 02:03:00

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Unable to Achieve a "Silent Shutdown"

At a guess https://github.com/systemd/systemd/blob … own.c#L361

Suppressing all messages including emergency level leaves the system with no way to inform you of any issues.  Is the system hanging at the end of reboot/shutdown which caused you to notice the message?

Offline

#3 2021-11-21 02:31:17

boman112
Member
Registered: 2021-11-21
Posts: 4

Re: Unable to Achieve a "Silent Shutdown"

loqs wrote:

At a guess https://github.com/systemd/systemd/blob … own.c#L361

Suppressing all messages including emergency level leaves the system with no way to inform you of any issues.  Is the system hanging at the end of reboot/shutdown which caused you to notice the message?


The system is not hanging, it shuts down/reboots completely normally. This is the only message that appears. Even at less aggressive loglevels and with kernel.printk = 3 3 3 3 it is still the only message. I only set everything so aggressively afterwards to see if it would suppress the message, which it didn't

Also, running "sudo systemctl list-units --failed" does not list anything after booting nor do I remember seeing any errors/issues before attempting to silent boot. Although I will check again when back at that computer. Completely at a loss here hmm

Offline

#4 2021-11-21 03:52:07

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Unable to Achieve a "Silent Shutdown"

Try "kernel.printk = -1 -1 -1 -1" which is less than zero so the level should not get bumped https://github.com/systemd/systemd/blob … own.c#L302

Offline

#5 2021-11-21 07:30:09

boman112
Member
Registered: 2021-11-21
Posts: 4

Re: Unable to Achieve a "Silent Shutdown"

loqs wrote:

Try "kernel.printk = -1 -1 -1 -1" which is less than zero so the level should not get bumped https://github.com/systemd/systemd/blob … own.c#L302

That... worked!
First of all, thank you, at least now I have some idea of whats happening.

Unfortunately, I only ever learned some basic programming and am a little rusty even on that. I can see from your first link that the bump_sysctl_printk_log_level function gets called when logging is going to KMSG and not from a container. And within that function, by setting the levels to -1, it exits the function before anything happens. Please correct me if I'm misunderstanding that part.

I've also tested this on another system with a similar software setup (albeit not exactly the same) with the same settings as in my original post and its not giving any messages during restart/shutdown. So I suppose it is something unique to this system. My assumption is that bump_sysctl_printk_log_level is not being called on my other system at all and that for some reason it is on the system with the problem, resulting in that shutdown/reboot message when the levels aren't at -1. What I don't understand is why KMSG would be causing any problems. That's just a file where kernel message output is stored right? Is there something that would make it log to KMSG in one instance but not another? (I've kind of ignored the in_container part of the if statement but please mention it if its relevant).
Perhaps there is some underlying issue its trying to report as you mentioned before that I didn't catch?

I understand if I'm getting a bit too into the weeds since technically that did resolve the issue so don't worry about it if thats the case. Either way, thanks again as this is definitely more than I would've gathered on my own and I can be happy with that.

Offline

#6 2021-11-21 23:52:54

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Unable to Achieve a "Silent Shutdown"

boman112 wrote:
loqs wrote:

Try "kernel.printk = -1 -1 -1 -1" which is less than zero so the level should not get bumped https://github.com/systemd/systemd/blob … own.c#L302

That... worked!
First of all, thank you, at least now I have some idea of whats happening.

Unfortunately, I only ever learned some basic programming and am a little rusty even on that. I can see from your first link that the bump_sysctl_printk_log_level function gets called when logging is going to KMSG and not from a container. And within that function, by setting the levels to -1, it exits the function before anything happens. Please correct me if I'm misunderstanding that part.

Matches my understanding.

boman112 wrote:

I've also tested this on another system with a similar software setup (albeit not exactly the same) with the same settings as in my original post and its not giving any messages during restart/shutdown. So I suppose it is something unique to this system.

Or the other system shutdowns much quicker and you miss the message.  Both systems run Arch?  If you use `systemctl halt` to stop the system but not power it off does the other system show the message?

Offline

#7 2021-11-23 21:07:25

boman112
Member
Registered: 2021-11-21
Posts: 4

Re: Unable to Achieve a "Silent Shutdown"

It could be shutting down quicker, but I'm doubtful. Its a much older computer and everything else is MUCH slower.
I also have Arch on it with mostly the same package set. systemctl halt doesn't seem to print any text either.
Thinking about trying a fresh Arch installation on the problem computer and seeing if i still get the message but if so i'm gonna save it for another day.

Offline

#8 2022-08-10 22:55:05

jj11235
Member
Registered: 2022-08-10
Posts: 1

Re: Unable to Achieve a "Silent Shutdown"

loqs wrote:

Try "kernel.printk = -1 -1 -1 -1" which is less than zero so the level should not get bumped https://github.com/systemd/systemd/blob … own.c#L302


Can you tell me how to set kernel.printk = -1 -1 -1 -1 permanent on each boot?

Offline

Board footer

Powered by FluxBB