2

Debian defaults to quiet on the kernel command line (at least installed from the live media I've been using. Which was possibly a bad idea).

systemd responds to quiet, by not printing the standard messages when it starts each service.

So, why do I see systemd status messages when I shut down?

This is on Debian Stretch.

3

man systemd

systemd.show_status

Takes a boolean argument or the constant auto. Can be also specified without an argument, with the same effect as a positive boolean. If enabled, the systemd manager (PID 1) shows terse service status updates on the console during bootup. auto behaves like false until a unit fails or there is a significant delay in boot. Defaults to enabled, unless quiet is passed as kernel command line option, in which case it defaults to auto.


When a unit fails, systemd enables status messages despite the quiet option.

If the quiet option has been passed but was overridden by such a condition, the status messages are re-disabled when the system has finished booting (even if only to emergency mode).

Currently, systemd only ever prints status messages during the initial startup, and during shutdown. However a unit failure can cause the quiet option to be overridden during shutdown, even if the unit failure occurred before the shutdown was initiated.

A second case where quiet is overidden is when a unit is taking a while, and systemd prints an animation showing how long the unit is allowed before it times out.


The two different override cases can be found in the source code, by looking for manager_flip_auto_status(m, true).

There is not a call to manager_flip_auto_status(m, false) when the system shuts down. At least not in systemd v235-135-g41dfa61d3.


For example, I am currently seeing status messages on startup, due to systemd-backlight trying and failing to set a laptop backlight on an asus desktop. (Probably some strangeness with the platform driver; there are no devices in /sys/class/backlight when the system has finished booting, but it seems that systemd finds one during the boot process).

  • Which systemd man page is this behavior documented in? – Mark Stosberg Dec 13 '17 at 15:04
  • ooh, good call. The explanation for "quiet" seems misleading to me, but if you follow the reference it makes, there is documentation. – sourcejedi Dec 14 '17 at 10:16
  • I don't see the doc mentioning the part about printing status messages during shutdown as well as during startup. You can use man -l to page through the C file if you like tho :-P. The code is here: github.com/systemd/systemd/blob/… – sourcejedi Dec 14 '17 at 10:20
  • If interesting documentation is missing, please submit an issue or a pull request: github.com/systemd/systemd/issues The source docs are in the "man" subdirectory as ".xml" files. They have been responsive in the past when I've submitted documented improvements. – Mark Stosberg Dec 14 '17 at 15:18
1

Because systemd is working as documented. A search in man systemd for "quiet" reveals that the kernel option only affects boot, not shutdown.

  • No, I was wrong. no_console_output only concerns disabling console output when services like the emergency shell are also accessing the console. Confusingly, there is this hack (first link) to override them on shutdown. But clearing no_console_output does not undo the effect of quiet; that is a separate field m->show_status, which is "flipped" between STATUS_AUTO and STATUS_TEMPORARY. – sourcejedi Dec 11 '17 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.