Pipe wire priority setting help needed

i got a problem i dont like pipewire-pulse , pipewire , pipewire-media-session running at very high as it causes popping an distortion but at just high priority work fine but doesnt stay at the pref

on my 21.04 changing the pipewire config files setting like this

#nice.level = 5

#rt.prio = 50

#rt.time.soft = 200000

#rt.time.hard = 200000

ran it at very low an locked it in but in games it did better at a flat normal but i dont know how to set that

so some help would be great id like to get this right for my 21.10 an 22.04 update an builds

also how do i change the re-sampler from pipewire to ffmpeg i liked it better when i had it as the resampler

1 Like

The popping you are experiencing is probably due to your sound buffer (or buffer sample queue?) not being big enough. Since pipewire has much less latency than pulse, a larger buffer is required to avoid that crackling (basically, your current setup cannot consume fast enough → buffer overruns).

Sound on Linux has otherwise been resolved for a while now with Jackd, however Jackd has always been a disaster as far as plug-and-play goes. Once you understand it, it is one of the best sound systems and can provide sub-ms latency for professional audio which has led to a LOT of professional production going Linux in the Audio space, but it is such a bitch to set up and most just want a dumb buffer to pipe Youtube/Game audio to speakers. Hence, the mediocre-but-works-oob Pulseaudio. Pipewire has taken the concept of Jackd with sane defaults for regular users, completely transforming higher-level Linux I/O. It would not surprise me if all I/O (Bluetooth, network, USB et cetera) end up with Pipewire in the future.

One step at a time though, I would recommend playing around with the PULSE_LATENCY_MSEC and PIPEWIRE_LATENCY environment variables. Changing the priority will lead to unintended consequences that may or may not hurt your specific use case.

1 Like

were do i go to tweak that

They are environment variables, so you have one of two options. Either set them in the command you launch a particular game with, do note that this means sound will be delayed for longer:

$ PULSE_LATENCY_MSEC=100 quake

Or set the variable in your .bashrc file in your home folder.

$ echo PULSE_LATENCY_MSEC=100 >> ~/.bashrc

See more on this page: Performance tuning · Wiki · PipeWire / pipewire · GitLab

1 Like