u/BusterDogg

Hi folks,

I've been daily driving cachy for a few weeks now and was able to solve almost all encountered issue (with some help from this community), apart from one. Hoping someone here can put me on the right path.

I believe I have an issue with sound contention on my devices.

I have an Elgato WaveLink USB microphone and the microphone also has an output jack for headphones. Both of these input/outputs are detected by the OS and everything works.

However the problem starts when I want Discord to use the microphone, output voice chat to the headphones AND at the same time have my game also output sound to the same headphones. It seems there is some contention happening and either voice chat or game sounds gets cut off.

The game I'm running is The Division 2 via Steam via latest cachyOS compatibility profile (I tried some other ones, but that doesn't seem to have any effect).

Both Elgato channels are set to "Analog Stereo Output + Mono Input":

https://preview.redd.it/3db6tmga7vyg1.png?width=304&format=png&auto=webp&s=069fc9ea9b05f7f158ac599638fececc3b3d7f08

My initial idea was that there must be a mismatch in frequency output by Discord and the game, hence Pipewire gets confused and cuts one off.

pw-top command output looks like this when having both Discord (joined voice channel) and the game running at the same time:

https://preview.redd.it/b2vh0q7k8vyg1.png?width=1153&format=png&auto=webp&s=ee6c0e18961e2c11603d042f5eca0831e84b5891

What I read from this (correct me if I'm wrong) is that the "quant" is the issue here. The Division is running at 256 buffer while Discord is running at 1440 buffer size.

So at this point I asked AI (yeah I know...) to see if it can help me out and it suggested that "because these numbers don't divide evenly into each other, PipeWire is struggling to sync the streams". I'm honestly not sure if it's halucinating or not but I made a snaphost and went along with it.

It suggested that I should enforce a global quantum number by running this command:

mkdir -p ~/.config/pipewire/pipewire.conf.d/
printf "context.properties = {\n    default.clock.min-quantum = 1024\n    default.clock.max-quantum = 1024\n    default.clock.quantum = 1024\n}" > ~/.config/pipewire/pipewire.conf.d/quantum.conf

But that didn't fix it.

It then suggested that I try to force the game to output with a different buffer size by adding this argument in Steam:

PULSE_LATENCY_MSEC=60 %command%

That didn't help either.

Or this command:

PIPEWIRE_LATENCY=1024/48000 %command%

No joy.

So at that point it started suggesting some really bizare stuff like changing the quantum value for Discord to match the 256 buffer size of the game. Or by disabling hardware autosuspend that supposedly cachy is doing. But all of that seems pretty far fetched.

So I wanted to take a step back and do a sanity check if the buffer size mismatch even makes sense and what would be other suggestions I could take?

reddit.com
u/BusterDogg — 12 days ago