When tf_linux64 is out of focus it produces high-pitch sound
As the title suggests, when playing TF2 on Linux, everything is fine with the sound, but when I move focus away from it, it works in the background just fine, but produces a faint high-pitch noise, that is really irritating on headphones.
I am running it from Public release via Steam launcher with these flags: -novid -windowed -noborder (no audio flags)
My software specs:
- Linux Mint 22.2 Cinnamon
- Cinnamon 6.4.8
- Kernel 6.8.0-87-generic
- X11
Sound info:
$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 339
Tile Size: 65472
User Name: holek
Host Name: Minty
Server Name: PulseAudio (on PipeWire 1.0.5)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: bluez_output.BC_87_FA_1A_D0_06.1
Default Source: alsa_input.usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-02.analog-stereo
Cookie: eef4:cc65
I've isolated it to be happening also only during any gameplay, so eg. it doesn't occur in the main menu after start or disconnecting from any server.
Unfortunately I do not have any other system to test it, but I cannot recall that happening on a Windows build from about 2 years ago. If somebody would be inclined to check whether that's the case there, too, that'd be swell.
I'll try to recreate that. Try going from PipeWire 1.0.5 to 1.4.8
Also I recommend these options :
-high -novid -nojoy -windowed -noborder -nosteamcontroller -nohltv -particles 1 -console if you have two screens directly tell which one you prefer : -displayindex [0=1st screen 1=2nd screen]
Honestly, I'm glad I could've reported that before what has happened today:
I am not opening TF2 until next Scream Fortress!
I will try all the opts later, without the -displayindex, because I only have one monitor, but I doubt that would change anything. This seems like some PulseAudio internal nonsense with network packets or something. I'm neither well-equipped nor well-versed in debugging PulseAudio internals to find anything on my own.
This bug might occur in other Source 1 games on Linux, but I won't be testing them either.
I've tested the flags you mentioned, @DRUN-s, no difference. When I focus out of the game during a match, the high-pitch sound persists. Environment hasn't changed, haven't updated pipewire, as I was too scared to bork my current setup. If it works out of the box, then it should work with that setting,m as long as it's a modern Debian distro, imo. Again, it does not happen with any other video game or app. It seems to be TF2-specific.