Pipewire errors/crackling popping. I'm at a loss at what to do.
Desperately need some help. In some games, audio will like skip or briefly stop/pop for like a brief second. Sometimes opening the volume button in KDE will cause static aswell. I ran
systemctl --user status pipewire
and there are errors. Screenshot attached.
I am on Bazzite Nvidia Desktop image.Solution:Jump to solution
I think I've found the solution. In
pipewire.conf
change default.clock.min-quantum
to default.clock.min-quantum = 2048
and the audio crackle is gone.
But I have a question, is this number safe to leave? Will it cause any issues or delay in applications? Should I still leave this at defaults? #default.clock.quantum = 1024
...48 Replies
Could you check that you don't have pulse audio running with pipewire?
ps aux | grep pulseaudio
they tend to conflict with each other and will sometimes be installed if you layer additional software on top of Bazzite.Please try and run
systemctl --user stop pulseaudio.socket
and systemctl --user stop pulseaudio.service
lets see if this stops your crackling issue
Note that the service will start again with a reboot but lets see if this solves your current issue. Also please check rpm-ostree status
I'd like to see if any packages are layered above your current Bazzite install.So I input the two commands and I got back this
and for the last command
State: idle
Deployments:
ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable
Version: 40.20240508.0 (2024-05-08T22:09:55Z)
and
ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable
Version: 40.20240507.0 (2024-05-08T17:51:12Z)
hmmm so nothing installed via layers... Do you have the same issue if you plug in earphones/headphones?
I am using only headphones for my output. It's not a USB connector but that's what the interface says that it is.
Are the alsa errors in the first image I posted in red an issue?
They probably related to your issue. I'm out of ideas of things to try. Someone from the Bazzite team might have some ideas
I appreciate the help
Does your problem go away for a bit when you reboot?
nope
I originally was using EasyEffects and then I tried JamesDSP before i noticed the static and those 2 gave me more audio static issues. After removing the 2, everything is A LOT better but I still get static and popping without any audio modifications.
I had also tried using pipewire.conf to increase the min and max quantum, default clock rate etc.
I placed the pipewire.conf in
/.config/pipewire/
by creating the directory. Nothing had changed.
I'm not sure if maybe theres another config that can fix my issue or that those errors above are actually an issue, because the install is otherwise fresh and I don't think I can actually mess anything up on atomic images?You could try a rebase on an older image and see if your issue is still there or not
You can mess with config in the /var/etc and your /var/home folder.
Actually, what happens if you make a new user account? then you should have no config modifications, see if your issue persists in a new user account.
If that does nothing, try rebase to an older Bazzite 40 image
Thing is that I didn't really touch anything. I just made that extra file. I had delteted it as well. I had just installed this yesterday.
Hmmm ok then. might be worth asking if anyone else is having this issue in the bazzite chat section and see if anyone else has a good solution to it
Appreciate the help though
is it possible the wireplumber or pipewire is auto suspending or something?
@wolfyreload
Certainly possible.
Can see reference to that in the chat https://discord.com/channels/1072614816579063828/1087140957096517672/1233500358656004096
Probably something that went wrong with the switch to fedora 40 (Bazzite 3.0)
I was reading that earlier and saw that online as well. I'm totally lost at where I would find that file though to edit.
Found this guide https://davejansen.com/disable-wireplumber-pipewire-suspend-on-idle-pops-delays-noise/ that shows the file they were talking about
Dave Jansen
Disable Pipewire Suspend on Idle to avoid audio pops, delays, and w...
In case you're experiencing a sound pop whenever sound is played after a a certain amount of time – or a little while after sound has played. Or perhaps you have more sensitive hearing or headphones/speakers and can notice white noise coming from your computer after a little while. If
yeah thats the guide I saw !
Looks like you change the timeout for the session.suspend-timeout-seconds
I just don't know where this config is
like i don't think I have the original directory
It looke like you copy the default from
/usr/share/wireplumber/main.lua.d/50-alsa-config.lua
with sudo cp -a /usr/share/wireplumber/main.lua.d/50-alsa-config.lua /etc/wireplumber/main.lua.d/50-alsa-config.lua
then you edit the one in the etc folder /etc/wireplumber/main.lua.d/50-alsa-config.lua
this is all i have in that directory after
/wireplumber
if you do
locate 50-alsa-config.lua
does it find it?do i type that in terminal?
yeah
nothing shows up
for me it returns
/sysroot/ostree/deploy/fedora/deploy/80cd1eac0a2180a5fb5ebefcd29f4351e8564f621ce76e27ec2e16d9f2b1409e.0/usr/share/wireplumber/main.lua.d/50-alsa-config.lua
which was my Bazzite 39 image files. So something might be broken in 40
You could try rebase to 39 if you like
If it solves the issue then stay there for a bit and hopefully it will be solved in a future 40 releaseyeah I might wait for a fix
i do have this directory like yours
for main.lua.d
There is typically one or two releases a day fixing things at the moment. Hopefully this will be fixed soon 🙂
Yeah, this is my first time really on Linux and this has been really the only thing that I cannot solve yet haha. Also, I am not sure if you know, but is there a way to reset settings if they were touched at all for the configs? Like as in, pipewire.conf and things like that?
I don't know of any sort of "factory reset" feature in Bazzite. You could maybe check on the timestamps of all the config files, but other than that no idea.
I've been using Linux for about 2 years... still learning new stuff lol
Ah okay, was worth asking anyways lol. Thanks for your help. Hopefully someone comes along and sees this.
Good luck
I found something interesting. Theres an alsa folder in the
usr/share/alsa
directory and inside alsa.conf.d
there is thisApparently the directory has updated and what not. This is the updated solution but I am still having issues.
https://wiki.archlinux.org/title/PipeWire#Noticeable_audio_delay_or_audible_pop/crack_when_starting_playback
Solution
I think I've found the solution. In
pipewire.conf
change default.clock.min-quantum
to default.clock.min-quantum = 2048
and the audio crackle is gone.
But I have a question, is this number safe to leave? Will it cause any issues or delay in applications? Should I still leave this at defaults? #default.clock.quantum = 1024
Btw well done on figuring out a solution to this on your own :). Essentially you are reducing the risk popping/crackling at the expense of higher audio latency and probably slightly higher cpu usage. I doubt that you'd have issues. Plus your solution will probably be useful to a bunch of other people here. Well done!
Thanks! Extremely annoying to diagnose lol. Do you happen to know of any resources on what values equal what latency by any chance? And the values that I put in, do they have to be like 512, 1024 etc or can it be like anything?
The documentation is very helpful.... not
I'd guess anything would be good that is less than 8192
but probably go with something that is a multiple of 2 to be safe
so 2048 sounds good
Ok thanks! and yeah the docs aren't extremely detailed. What do you think about
default.clock.quantum = 1024
? Should I make that the same as minimum or just leave it commented out?In my head if you set that one it will have no effect as it's less than the minimum. Honestly, if it's working make a note of what you changed (for future potential re-installs or if you want to see if updates fixed your issue).
But yeah if your games are working, probably just leave it as is
Thanks again. Yeah now one of my games that was native to linux has audio now and it fixed static in another but (maybe this is just the game) Helldivers 2 has audio pop/crackle when people are speaking in voice. Otherwise it's fine.
Proton might be doing something else
Try add this custom launch config to Helldivers 2 in your Steam
PULSE_LATENCY_MSEC=60 %command%
If that doesn't work try
PIPEWIRE_LATENCY=1024/48000 %command%
I will give that try next time thanks! I also think it's just the game as well, seems to be having lots of issues and if that's the only one I'm experiencing I think I'll just turn off voice.