You are not logged in.

#1 2022-06-11 23:07:36

7thSon
Member
Registered: 2017-05-07
Posts: 186

[SOLVED] Audio stutters every 5 seconds

I have a Behringer UV1 as an audio interface and sound card, and for some reason I'm getting an audible click/stutter every 5 seconds when listening to audio.
I've tried listening to both Youtube and Navidrome in a browser as well as Navidrome via the Sublime client and finally Spotify. All of these have the same issue, so it's not likely the player that's the problem.

I'm dual booting my Arch host with Windows, and if I listen to audio in Windows there are is no stuttering, this is with the exact same Behringer hardware of course.
I'm running pipewire on my host though I'm not sure what else to share here; these are the packages relating to pulseaudio and pipewire that I have installed:

yay -Q | rg pulse
lib32-libpulse 16.0-1
libpulse 16.0-1
pipewire-pulse 1:0.3.52-1
pulsemixer 1.5.1-3
python-pulsectl 1:22.3.2-2
xfce4-pulseaudio-plugin 0.4.3-2

❯ yay -Q | rg pipewire
gst-plugin-pipewire 1:0.3.52-1
pipewire 1:0.3.52-1
pipewire-alsa 1:0.3.52-1
pipewire-jack 1:0.3.52-1
pipewire-pulse 1:0.3.52-1

How should I start troubleshooting this? Is this a known issue?

Last edited by 7thSon (2022-06-14 19:15:10)

Offline

#2 2022-06-12 06:03:25

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

That thing is usb attached, is it?
Disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1" will do that globally but please nb. that userspace power management tools like TLPcan and will alter the value at runtime, so you'll have to configure it there/as well)

if I listen to audio in Windows there are is no stuttering

Also 3rd link below, mandatory.

Online

#3 2022-06-12 12:41:01

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

seth wrote:

That thing is usb attached, is it?
Disable https://wiki.archlinux.org/title/Power_ … utosuspend ("usbcore.autosuspend=-1" will do that globally but please nb. that userspace power management tools like TLPcan and will alter the value at runtime, so you'll have to configure it there/as well)

if I listen to audio in Windows there are is no stuttering

Also 3rd link below, mandatory.

I added a udev rule to blacklist the behringer from autosuspend into /etc/udev/rules.d/50-usb_power_save.rules with the content;

# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1397", ATTR{idProduct}=="0510", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"

where lsusb shows the Behringer device as:

❯ lsusb
...
Bus 002 Device 004: ID 1397:0510 BEHRINGER International GmbH UV1
...

The above didn't work though, after both reloading with udevadm and a reboot the stutter every 5 seconds is still there.

I also checked the Windows fast boot stuff, I've had hibernation turned off so Fast Boot should have been disabled due to that.
I now explicitly turned off Fast Boot as well, though I haven't noticed any dual boot issues for a long time.

Offline

#4 2022-06-12 12:52:36

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

so Fast Boot should have been disabled due to that

https://www.youtube.com/watch?v=5RyYrs5tu60

Check the actual autosuspend time under /sys/bus/usb/devices/*/power/autosuspend and for a principal test on whether this is the issue please try the global deactivation through the kernel parameer first.

Online

#5 2022-06-12 14:44:42

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

seth wrote:

so Fast Boot should have been disabled due to that

https://www.youtube.com/watch?v=5RyYrs5tu60

Check the actual autosuspend time under /sys/bus/usb/devices/*/power/autosuspend and for a principal test on whether this is the issue please try the global deactivation through the kernel parameer first.

I was referring to reading somewhere that disabling hibernation causes fast boot to also be disabled, of course I can't find that now so maybe I was mistaken.

Checking the autosuspend values I get a list of zeroes and twos, so nothing is autosuspending after 5 seconds if going by these values.

❯ sudo cat /sys/bus/usb/devices/*/power/autosuspend
0
2
2
2
2
0
0
0
2
0
0
0
0
0

I set the kernel parameter to usbcore.autosuspend=-1, after rebooting I can verify the below, but the stutter is still there.

❯ cat /sys/module/usbcore/parameters/autosuspend
-1

Last edited by 7thSon (2022-06-13 21:13:34)

Offline

#6 2022-06-12 14:58:54

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

Assuming the actual device is irrelevant and this is a pipewire/pulseaudio/theentriaudiostackisfartoocomplicated situation:

pacman -Qs alsa # get rid of pipewire-alsa and/or pulseaudio-alsa
mpv -ao alsa thunderstruck.mp3 # still stutter?

Online

#7 2022-06-13 16:30:05

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

seth wrote:

Assuming the actual device is irrelevant and this is a pipewire/pulseaudio/theentriaudiostackisfartoocomplicated situation:

pacman -Qs alsa # get rid of pipewire-alsa and/or pulseaudio-alsa
mpv -ao alsa thunderstruck.mp3 # still stutter?

After uninstalling pipewire-alsa I get no audio at all from mpv (tried a web browser with youtube as well, same thing).
When I reinstall pipewire-alsa, then the sound comes back, but the stutter of course also returns.

Edit: I checked the alsamixer output and it reverts to the motherboard sound card, but if I switch it to the UV1 then the only output in the mixer is "This sound device does not have any controls."

Last edited by 7thSon (2022-06-13 17:44:30)

Offline

#8 2022-06-13 19:03:14

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

"aplay -L", check for the alsa relevant device and try

 mpv -ao alsa --audio-device=alsa/front:CARD=Behringer,DEV=0 thunderstruck.mp3 # "front:CARD=Behringer,DEV=0" would be the device string and is completely made up

Online

#9 2022-06-13 19:31:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,447

Re: [SOLVED] Audio stutters every 5 seconds

If the above doesn't give you clean audio, could also be a bug with the lowlatency support in snd_usb_audio, try /etc/modprobe.d/disablelowlatency.conf

options snd_usb_audio lowlatency=0

Offline

#10 2022-06-13 20:09:43

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

Not sure whether that's relevant, but google threw up https://linuxmusicians.com/viewtopic.ph … 2&start=45

Do you have anything like "[    8.017768] usb 1-1: clock source 41 is not valid, cannot use" in your dmesg?

Online

#11 2022-06-13 21:08:39

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

seth wrote:

Not sure whether that's relevant, but google threw up https://linuxmusicians.com/viewtopic.ph … 2&start=45

Do you have anything like "[    8.017768] usb 1-1: clock source 41 is not valid, cannot use" in your dmesg?

When specifying the device listed by "aplay -L" I can get the audio to play even after uninstalling pipewire-alsa.
The stutter is still there though.

Checking dmesg I did find a whole bunch of error messages saying "usb 2-1.5.1: clock source 41 is not valid, cannot use"
Reading the thread in the link you posted I clearly have to follow that to see what developments there are.

Offline

#12 2022-06-14 06:17:52

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

Did you try to add "snd_usb_audio.implicit_fb=1" to the kernel parameters?

Online

#13 2022-06-14 18:27:23

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

seth wrote:

Did you try to add "snd_usb_audio.implicit_fb=1" to the kernel parameters?

I tried that now, and this actually seems to have done the trick! I don't have the stutter anymore.
So what is this bug in the snd_usb_audio low latency support? Is it something that's going to get patched, or should I set this kernel parameter up "permanently"?
Is there any downside to having snd_usb_audio.implicit_fb=1 configured with this value?

Offline

#14 2022-06-14 18:59:10

seth
Member
Registered: 2012-09-03
Posts: 59,895

Re: [SOLVED] Audio stutters every 5 seconds

I'm not sure V1del was positive there was a bug in the low latency support, only theorizing a bug there *might* cause this.
I don't think there's a downside to the implicit_fb, you're probably rather waiting for an in-tree quirk, https://patches.linaro.org/project/alsa … i@suse.de/

Online

#15 2022-06-14 19:14:50

7thSon
Member
Registered: 2017-05-07
Posts: 186

Re: [SOLVED] Audio stutters every 5 seconds

Thanks, I'm marking this solved

Offline

#16 2022-10-07 15:03:22

GooseYArd
Member
Registered: 2022-10-07
Posts: 1

Re: [SOLVED] Audio stutters every 5 seconds

Hey 7thSon- you're the first other Linux user that I've found using a UV1. I'm having two issues with mine, one of which was the stuttering issue (which I'm hoping will also be fixed by this change). The other issue is that when I have the Stereo Duplex profile selected, the input works just fine, and the output appears to be functional (i.e., I can play audio to it), but I get no sound from either the front headphone output or the line out. It seems to work fine if connected to my mac, so I think the hardware is ok, but I suspected maybe something in the profile is screwy. Does your headphone out work correctly, and did you have to do any tweaking to get that to work?

Offline

Board footer

Powered by FluxBB