The tuning host loaded module-rt with default arguments, so it asked for realtime through xdg-desktop-portal. A portal started before rtkit was installed reports a realtime budget of zero. module-rt applies that as a hard RLIMIT_RTTIME of 0, RTKit still makes the data thread SCHED_RR, and the kernel kills the host with SIGKILL as soon as audio plays; systemd restarts it every two seconds and the speakers stay silent until the next login. Set rtportal.enabled = false, as the stock pipewire.conf does. The host is a user service in the same session as the PipeWire daemon and has no reason to go through the portal. The host config is only copied by `omarchy-audio-tuning on`, so a migration replaces an installed copy that is still Omarchy's own with the old setting, and restarts the host if it runs. It does not call `on`, which would overwrite a tuning graph another tool wrote under the same name. Co-authored-by: Michael de By <contact@michaeldeby.nl>
23 lines
1.2 KiB
Bash
23 lines
1.2 KiB
Bash
echo "Ask RTKit directly for the speaker tuning's realtime priority"
|
|
|
|
# The tuning host asked for realtime through xdg-desktop-portal. A portal started
|
|
# before rtkit was installed reports a realtime budget of zero; module-rt applies
|
|
# it as a hard RLIMIT_RTTIME of 0, RTKit still makes the data thread realtime, and
|
|
# the kernel kills the host as soon as audio plays. The host config is only copied
|
|
# by `omarchy-audio-tuning on`, so an installed tuning keeps the old one until
|
|
# replaced here.
|
|
#
|
|
# Only Omarchy's own copy with the old setting is replaced. A community
|
|
# calibrator can host its graph under the same file name, and a tuning graph is
|
|
# never touched: `omarchy-audio-tuning on` would overwrite one it did not write.
|
|
host_config="${XDG_CONFIG_HOME:-$HOME/.config}/pipewire/omarchy-speaker-tuning.conf"
|
|
host_source="$OMARCHY_PATH/default/audio/filter-chain-host.conf"
|
|
|
|
if [[ -f $host_config && ! -L $host_config ]] &&
|
|
grep -qx '# Host config for the Omarchy speaker tuning.' "$host_config" &&
|
|
grep -q 'args = { }' "$host_config"; then
|
|
install -Dm644 "$host_source" "$host_config"
|
|
# A restart ends playback for a moment, so only a running host is restarted.
|
|
systemctl --user try-restart omarchy-speaker-tuning.service >/dev/null 2>&1 || true
|
|
fi
|