Suspend-to-RAM/resume sometimes fails if pavucontrol is running
Version, Distribution, Desktop Environment:
- latest git versions of alsa-card-profiles, libcamera, pipewire-alsa, pipewire, pipewire-jack, pipewire-media-session, pipewire-pulse
- up-to-date Arch Linux
- swaywm; no DE
- Lenovo X1 Yoga (4th gen)
Description of Problem:
If pavucontrol is running, suspend-to-RAM/resume randomly fails about 1 in 10 times. (If pavucontrol is not running (not started or exited), suspend-to-RAM/resume always works as expected.)
The problem first appeared for me when I switched from pulseaudio to pipewire a few weeks ago. That is, if pavucontrol runs on top of pulseaudio instead of pipewire, suspend/resume always works as expected. Thus, this superficially looks like a pipewire issue, although the root cause may well be elsewhere.
Steps to Reproduce:
- boot system
- start pavucontrol
- suspend to RAM (by closing laptop lid, systemctl suspend, or rtcwake; does not matter)
- try to wake the system (by opening the laptop lid, hitting a button, or by the rtcwake timer expiring; does not matter)
Randomly (about 1 in 10 times), on suspend keyboard status LEDs remain on, and any attempts to wake the system fail. The only way I found to recover is a hard reset.
The problem appears to be with suspend, not primarily with wake-up: After suspending, FnLock, speaker mute and mike mute keyboard LEDs remain on. Otherwise the system appears to suspend, as indicated by pulsating power-button and laptop-lid LEDs.
The sytem suspends with all keyboard LEDs turning off, and wakes up when triggered.