Script to restart Pipewire if it starts bugging out

From Pengwings
Revision as of 02:00, 16 February 2026 by Theleruby (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note that you'll have to restart any audio streams, most games will need to have their volume reduced.

sudo vim /usr/local/bin/fixaudio
#!/bin/bash
echo Attempting to restart the audio stack
if pgrep -x "easyeffects" > /dev/null
then
    echo easyeffects is running, killing it
    easyeffects -q
    sleep 3
else
    echo easyeffects is not currently running
fi
echo Restarting pipewire
systemctl --user restart pipewire
sleep 2
echo Restarting fluidsynth
systemctl --user restart fluidsynth
sleep 2
echo Restarting easyeffects
easyeffects --gapplication-service > /dev/null & disown
sleep 2
echo Done

Make it executable

sudo chmod +x /usr/local/bin/fixaudio

Run it like this:

fixaudio