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.
No description
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...
Jump to solution
48 Replies
wolfyreload
wolfyreload•7mo ago
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.
Ravenesque
RavenesqueOP•7mo ago
No description
wolfyreload
wolfyreload•7mo ago
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.
Ravenesque
RavenesqueOP•7mo ago
So I input the two commands and I got back this
No description
Ravenesque
RavenesqueOP•7mo ago
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)
wolfyreload
wolfyreload•7mo ago
hmmm so nothing installed via layers... Do you have the same issue if you plug in earphones/headphones?
Ravenesque
RavenesqueOP•7mo ago
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?
wolfyreload
wolfyreload•7mo ago
They probably related to your issue. I'm out of ideas of things to try. Someone from the Bazzite team might have some ideas
Ravenesque
RavenesqueOP•7mo ago
I appreciate the help
wolfyreload
wolfyreload•7mo ago
Does your problem go away for a bit when you reboot?
Ravenesque
RavenesqueOP•7mo ago
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?
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
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.
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
Appreciate the help though is it possible the wireplumber or pipewire is auto suspending or something? @wolfyreload
wolfyreload
wolfyreload•7mo ago
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)
Ravenesque
RavenesqueOP•7mo ago
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.
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
yeah thats the guide I saw !
wolfyreload
wolfyreload•7mo ago
Looks like you change the timeout for the session.suspend-timeout-seconds
Ravenesque
RavenesqueOP•7mo ago
I just don't know where this config is like i don't think I have the original directory
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
this is all i have in that directory after /wireplumber
No description
wolfyreload
wolfyreload•7mo ago
if you do locate 50-alsa-config.lua does it find it?
Ravenesque
RavenesqueOP•7mo ago
do i type that in terminal?
wolfyreload
wolfyreload•7mo ago
yeah
Ravenesque
RavenesqueOP•7mo ago
nothing shows up
wolfyreload
wolfyreload•7mo ago
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 release
Ravenesque
RavenesqueOP•7mo ago
yeah I might wait for a fix
Ravenesque
RavenesqueOP•7mo ago
i do have this directory like yours
No description
Ravenesque
RavenesqueOP•7mo ago
for main.lua.d
wolfyreload
wolfyreload•7mo ago
There is typically one or two releases a day fixing things at the moment. Hopefully this will be fixed soon 🙂
Ravenesque
RavenesqueOP•7mo ago
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?
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
Ah okay, was worth asking anyways lol. Thanks for your help. Hopefully someone comes along and sees this.
wolfyreload
wolfyreload•7mo ago
Good luck
Ravenesque
RavenesqueOP•7mo ago
I found something interesting. Theres an alsa folder in the usr/share/alsa directory and inside alsa.conf.d there is this
No description
Ravenesque
RavenesqueOP•7mo ago
Apparently 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
Ravenesque
Ravenesque•7mo ago
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
wolfyreload
wolfyreload•7mo ago
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!
Ravenesque
RavenesqueOP•7mo ago
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?
wolfyreload
wolfyreload•7mo ago
The documentation is very helpful.... not
No description
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
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?
wolfyreload
wolfyreload•7mo ago
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
Ravenesque
RavenesqueOP•7mo ago
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.
wolfyreload
wolfyreload•7mo ago
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%
Ravenesque
RavenesqueOP•7mo ago
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.
Want results from more Discord servers?
Add your server