[Unit] Description=Headroom audio daemon (automatic loudness and per-app volume control for PipeWire) Documentation=https://github.com/atagen/headroom # PipeWire is a hard dependency: headroom registers a virtual sink and # wires explicit links via PW's link-factory, so we can't start before # pw-mainloop is up. ConditionUser ensures this only ever runs as a # user-scope unit, never accidentally as the system instance. After=pipewire.service pipewire-pulse.service wireplumber.service Requires=pipewire.service Wants=wireplumber.service ConditionUser=!@system [Service] Type=simple ExecStart=@bindir@/headroom daemon # Restart on failure but not too aggressively — a tight crash loop # would just produce a lot of stderr noise and clobber the user's # routing repeatedly. Restart=on-failure RestartSec=2s # Headroom doesn't fork; SIGTERM is the clean shutdown path. The # default KillMode=control-group is correct for a single-process # daemon; explicit here for clarity. KillMode=control-group TimeoutStopSec=5s # Surface stdout/stderr to journald so `journalctl --user -u headroom` # shows daemon logs with the expected RUST_LOG filtering. StandardOutput=journal StandardError=journal SyslogIdentifier=headroom # Realtime hint — pipewire grants RT scheduling via pw_thread_loop, # but the daemon main thread benefits from a slight scheduling boost # too. LimitRTPRIO matches the pipewire user unit's grant. LimitRTPRIO=20 LimitRTTIME=200000 LimitNICE=-11 [Install] WantedBy=pipewire.service