c454b1085466 | atagen | 2026-05-27 15:49 UTC | 1 | [Unit] |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 2 | Description=automatic loudness and per-app volume control (pipewire) |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 3 | Documentation=https://github.com/manic-systems/headroom |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 4 | # pipewire is a hard dep — can't start before pw-mainloop. ConditionUser pins user-scope |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 5 | After=pipewire.service pipewire-pulse.service wireplumber.service |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 6 | Requires=pipewire.service |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 7 | Wants=wireplumber.service |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 8 | # start with the user's service manager, but do not stop just because |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 9 | # graphical-session.target is restarted during idle/session churn. |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 10 | ConditionUser=!@system |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 11 | |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 12 | [Service] |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 13 | Type=simple |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 14 | ExecStart=@bindir@/headroom daemon |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 15 | # restart after unexpected daemon exits, including clean main-loop exits. |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 16 | Restart=always |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 17 | RestartSec=2s |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 18 | # sigterm is the clean shutdown path; explicit for clarity |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 19 | KillMode=control-group |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 20 | TimeoutStopSec=5s |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 21 | # logs to journald (journalctl --user -u headroom) |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 22 | StandardOutput=journal |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 23 | StandardError=journal |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 24 | SyslogIdentifier=headroom |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 25 | # Allow realtime/nice elevation where the user manager has permission |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 26 | # to grant it. Do not request CPUSchedulingPolicy= here: on systems |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 27 | # without CAP_SYS_NICE / realtime user limits, systemd fails the unit |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 28 | # before headroom can start. Users who have configured rt privileges can |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 29 | # add a drop-in with CPUSchedulingPolicy=rr, CPUSchedulingPriority=20, |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 30 | # and Nice=-11. |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 31 | LimitRTPRIO=20 |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 32 | LimitRTTIME=200000 |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 33 | LimitNICE=-11 |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 34 | |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 35 | [Install] |
c454b1085466 | atagen | 2026-05-27 15:49 UTC | 36 | WantedBy=default.target |