Bug#1129339: apt hangs for 25 seconds before acting if logind isn't running
[email protected] Mon, 2 Mar 2026 23:52:34 +0100
| Newsgroups | gmane.linux.debian.apt.devel |
|---|---|
| Message-ID | <aaYUskEWvPO1b67A__23641.9476963178$1772492126$gmane$org@edera> |
On Mon, Mar 02, 2026 at 08:33:59PM +0100, Julian Andres Klode wrote: > On Mon, Mar 02, 2026 at 04:10:46PM +0100, [email protected] wrote: > > On Mon, Mar 02, 2026 at 02:27:38PM +0100, Julian Andres Klode wrote: > > > Control: reassign -1 systemd > > > > > > On Sun, Mar 01, 2026 at 09:32:42AM +0100, g1 wrote: > > > > > > > > Before invoking dpkg to perform the work, apt-get connects to DBUS in > > > > order to make the seat-manager inhibit shutdowns. > > > > > > > > If you don't have systemd-logind or elogind running (because e.g. you > > > > were forced to install elogind as a dependency, but you disabled > > > > it), this hangs for 25 seconds, until dbus reports timeout on > > > > org.freedesktop.login1. > > > > > > This sounds like a bug in systemd or dbus or something; but likely this > > > is not a supported system configuration. > > > > > > > Perhaps unsupported in Ubuntu, not in Debian. > > Your configuration causes a configured dbus service to timeout; that > is a misconfiguration and you need to address it. > > Systems without logind advertisedv on the dbus system bus will > not be timing out; as you can trivially verify by running in a > chroot. No need to use a chroot. Elogind ships its manifest /usr/share/dbus-1/system-services/org.freedesktop.login1.service [D-BUS Service] Name=org.freedesktop.login1 # By default, Dbus activation of elogind is disabled. The daemon is started via an init script. # Exec=/usr/libexec/elogind --daemon Exec=/bin/true User=root which - advertises elogind - prevents dbus from attempting to start the daemon (by design, because it lacks the necessary privileges) Since elogind is installed on my system only because occasionally I need to use pcscd, which brings in elogind as a hard dependency (in trixie, not in bookworm), having the daemon disabled is not blasphemy. APT depending on dbus for operation is a gratuitous footgun. Please don't label "misconfiguration" all that differs from your own configuration: debian has alternatives in places where ubuntu/fedora/arch have not, and that's one of the reasons for its existence.