[Pipewire-devel] Troubleshooting crackling and/or "client to slow!"

Christian Pernegger pernegger at gmail.com
Wed Sep 13 22:01:34 UTC 2023


Hello all,

sorry to spam a -devel list, but AFAICT there is no -users one, and I
don't even know where to start so it doesn't fit neatly into a GitLab
issue or two, either.

So, two boxes. Commonalities: Ubuntu 22.04.3, pipewire
0.3.48-1ubuntu3, wireplumber 0.4.8-4, limits.conf.d snippet exactly as
per recommendation and confirmed working; both are AMD Ryzen systems
using ASUS boards.

Desktop:
Ryzen 3900X [Zen 2 / AM4], X570 chipset
* Behringer UMC202HD
stock kernel 6.2.0-1012-lowlatency [has dynamic preempt set to full by
default; not sure what else]
previously ran Ubuntu 18.04 + PulseAudio on the same hardware config
without issue

HTPC:
Ryzen 7600X [Zen 4 / AM5], B650 chipset
* HDMI audio via iGPU (to a cheap 1080p monitor)
* HDMI audio via Radeon 6600 (to Yamaha RX-V771 receiver)
"mainline" kernel 6.4.12-060412-generic [preempt=full]
new box; the receiver, speakers, etc. are unchanged and worked fine
before (Ubuntu 18.04 + PulseAudio on different hardware)

On both boxes the audio doesn't sound as clean(?) as I'm used to, and
there's intermittent crackling, primarily in WINE/Proton games. When
it's bad, the whole thing sounds a bit like a vinyl record, or a radio
broadcast with suboptimal reception, otherwise it's just the
occasional short crackle. In the latter case, it seems to like BGM
climaxes and the like, so maybe something's clipping?—but then it
isn't louder than it should be ...

pw-top shows a couple of errors, but there's no 1:1 relationship with
the observed glitches.
The log at level 3 [anything above that and I just drown] throws
"client to slow!" now and then, no xruns. These correlate to the
pw-top errors, but not the glitches. Some glitches will not emit a
warning, some warnings I can't hear. That said, a high glitch rate
will also give more errors.

Running pavucontrol in parallel will give lots more pw-top errors, and
"client too slow!" even for that (but no audible difference) ...

Cranking the CPU governor and EPP up to performance alleviates it
significantly, and forcing the quantum up to 786/48000 or even
1024/4800 via PULSE_LATENCY_MSEC (default seems to be 256/48000)
almost gets rid of it, but I can't shake the feeling that something's
off. I mean, the 3900X is 3 years old now and the 7600X is a budget
CPU, but then even my early-2000s dual CPU boxes could do glitch-free
audio. I'm not even using anything complex like filters and custom
routing yet, it's all stock.

Any configuration tweaks I'm missing? I tried threadirqs, but didn't
notice much of a difference.
Any residual PulseAudio config that could cause this? I never really
used PA on these, switched to pipewire soon after the initial install,
but it is still installed
Any known Ubuntu 22.04 weirdness that would cause this?

Ok, now for the fun bit. The iGPU HDMI port on the HTPC is pristine.
No glitches, no errors. Even tried to provoke some by dialing back the
CPU governor, loading it a little, ... just works. But both the dGPU
HDMI port (same driver!) and the Behringer interface on my desktop
have the same symptoms? What is this?

This is driving me crazy and I'd really like to get to the bottom of
it. I expected to have to do some tweaking to get the Behringer to
perform optimally, not to get desktop audio working.

If you've reason to believe that a newer pipewire would help (beyond
"the newest version is always better"), I can try the PPA, or compile
it, but I'd prefer sticking with distro packages. If you'd like logs,
just tell me what and they'll be yours.

Kind regards,
Christian Pernegger


More information about the Pipewire-devel mailing list