Package: systemd
Version: 252.12-1

Since Debian Bookworm (systemd 252), the reboot, poweroff and "shutdown now" commands throw the following error if the dbus service is not running:

-------
Failed to connect to bus: No such file or directory
-------

and if dbus is running, but systemd-logind is not:

-------
Failed to set wall message, ignoring: Unit dbus-org.freedesktop.login1.service failed to load properly, please adjust/correct and reload service manager: File exists Call to Reboot failed: Unit dbus-org.freedesktop.login1.service failed to load properly, please adjust/correct and reload service manager: File exists
-------

The action however finishes properly. I know that systemd-logind is required for scheduled shutdowns/reboots, but it is not for immediate ones. I am not sure if those were ever supposed to send a wall message, as the possible purpose is minimal if the action is performed immediately. However, the "wall" command works perfectly fine without the two services and until Debian Bullseye, those errors were not thrown.

The "--no-wall" flag, which is supposed to suppress wall messages sent by those commands, has no effect on the dbus/systemd-logind contact attempt/error messages. Also I could not find any setting in /etc/systemd to change this new behaviour. "reboot -f" works, but it has unwanted implications, most notably no "sync" and unclean/no umounts.

The motivation to solve these errors without installing dbus and enabling systemd-logind is that both are not required on most server systems. systemd-logind is used for desktop sessions and by some GUI applications, and for mentioned scheduled shutdowns/reboots, but for a single admin server system it is usually not needed/used. For embedded systems with low power/RAM it can hence make sense to have systemd-logind masked and dbus uninstalled, to free up some resources, cleanup the process tree, logs etc.

I guess it is an upstream question/issue, but I wanted to be sure about this first. Hopefully someone can give more insights.

Best regards,

Micha

Reply via email to