ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
784 stars 69 forks source link

No game audio after Fire Sale update #3748

Closed Redemption198 closed 3 months ago

Redemption198 commented 5 months ago

Your system information

Please describe your issue in as much detail as possible:

When running on a system with PipeWire, no audio output is created since the Fire Sale update (no CS2 node is available in qpwgraph).

A quick workaround is to force the PulseAudio backend by adding -sdlaudiodriver pulseaudio inside the launch options (as reported here).

j3yzz commented 5 months ago

I have the same issue.

kisak-valve commented 5 months ago

Hello @icculus, there's a decent chance this is the same issue as https://github.com/ValveSoftware/Dota-2/issues/2707. Let's handle them together give or take game update timing or a hint that there's a different root cause.

davejab commented 5 months ago

The -sdlaudiodriver pulse workaround from the other issue is working for me

kohsine commented 5 months ago

Pipewire audio is working for me again. May have been the new pipewire version 1.0.7 that fixed it.

icculus commented 5 months ago

Pasting in my comment from the DOTA2 issue:

Okay, people having NO SOUND AT ALL without forcing pulseaudio:

Here's a build of SDL3 that has a potential fix, plus a bunch of logging added to it. The hope is my guess is correct and we're good to go here, but if not, my hope is the logging will help us figure it out.

Update the game to the latest, move the original SDL3 out of the way, and replace it with the one in this zip file:

dota2-linux-sdl3withlogging.zip

The file to replace is ~/.local/share/Steam/steamapps/common/dota\ 2\ beta/game/bin/linuxsteamrt64/libSDL3.so.0, assuming your Steam install is in the default location.

This was just built on my laptop (Ubuntu 23.04), so if it doesn't load for you at all, let someone else report in for now; I didn't try for serious distro compatibility here, but I'm hoping it'll just sort of work out.

If you run this and the game starts, it will write a text file to ~/dota2pipewirelog.txt

If the game still doesn't have audio, please post the log file somewhere for me to peruse.

If it fixes things for you, please report that, too!

icculus commented 5 months ago

(Obviously replace the file in csgo, not dota2.)

Redemption198 commented 5 months ago

I did a quick test and sadly the audio is still not working.

Here is the log, this is generated from just opening and closing the game. If I change the device inside the game options, it just adds more lines like these:

Attempting to open playback device Device opened successfully! Closing device

Note: tested with PipeWire updated to 1.0.7-1.fc40

icculus commented 5 months ago

Attempting to open playback device Device opened successfully! Closing device

So this should say a lot more (every time PipeWire asks for more data) so I think we're still on the right track here. It's either opening something that isn't really an audio device in some way, or it's failing to actually queue data to it for playback.

Here's a new build with a little more debug logging, if you could try this one, too:

csgo-linux-sdl3withlogging.zip

Thanks!

Redemption198 commented 5 months ago

I retested it here is the new log (line 22 should be the microphone).

image

I use EasyEffects for some noise reduction in the microphone, I tried uninstalling it but still no audio.

icculus commented 5 months ago

Okay, so this rules out the idea that it's getting bogus devices/no devices/some virtual thing that doesn't actually make noise, since we see real hardware names.

But Pipewire is never asking it for data to playback at all, If it were, the log would look more like this:

Log started!
PipewireInitialize(SDL_TRUE);
PipewireInitialize(SDL_FALSE);
PIPEWIRE_DetectDevices adding playback device 'Built-in Audio Analog Stereo'
PIPEWIRE_DetectDevices adding capture device 'Built-in Audio Analog Stereo'
Attempting to open playback device 'Built-in Audio Analog Stereo'
Device opened successfully!
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback
PIPEWIRE_GetDeviceBuf
PIPEWIRE_PlayDevice
output_callback

(repeated over and over.)

So that's still the question we're tracking down here: why no output_callback calls. I'll keep digging.

Redemption198 commented 4 months ago

I just discovered it was a problem on my system 🙃. I did a semi-clean reinstall (preserved home subvolume) of Fedora 40 to fix another audio bug I had with my AirPods and it also fixed the ingame audio (did integrity check + 5 June update + no launch options).

image

XaapX commented 4 months ago

Fixed for me. I could remove -sdlaudiodriver pulseaudio and I have audio now

ekudritski commented 4 months ago

Not fixed for me.

icculus commented 4 months ago

Not fixed for me.

Can you try the build with debug logging and see what it reports?

The instructions from before (updated with latest download link)...

Okay, people having NO SOUND AT ALL without forcing pulseaudio:

Here's a build of SDL3 that has a potential fix, plus a bunch of logging added to it. The hope is my guess is correct and we're good to go here, but if not, my hope is the logging will help us figure it out.

Update the game to the latest, move the original SDL3 out of the way, and replace it with the one in this zip file:

csgo-linux-sdl3withlogging.zip

The file to replace is ~/.local/share/Steam/steamapps/common/dota\ 2\ beta/game/bin/linuxsteamrt64/libSDL3.so.0, assuming your Steam install is in the default location.

This was just built on my laptop (Ubuntu 23.04), so if it doesn't load for you at all, let someone else report in for now; I didn't try for serious distro compatibility here, but I'm hoping it'll just sort of work out.

If you run this and the game starts, it will write a text file to ~/dota2pipewirelog.txt

If the game still doesn't have audio, please post the log file somewhere for me to peruse.

If it fixes things for you, please report that, too!

(EDIT: Obviously replace the file in csgo, not dota2.)

icculus commented 4 months ago

To be clear, I don't know if this fix has made it into CS:GO yet, so if you just updated the game and it's still broken, that's not necessarily surprising...but if it's still broken for you, I want the debug log from that separate SDL3 build regardless of what CS:GO is doing by default.

ekudritski commented 4 months ago

Yes, it was my bad. I already forgot the manual update requirement. The full place for CSGO is ~/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/bin/linuxsteamrt64

The audio is working with csgo-linux-sdl3withlogging.zip.

kamkarm commented 4 months ago

CS2 now has sound for me. I did uninstall proton on my computer, which I think solved the problem

kisak-valve commented 3 months ago

Closing as fixed.