[Pkg-utopia-maintainers] Bug#1082772: pipewire: Intermitent light to heavy audio crackling for applications using pipewire-pulse or pipewire-jack
Tyler Riddle
cardboardaardvark at gmail.com
Thu Sep 26 01:06:46 BST 2024
Package: pipewire
Version: 1.2.4-1~bpo12+1
Severity: important
X-Debbugs-Cc: cardboardaardvark at gmail.com
Dear Maintainer,
Starting around July or August 2024 I started getting routine but mild
crackling out of my speakers. This lasted for several weeks and then went away
on it's own. Starting around two weeks ago (approximately September 10, 2024)
the crackling returned with a vengence. The most recent symptoms include
anything from very mild crackling every few minutes to heavy crackling occuring
constantly. Some times the crackling begins immediately upon rebooting my
system or restarting pipewire-pulse and some times it can take up to 12 hours
for crackling to occur. There is a correlation between system load and how
frequently the crackling shows up and how severe the crackling is. During my
testing today I used this command to place my system under load resulting in
load averages around 40 and most of the CPU time being spent in the kernel:
while true; do echo loop; (find /usr -type f | xargs -P 500 -I % -exec cat "%")
> /dev/null; sleep 1; done
I've experienced this crackling with:
* Firefox ESR from apt
* VLC from apt
* Telegram when playing audio notifications, installed from apt
* Foobar2000 running under wine-devel from apt
* Skyrim running under Proton experimental from Steam
* REAPER with Jack Audio output selected using pipewire-jack as the audio
backend
The problem does not appear to occur when using REAPER with ALSA selected as
the audio backend. As well REAPER using jackd2 from apt does not appear to have
this problem. I've been unable to confirm that VLC when using the ALSA backend
does not crackle as VLC fails to open the ALSA audio device when I try. In
general it has been challenging to find other programs to do more extensive
testing because so much stuff now assumes PulseAudio will be available.
REAPER in ALSA mode runs itself using realtime scheduling priority. Jackd2 is
also running with realtime scheduling priority. As best I can tell pipewire and
pipewire-pulse should be running itself with realtime scheduling priority but I
don't know how to confirm this is actually happening. REAPER using ALSA and
jackd2 delivers reliable audio during my testing even when I experience X GUI
pauses exceeding several seconds. REAPER using pulsewire-jack and the other
applications using pipewire-pulse will start crackling even when there is no
appreciable load on the system. When running the find/xargs load generator the
applications using pipewire-pulse and REAPER using pipewire-jack go into
extreme levels of crackling to severe distortion.
I've used the same media playing inside Firefox, VLC and REAPER to ensure the
audio crackling is not present in the source material. As well at this point
I'm fairly confident the bug does not originate with the kernel since REAPER
using ALSA and jack2 has proven reliable. However I have tested different
stable kernel releases and the backports kernel and there appears to be some
correlation to kernel releases in the stable branch.
Using the backports kernel (6.10 series at this time) does not appear to change
the behavior at all compared to the 6.1.0-25-amd64 kernel build from stable.
Likewise, using 6.1.0-23-amd64 does not appear to change the behavior. In my
testing today using 6.1.0-17-amd64 resulted in much worse audio crackling that
the beforementioned kernels. But then also 6.1.0-17-amd64 would have been the
kernel I was using in the past well before I ever experienced the audio
crackling. I'm pretty sure when I was running 6.1.0-17-amd64 and did not
experience the crackling issue I was also using pipewire from backports however
I've been unable to confirm this from the apt logs as they do not appear to
have timestamps for the log entries.
Usually, but not not always, I am able to temporarily resolve the crackling
issue by running "systemctl --user restart pipewire-pulse" - specifically,
earlier today when the crackling was very bad and very frequent doing the
restarts did not help at all. At this moment, about 8 hours later, the audio
crackling from Firefox is light and infrequent, and I just performed a restart
and it has not resolved the issue.
I have previously tried increasing the pipewire quantum to 8192 in an effort to
prevent the crackling but it does not appear to have any effect at all. My
first change was by running "pw-metadata -n settings 0 clock.quantum 8192" and
later I modified the default pipewire.conf to set default.clock.quantum and
default.clock.max-quantum to 8192 and that also did not seem to have any
effect.
I'm not sure what else I can do to test this, issolate the fault, or try to
resolve the issue. If you have any thoughts please let me know. This issue is
fairly annoying as my workstation's most frequent use case is for playing or
editing multimedia.
-- System Information:
Debian Release: 12.7
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-25-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages pipewire depends on:
ii adduser 3.134
ii init-system-helpers 1.65.2
ii libpipewire-0.3-modules 1.2.4-1~bpo12+1
ii pipewire-bin 1.2.4-1~bpo12+1
pipewire recommends no packages.
pipewire suggests no packages.
-- no debconf information
More information about the Pkg-utopia-maintainers
mailing list