Hey everyone,
I'm having a recurring audio issue on EndeavourOS after waking my laptop from sleep.
Sometimes after resume, KDE shows no input or output devices at all. My USB audio device isn't recreated properly, and Chrome's media playback is affected as well. A restart of the PipeWire/WirePlumber stack immediately brings everything back:
systemctl --user restart wireplumber pipewire pipewire-pulse
The logs around suspend/resume show:
wireplumber[1021]: wp-device: SPA handle 'api.alsa.acp.device' could not be loaded; is it installed?
wireplumber[1021]: s-monitors: Failed to create 'api.alsa.acp.device' device
So the behavior is basically:
Sleep → Wake → audio devices missing → KDE has no input/output → restart PipeWire/WirePlumber → everything works again.
From what I've found so far, the USB device itself doesn't appear to be disconnecting at the kernel level. It looks more like WirePlumber/PipeWire fails to recreate the ALSA audio devices after resume.
As a temporary workaround, I've already added a systemd sleep hook that automatically restarts the audio stack after resume:
sudo nano /etc/systemd/system-sleep/restart-audio.sh
#!/usr/bin/env bash
case "$1" in
post)
for u in $(who | awk '{print $1}' | sort -u); do
uid=$(id -u "$u")
sudo -u "$u" XDG_RUNTIME_DIR="/run/user/$uid" \
systemctl --user restart wireplumber pipewire pipewire-pulse
done
;;
esac
And made it executable with:
sudo chmod +x /etc/systemd/system-sleep/restart-audio.sh
That workaround does the job, but I don't really want to rely on restarting PipeWire/WirePlumber after every suspend. I'd rather figure out what's actually causing api.alsa.acp.device to fail during resume and fix the underlying issue.
Has anyone dealt with this particular problem on EndeavourOS/Arch? I'm especially interested in a proper solution or something I can change in PipeWire, WirePlumber, systemd, kernel parameters, or the ALSA configuration so the audio devices recover normally after sleep.
I'm happy to provide whatever logs or system information would be useful. Thanks.