Bug#1129339: apt hangs for 25 seconds before acting if logind isn't running
Julian Andres Klode <[email protected]> Mon, 2 Mar 2026 14:27:38 +0100
| Newsgroups | gmane.linux.debian.apt.devel |
|---|---|
| Message-ID | <20260302141532.GA1453937__33792.4161156238$1772458173$gmane$org@debian.org> |
Control: reassign -1 systemd On Sun, Mar 01, 2026 at 09:32:42AM +0100, g1 wrote: > Package: apt > Version: 3.0.3 > Severity: normal > X-Debbugs-Cc: [email protected] > > 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. > > A quick and dirty workaround consists in putting > > DPkg::Inhibit-Shutdown "false"; > > in a file in /etc/apt/apt.conf.d. I could not find references to that > option in apt.conf(5), and had to search in the source code > (apt-pkg/deb/dpkgpm.cc) to discover it. Therefore I kindly ask the > developers to document it, We are planning to introduce new documentation written in reStructuredText. There's no need at this point to collect bug reports about incomplete documentation; the new documentation will include tooling to ensure completeness. > maybe together with Binary::apt::Pager [1]. The `Pager` option is for internal use only. Pager configuration is standardized across the ecosystem using the PAGER and ${TOOL}_PAGER variables (PAGER, GIT_PAGER, SYSTMEMD_PAGER; here APT_PAGER). APT implements this standard. If we wanted paging configurable in apt.conf, it would be `APT::Pager`, not `Pager`. The `Binary::apt` prefix makes it apply to the apt(8) binary; this is being phased out by a more flexible interface versioning scheme but that is still a WIP. However the new scheme is backward compatible; existing Binary::apt overrides continue working. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en