[Source 1 Engine] [Linux] Turning off and back on Built-in Audio in pavucontrol before or after launching a multiplayer game instance causes others not being able to hear mic
In my comment in response to issue https://github.com/ValveSoftware/Source-1-Games/issues/2874#issuecomment-589446436 I noted a procedure to work around mic not initially working in source 1 games in Linux. Part of that procedure relevant to this issue involves the following:
- Open pavucontrol
- Go to the Configuration tab
- Turn Built-in Audio from Analog Stereo Duplex (or whatever setting you find it to have) to Off
- Set it back to the previous setting
If this procedure is performed before a game instance had started (or after) (to clarify, the multiplayer game instance stated in the title is the same as a game instance, but is referring to the multiplayer games which this issues affects), then during the game instance the player will find that testing the mic works and that they can hear their voice but attempting to communicate in a multiplayer match will yield other people not hearing the player's voice. I find this to be problematic if the microphone test gives a false positive. This can be resolved until the game exits by doing the procedure the way mentioned in https://github.com/ValveSoftware/Source-1-Games/issues/2874#issuecomment-589446436.
System info here: https://web.archive.org/web/20200221005747/https://pastebin.com/MHNqqxRV
I can confirm that we have weird mic bug. Tho I don't know if this is that problem. Ubuntu 19.10
I have no idea if this is related but my mic outright refuses to work at all on Arch Linux.
The game doesn't even show up in pavucontrol and I've also tried using ALSA directly to no avail.
I have no idea if this is related but my mic outright refuses to work at all on Arch Linux.
The game doesn't even show up in pavucontrol and I've also tried using ALSA directly to no avail.
Just a preface, all tests I did were with a webcam with a built-in mic.
Does your mic work in Audacity (though this is may be bad example because I found I needed to mess around with pavucontrol and turning off and on different settings for it to work even though it showed up in Audacity as well as restarting the Audacity application.) Do you find it under input devices (scroll to the very bottom and showing "All Input Devices") in pavucontrol? You may need to fiddle with an application like Audacity to use it before it shows up (and there might be a lag as well) If you do see it in input devices, continue to the next paragrpah.
I would mess around with trying to get the microphone to work with something like Audacity before trying TF2 for ease of testing and more understanding on how it could be associated and set.
From what I've seen, the game only shows up in the recording tab of pavucontrol if up it is accepting input, testing the mic via in-game audio options should get a game entry to show up, but the game may need to be in windowed mode for it to stick when you alt+tab. As you may or already understand, trying to associate the mic with the game is a form of dark magic, but once it gets associated it seems to stick. To do this, use the aforementioned voice test to keep the entry open and select the from source to be the microphone. If for some reason you click the micophone and the box doesn't set to the microphone either turn the microphone under the configuration tab in pavucontrol off and on or turn off and on the the built-in audio option that has audio stereo * (* being duplex, output , or input (unplugged)). If that doesn't work try a sort of random combination that you think makes sense including muting and restarting sound server as part of the mix it and might work then.
My issues were definitely unrelated.
Some background info first: I use JACK over PulseAudio as my main audio server as I need the ability to easily route audio into other applications. In most cases an application will just use ALSA's JACK plugin but I have my system configured to use JACK natively when available. In Source's case, it uses OpenAL Soft for mic input.
Now for the actual issue: I was setting ALSOFT_DRIVERS="jack" in my .profile. OpenAL Soft doesn't support mic input from JACK so whenever the game launches it fails to actually start capturing audio. I managed to fix this by setting ALSOFT_DRIVERS=jack,alsa causing it to fall back to ALSA for mic input.
When debugging this, you want to look at Steam's stderr with ALSOFT_LOGLEVEL=3 set as Source actually goes through Steam to record the audio.
Hi OP, does this still happen? TF2 was updated and the audio system was changed to a new one. Can you retest the issue?
Closing pending feedback.