atagen

headroom

public
Star0
Watch0
ssh://brewery@pls.lobotomise.me:33/atagen/headroom.git

Blame: contrib/systemd/headroom.service

c454b1085466atagen2026-05-27 15:49 UTC1
[Unit]
c454b1085466atagen2026-05-27 15:49 UTC2
Description=automatic loudness and per-app volume control (pipewire)
c454b1085466atagen2026-05-27 15:49 UTC3
Documentation=https://github.com/manic-systems/headroom
c454b1085466atagen2026-05-27 15:49 UTC4
# pipewire is a hard dep — can't start before pw-mainloop. ConditionUser pins user-scope
c454b1085466atagen2026-05-27 15:49 UTC5
After=pipewire.service pipewire-pulse.service wireplumber.service
c454b1085466atagen2026-05-27 15:49 UTC6
Requires=pipewire.service
c454b1085466atagen2026-05-27 15:49 UTC7
Wants=wireplumber.service
c454b1085466atagen2026-05-27 15:49 UTC8
# start with the user's service manager, but do not stop just because
c454b1085466atagen2026-05-27 15:49 UTC9
# graphical-session.target is restarted during idle/session churn.
c454b1085466atagen2026-05-27 15:49 UTC10
ConditionUser=!@system
c454b1085466atagen2026-05-27 15:49 UTC11
c454b1085466atagen2026-05-27 15:49 UTC12
[Service]
c454b1085466atagen2026-05-27 15:49 UTC13
Type=simple
c454b1085466atagen2026-05-27 15:49 UTC14
ExecStart=@bindir@/headroom daemon
c454b1085466atagen2026-05-27 15:49 UTC15
# restart after unexpected daemon exits, including clean main-loop exits.
c454b1085466atagen2026-05-27 15:49 UTC16
Restart=always
c454b1085466atagen2026-05-27 15:49 UTC17
RestartSec=2s
c454b1085466atagen2026-05-27 15:49 UTC18
# sigterm is the clean shutdown path; explicit for clarity
c454b1085466atagen2026-05-27 15:49 UTC19
KillMode=control-group
c454b1085466atagen2026-05-27 15:49 UTC20
TimeoutStopSec=5s
c454b1085466atagen2026-05-27 15:49 UTC21
# logs to journald (journalctl --user -u headroom)
c454b1085466atagen2026-05-27 15:49 UTC22
StandardOutput=journal
c454b1085466atagen2026-05-27 15:49 UTC23
StandardError=journal
c454b1085466atagen2026-05-27 15:49 UTC24
SyslogIdentifier=headroom
c454b1085466atagen2026-05-27 15:49 UTC25
# Allow realtime/nice elevation where the user manager has permission
c454b1085466atagen2026-05-27 15:49 UTC26
# to grant it. Do not request CPUSchedulingPolicy= here: on systems
c454b1085466atagen2026-05-27 15:49 UTC27
# without CAP_SYS_NICE / realtime user limits, systemd fails the unit
c454b1085466atagen2026-05-27 15:49 UTC28
# before headroom can start. Users who have configured rt privileges can
c454b1085466atagen2026-05-27 15:49 UTC29
# add a drop-in with CPUSchedulingPolicy=rr, CPUSchedulingPriority=20,
c454b1085466atagen2026-05-27 15:49 UTC30
# and Nice=-11.
c454b1085466atagen2026-05-27 15:49 UTC31
LimitRTPRIO=20
c454b1085466atagen2026-05-27 15:49 UTC32
LimitRTTIME=200000
c454b1085466atagen2026-05-27 15:49 UTC33
LimitNICE=-11
c454b1085466atagen2026-05-27 15:49 UTC34
c454b1085466atagen2026-05-27 15:49 UTC35
[Install]
c454b1085466atagen2026-05-27 15:49 UTC36
WantedBy=default.target