Sound card vanishes from wpctl after resume and only a reboot brings it back
The seven-step ladder is technically sound and well sourced, with one wrong Omarchy claim at the end. Verified: the systemd-sleep hook contract is exactly as stated. systemd-suspend.service(8) documents /usr/lib/systemd/system-sleep/, $1 = pre|post, $2 = the sleep action, and carries the precise warning the record relies on: "Note that user.slice will be frozen while the executables are running, so they should not attempt to communicate with any user services expecting a reply". So the 'the hook cannot call systemctl --user' caveat is right and is the detail most versions of this advice get wrong. Step 6 reproduces the Arch ALSA/Troubleshooting procedure exactly (mkdir -p /etc/alsa, touch /etc/alsa/state-daemon.conf to stop alsa-store.service rewriting the file, rm /var/lib/alsa/asound.state, reboot, then rm the condition file and alsactl store). The power_save=0 power_save_controller=N modprobe.d snippet is the wiki's verbatim recommendation, lspci -k -nn -d ::0403 and /proc/asound/modules are the right discovery commands, and rm -r ~/.local/state/wireplumber/ touches only per-user state (no system path). ONE defect: omarchy-restart-audio does not exist in basecamp/omarchy. The menu path is right (bin/omarchy-menu's show_update_hardware_menu maps "Audio" to present_terminal omarchy-restart-pipewire), but the command name is wrong, and so is the scope claim: omarchy-restart-pipewire's whole body is systemctl --user restart wireplumber.service pipewire.service plus a conditional restart of pipewire-pulse.service. That is step 1 only. It does NOT wipe ~/.local/state/wireplumber, so it does not perform step 7, and a reader who runs it expecting the ghost-device cleanup will think step 7 has been tried when it has not.
modprobe -r fails with Module snd_hda_intel is in use if any process still holds /dev/snd. Never force it. A broken or slow script in /usr/lib/systemd/system-sleep/ delays suspend and resume for every sleep cycle, because systemd waits for all of them to finish. The || true guards above keep a failed unload from blocking suspend. Deleting /var/lib/alsa/asound.state discards every saved mixer level for every card, so you may have to reset volumes and re-unmute channels afterwards. Deleting ~/.local/state/wireplumber discards remembered default devices, per-device volumes and Bluetooth profile choices.
Symptom
Close the lid, open it again, and the audio device is gone. wpctl status shows an empty Sinks: list or only the HDMI outputs. The laptop speakers or the USB DAC are no longer there. aplay -l may print no soundcards found..., or list the card while everything stays silent. The journal has lines like snd-usb-audio 1-6.1.2:1.0: resume error -22, Could not recover alsa device from SUSPENDED state, or Error opening PCM device front:1: No such file or directory. pactl list sinks can hang and eventually return Connection failure: Timeout. Physically unplugging and replugging a USB audio interface brings it straight back, and a reboot always fixes it.
Cause
The ALSA driver failed to reinitialise the hardware on resume, so the card never comes back up underneath PipeWire. Several distinct triggers land here. The HDA controller or codec does not restore state (worsened by power_save, which is on by default). USB autosuspend cut power to a USB DAC and the device did not re-enumerate. A stale /var/lib/alsa/asound.state gets restored and re-mutes or mis-routes the channels. Or WirePlumber holds a node for a device that no longer exists and refuses to rebuild it. This is distinct from the mute-state and WirePlumber-state records: here the *card itself* is missing, not just misconfigured.
Fix
Replace the closing Omarchy line with:
**On Omarchy**, *Update > Hardware > Audio* runs omarchy-restart-pipewire (not omarchy-restart-audio, which does not exist). That covers step 1 only. Its entire body is:
systemctl --user restart wireplumber.service pipewire.service
# plus pipewire-pulse.service if it is active
Step 7 is not included: the WirePlumber state directory is left in place. If the card is still missing after the menu item, do the state wipe by hand:
systemctl --user stop wireplumber
rm -r ~/.local/state/wireplumber/
systemctl --user start wireplumber
(That loses remembered per-device volumes, chosen profiles and default-device picks. You will reselect them once. No system-level risk.)
One addition to step 3 while you are there: if fuser --all --verbose /dev/snd/* keeps showing holders after you stop the services, the sockets are re-activating them. Stop those too before the modprobe:
systemctl --user stop pipewire.socket pipewire-pulse.socket wireplumber pipewire pipewire-pulse
Verify
Suspend and resume, then check cat /proc/asound/cards still lists the card and wpctl status still lists the sink. journalctl -b -k --since "5 minutes ago" | grep -i -E 'snd|resume error' should be clean. Run speaker-test -c 2 after resume. Repeat over three or four suspend cycles. This failure is frequently intermittent (often described as 'about every third suspend'), so a single successful resume proves nothing.
Sources
- https://wiki.archlinux.org/title/PipeWire/Troubleshooting
- https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture/Troubleshooting
- https://wiki.archlinux.org/title/WirePlumber
- https://wiki.archlinux.org/title/Power_management
- https://raw.githubusercontent.com/systemd/systemd/main/man/systemd-suspend.service.xml
- https://bbs.archlinux.org/viewtopic.php?id=305291
- https://bbs.archlinux.org/viewtopic.php?id=274296
- https://bbs.archlinux.org/viewtopic.php?id=177755