Buffer underruns only when system has resumed from suspend
Opening a new issue as per Igor Kovalenko's request after he saw my IRC messages.
Summary
After the system resumes from suspend, I experience pulseaudio underruns every 20-30s. There are no underruns if the system has not been previously suspended. Re-starting pulse, re-loading audio modules, and re-plugging the interface do not make the under-runs stop. The only thing I have found that fixes the underruns is rebooting the system.
An interesting observation: if I use aplay to play audio to the hw interface after resuming from suspend, I observe NO underruns if the audio is in the native sample format (32 bit little endian). However, if the format differs even slightly, such as being 16 bit little endian, the underruns return.
environment
Pulseaudio 14.2 on Gentoo kernel 5.4.80-r1. Full info in attached pa-info.txt. I have also attached verbose logs: pulse-verbose.log.
Steps to reproduce
- boot system
- use s2ram to suspend system
- resume system and play any audio that is not a 32-bit LE wav file.
What is the current bug behavior?
- After system boot, audio plays normally without underruns
- use s2ram to suspend system
- Resume system. At this point, underruns are observed every 10-30s for any audio that is not a 32-bit LE wav file. These underruns are visible in the attached verbose logs. The only thing I have found that fixes the issue after underruns start is fully rebooting the system.
What is the expected correct behavior?
Pulseaudio does not underrun after resuming for suspend. Less ideal but workable is that some combination of steps can fix the underruns without requiring a full reboot.
Thanks for helping me hone in on where the issue is occurring. Would love to find a solution or workaround!