Bug#975400: [247~rc2-2] 2 minutes delay at "systemctl poweroff"

Roderich Schupp roderich.schupp at gmail.com
Sun Nov 22 17:35:20 GMT 2020


On Sat, Nov 21, 2020 at 7:13 PM Michael Biebl <biebl at debian.org> wrote:

> Control: tags -1 + moreinfo
>
> I suppose this is your problem.
> You have processes (ssh-agent and dbus-daemon) in your user session,
> which apparently do not stop in a timely manner, thus causing the delay,
> afaics.
>
> Is this problem reproducible with a new user account?
>

Yes.

I fixed my attention on the line

> Nov 17 01:03:38 nuc8 systemd[1141]: Requested transaction contradicts existing jobs: Transaction for exit.target/start is destructive (gnome-session-restart-dbus.service has 'start' job queued, but 'stop' is included in transaction).
>
>
in the journal which started reproducibly to appear after upgrading
systemd to 247~rc2-2.

Looks like /usr/lib/systemd/user/gnome-session-shutdown.target (from
package gnome-session-common) is responsible for starting
gnome-session-restart-dbus.service:

[Unit]
Description=Shutdown running GNOME Session

# Allow exit.target to start even if this unit is started with
replace-irreversibly
# The same is needed for all (weak) dependencies
DefaultDependencies=no

Conflicts=graphical-session.target graphical-session-pre.target
After=graphical-session.target graphical-session-pre.target

# Add explicit conflicts/after lines for gnome-session targets, technically
# this should not be needed, but is an extra safety measure.
Conflicts=gnome-session.target gnome-session-manager.target
After=gnome-session.target gnome-session-manager.target

Conflicts=gnome-session-pre.target gnome-session-initialized.target
gnome-session-failed.target
After=gnome-session-pre.target gnome-session-initialized.target
gnome-session-failed.target

# We need to make sure this unit is stopped; primarily so that the tree of
# units that we created is completely cleaned.
# Note that this can also be improved by reversing the conflicts above and
# not listing them in the shutdown unit.
StopWhenUnneeded=true

# We trigger a restart of DBus after reaching the shutdown target this
# is a workaround so that DBus services that do not connect to the
# display server are shut down after log-out.
# This should be removed when the relevant services add a
# PartOf=graphical-session.target
# Historic bug: https://bugzilla.gnome.org/show_bug.cgi?id=764029

*Wants=gnome-session-restart-dbus.serviceBefore=gnome-session-restart-dbus.service*

I can't pretend that I know what I'm doing, but after commenting out
the last two lines the two minute delay on power-off is gone :)

Feel free to reassign this bug to gnome-session.

Cheers, Roderich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20201122/d9a5f57b/attachment.html>


More information about the Pkg-systemd-maintainers mailing list