FS#75013 - [pipewire] Microphone Audio stuttering

Attached to Project: Arch Linux
Opened by Phillip Schichtel (pschichtel) - Thursday, 09 June 2022, 19:54 GMT
Last edited by David Runge (dvzrv) - Tuesday, 14 June 2022, 20:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
David Runge (dvzrv)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

I have a Behringer Q802USB and since the last testing update I had strong stuttering on my microphone input in various different applications.

After downgrading to core/multilib stable packages the issue went away:

[2022-06-09T21:41:45+0200] [ALPM] downgraded alsa-card-profiles (1:0.3.52-1 -> 1:0.3.51-1)
[2022-06-09T21:41:45+0200] [ALPM] downgraded alsa-ucm-conf (1.2.7-1 -> 1.2.6.3-1)
[2022-06-09T21:41:45+0200] [ALPM] downgraded alsa-lib (1.2.7-2 -> 1.2.6.1-1)
[2022-06-09T21:41:46+0200] [ALPM] downgraded pipewire (1:0.3.52-1 -> 1:0.3.51-1)
[2022-06-09T21:41:46+0200] [ALPM] downgraded pipewire-pulse (1:0.3.52-1 -> 1:0.3.51-1)
[2022-06-09T21:41:48+0200] [ALPM] downgraded linux (5.18.3.arch1-1 -> 5.18.2.arch1-1)
[2022-06-09T21:41:48+0200] [ALPM] downgraded lib32-alsa-lib (1.2.7-1 -> 1.2.6.1-1)
[2022-06-09T21:41:48+0200] [ALPM] downgraded gst-plugin-pipewire (1:0.3.52-1 -> 1:0.3.51-1)
[2022-06-09T21:41:49+0200] [ALPM] downgraded alsa-utils (1.2.7-1 -> 1.2.6-1)


Additional info:
* package version(s): see above
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

Use any software to record the microphone and see the level fluctuate heavily
This task depends upon

Closed by  David Runge (dvzrv)
Tuesday, 14 June 2022, 20:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with 1:0.3.52-2
Comment by Phillip Schichtel (pschichtel) - Thursday, 09 June 2022, 20:19 GMT
I'm on PipeWire btw
Comment by Phillip Schichtel (pschichtel) - Friday, 10 June 2022, 19:12 GMT
Since these versions are now in extra I went ahead and isolated the package that causes the issue: pipewire (unsurprisingly)
Comment by David Runge (dvzrv) - Friday, 10 June 2022, 19:51 GMT
@pschichtel: Thanks for the report.

I believe this is an upstream issue though. Please check whether any of the upstream tickets (e.g. search by "stutter" [1]) match your issue or alternatively open a new ticket there.

Alternatively, if you are able to bisect [2] the exact commit that introduces the problem for you, that would also be very helpful (for upstream but potentially also for us so we can maybe revert that commit).
Building pipewire is fairly fast.

[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/?search=stutter&sort=created_date&state=opened
[2] https://man.archlinux.org/man/git-bisect.1
Comment by Phillip Schichtel (pschichtel) - Friday, 10 June 2022, 21:40 GMT
I just did a bunch of tests by switching sampling rates and stuff, since the new release added 44.1khz as an allowed rate, but nothing helped. then I realized that pipewire itself might not actually be the issue, but pipewire-pulse. I tried a few different applications as well, apparently only teamspeak3 seems to have the stuttering issues and only if the latest pipewire-pulse is installed.

I reported this upstream with recordings and some more details from my research https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2434.

I'll look into bisecting this now
Comment by Phillip Schichtel (pschichtel) - Friday, 10 June 2022, 22:25 GMT
An upstream developer [1] and I bisected it to this commit: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/0d51f3b74e1efc2787e29f00e0ccc4b28b5da8a6

I don't think that commit can be reverted without breaking other applications, maybe it is enough to also revert this commit: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/2c4d36e4d03f08734fcc41fd0d136981551d01a7

[1]: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2434#note_1423007
Comment by Phillip Schichtel (pschichtel) - Friday, 10 June 2022, 22:44 GMT
The attached patch reverts the two commits and works for me.
Comment by Furai (furai) - Monday, 13 June 2022, 11:18 GMT
It seems I'm affected by this one as well. I'm using pipewire and pipewire-pulse. Sound issue is apparent on teamspeak 3. I have a HyperX Cloud II headset with USB card. So I guess it's pretty much the same issue as the reported one.

EDIT: Apparently switching to ALSA in teamspeak fixes the issue. I have installed pipewire-alsa as well. But it maxes out one of threads on CPU.
Comment by q rty (q234rty) - Tuesday, 14 June 2022, 18:12 GMT Comment by David Runge (dvzrv) - Tuesday, 14 June 2022, 19:09 GMT
I have applied the upstream fix in 1:0.3.52-2.
Let me know if this works for you.
Comment by Phillip Schichtel (pschichtel) - Tuesday, 14 June 2022, 20:38 GMT
works for me

Loading...