Fixing Audio Stuttering and Latency Issues
Audio playback issues such as stuttering or latency problems are typically caused by audio subsystem (sound server) configuration, system resource management, or compatibility issues with specific hardware/software. These issues are frequently reported on older OS versions that use PulseAudio as the default audio server.
OS versions with high probability of these issues (primarily using PulseAudio):
- Debian:
- Debian 11 (Bullseye) and earlier versions
- Raspberry Pi OS:
- Raspberry Pi OS Bullseye and earlier versions
- Ubuntu:
- Ubuntu 20.04 LTS (Focal Fossa)
- Ubuntu 22.04 LTS (Jammy Jellyfish) (default PulseAudio, PipeWire used only for specific features)
Root Causes
PulseAudio, which is used by default in the above versions, is useful for flexibly managing various audio sources and devices. However, in certain environments (especially resource-constrained systems like Raspberry Pi or when real-time/low-latency audio processing is required), it can cause the following issues:
- High resource overhead: Additional abstraction layers increase CPU and memory usage, causing audio dropouts under system load.
- Buffering and scheduling issues: Default timer-based scheduling (
tsched=1
) can cause audio buffer underruns/overruns. - Bluetooth audio instability: Bluetooth connections are prone to disconnections, audio quality degradation, and latency issues.
Solution
The most effective and stable solution is to upgrade to the latest operating system versions that have adopted PipeWire as the default audio server.
- Debian: Debian 12 (Bookworm) or later
- Raspberry Pi OS: Raspberry Pi OS Bookworm or later
- Ubuntu: Ubuntu 23.10 (Mantic Minotaur) or the latest LTS version Ubuntu 24.04 LTS (Noble Numbat) or later