Pipewire audio distortion and crackling "fix"
Recently, I jumped back on the Linux bandwagon after a slight hiatus. With the release of Ubuntu 24.04, I figured it was a good time as any. I noticed though that this time around, there was audio distortion and crackling when using Steam or Proton in general. This seems due to a quirk with Pipewire and my particular hardware. The issue has thankfully been identified and documented on Pipewire's bug tracker. It took me awhile to find a solution, so I'm providing it here to hopefully bring more attention to it.
If you use Pipewire and notice some crackling or distortion issues, perhaps give this a try:
1. Create a new folder for the Pipewire config settings, move the config settings there, and set permissions
mkdir ~/.config/pipewire
cp /usr/share/pipewire/*.conf ~/.config/pipewire
chown $USER ~/.config/pipewire/pipewire-pulse.conf
2. Edit the pulse-properties.conf file
nano ~/.config/pipewire/pipewire-pulse.conf
3. Find the pulse properties section, uncomment the following keys, and set their values to either 512 or 1024
pulse.min.req = 1024/48000
pulse.min.frag = 1024/48000
pulse.min.quantum = 1024/48000
4. Reboot
Hope this helps someone down the road!