[Unit] Description=automatic loudness and per-app volume control (pipewire) Documentation=https://github.com/manic-systems/headroom # pipewire is a hard dep — can't start before pw-mainloop. ConditionUser pins user-scope After=pipewire.service pipewire-pulse.service wireplumber.service Requires=pipewire.service Wants=wireplumber.service # start with the user's service manager, but do not stop just because # graphical-session.target is restarted during idle/session churn. ConditionUser=!@system [Service] Type=simple ExecStart=@bindir@/headroom daemon # restart after unexpected daemon exits, including clean main-loop exits. Restart=always RestartSec=2s # sigterm is the clean shutdown path; explicit for clarity KillMode=control-group TimeoutStopSec=5s # logs to journald (journalctl --user -u headroom) StandardOutput=journal StandardError=journal SyslogIdentifier=headroom # Allow realtime/nice elevation where the user manager has permission # to grant it. Do not request CPUSchedulingPolicy= here: on systems # without CAP_SYS_NICE / realtime user limits, systemd fails the unit # before headroom can start. Users who have configured rt privileges can # add a drop-in with CPUSchedulingPolicy=rr, CPUSchedulingPriority=20, # and Nice=-11. LimitRTPRIO=20 LimitRTTIME=200000 LimitNICE=-11 [Install] WantedBy=default.target