diff --git a/contrib/systemd/headroom.service b/contrib/systemd/headroom.service index 024ce09..a1a74fb 100644 --- a/contrib/systemd/headroom.service +++ b/contrib/systemd/headroom.service @@ -8,6 +8,13 @@ Documentation=https://github.com/atagen/headroom After=pipewire.service pipewire-pulse.service wireplumber.service Requires=pipewire.service Wants=wireplumber.service +# Tie our lifecycle to the graphical session: graphical-session.target is +# started once per login by the compositor/DE and is the conventional anchor +# for user-scope session daemons. PartOf= means we stop/restart with it. +# (pipewire.service is socket-activated and has no stable "started for the +# session" lifecycle to WantedBy=, which is why anchoring there was flaky.) +PartOf=graphical-session.target +After=graphical-session.target ConditionUser=!@system [Service] @@ -36,4 +43,4 @@ LimitRTTIME=200000 LimitNICE=-11 [Install] -WantedBy=pipewire.service +WantedBy=graphical-session.target