Dota-2 icon indicating copy to clipboard operation
Dota-2 copied to clipboard

[Linux] no audio after update

Open MissPotato opened this issue 1 year ago • 37 comments

Your system information

  • System information from steam (Steam -> Help -> System Information) in a gist:
  • Have you checked for system updates?: Yes
  • Are you using the latest stable video driver available for your system? Do not know, Linux handles drivers at a kernel level.
  • Have you verified the game files?: Yes

Please describe your issue in as much detail as possible:

DotA2 sound system is not working, it does not even boot and prints no errors.

Steps for reproducing this issue:

  1. Boot game
  2. Have no audio

Additional Info

https://gist.github.com/MissPotato/650493875cc5a030c36782c693c093b7

MissPotato avatar May 23 '24 01:05 MissPotato

Having the same issue as well.

Sound card:
Audio device: USB Mixer

Operating System Version:
"Arch Linux" (64 bit)
Kernel Name: Linux
Kernel Version: 6.8.9-arch1-1
X Server Vendor: The X.Org Foundation
X Server Release: 12101013
X Window Manager: bspwm
Steam Runtime Version: steam-runtime_0.20240415.84615

phantom-voltage avatar May 23 '24 01:05 phantom-voltage

According to this thread https://github.com/ValveSoftware/Dota2-Gameplay/issues/12233 adding -sdlaudiodriver pulse to my launch options fixed my issue. It is still a bug imo, but at least there is a simple solution. You might have a different program for sound. the other common one is -sdlaudiodriver pipewire

MissPotato avatar May 23 '24 02:05 MissPotato

adding -sdlaudiodriver pulse to my launch options fixed my issue. It is still a bug imo, but at least there is a simple solution.`

Can confirm this workaround works in my KDE Manjaro Linux.

dangarciahe avatar May 23 '24 03:05 dangarciahe

adding -sdlaudiodriver pulse to my launch options fixed my issue. It is still a bug imo, but at least there is a simple solution.`

Can confirm this workaround works in my KDE Manjaro Linux.

Had an issue with the new patch where the game was stuck at the loading screen after pressing play and adding '-sdlaudiodriver pulse' also fixed it on Arch Linux.

IAKOBVS avatar May 23 '24 10:05 IAKOBVS

Hello @icculus, this issue report might be interesting to ponder from SDL's side.

kisak-valve avatar May 23 '24 12:05 kisak-valve

According to this thread ValveSoftware/Dota2-Gameplay#12233 adding -sdlaudiodriver pulse to my launch options fixed my issue. It is still a bug imo, but at least there is a simple solution. You might have a different program for sound. the other common one is -sdlaudiodriver pipewire

Worked for me as well.

elicia4 avatar May 23 '24 13:05 elicia4

-sdlaudiodriver flag worked for me too

FranciscodeMaussion avatar May 23 '24 13:05 FranciscodeMaussion

Okay, so what's happening here is that this is the first build of DOTA2 (as far as I know) that favors Pipewire over PulseAudio. We did this because Pipewire's PulseAudio emulation layer was causing problems for some people, and since they were running Pipewire anyhow, we might as well talk to it directly.

Apparently some people are now having the opposite problem, though, where Pipewire doesn't work but Pulse does.

We're going to see if we can fix one or both of the specific problems, and decide where to go from there. If -sdlaudiodriver is working for you, that's absolutely the correct workaround for right now (but please be prepared to remove that flag later when we resolve this issue!).

To be clear: I do not believe this is a DOTA2 bug at the moment, but rather an SDL3 issue.

More updates as I have them!

icculus avatar May 23 '24 15:05 icculus

I want to add that for me the pipewire driver worked for some time, but about 4th game it stopped working. Not only that but the audio before was very quiet, switching back to pulse also changed the audio volume to what I assume is the correct level (like other games & apps).

staticf0x avatar May 23 '24 16:05 staticf0x

For those having problems with PipeWire (the default in the latest DOTA2 build): can you tell me what audio hardware and distro you're using (and what version of the distro)? I'm looking for reproduction cases I can trigger in my office.

icculus avatar May 23 '24 23:05 icculus

You're asking if we have PipeWire installed and still have issues, correct? Or are you asking for anyone who has issues when dota2 defaults to PipeWire?

I am pretty sure it's the first, which does not apply to me.

But just encase it will be of any help I'm using Manjaro, running on the Testing branch for pacman repository, with kernel build 6.6.31-1-MANJARO. I am using an external USB audio device: a "Sound Blaster Play! 3" and PulseAudio version 17.0.

MissPotato avatar May 24 '24 00:05 MissPotato

Your system doesn't have PipeWire at all? If so, that changes the hypothesis completely, then.

icculus avatar May 24 '24 03:05 icculus

Oh apparently I DO have PipeWire as well, sorry about that, I had only checked installed applets.

pipewire --version returned

Compiled with libpipewire 1.0.6
Linked with libpipewire 1.0.6

MissPotato avatar May 24 '24 04:05 MissPotato

Fedora 40, pipewire 1.0.6, kernel 6.8.10-300, the sound card appears as Starship/Matisse HD Audio Controller in lshw

staticf0x avatar May 24 '24 04:05 staticf0x

@icculus I have PipeWire installed, but it's not used. pactl info gives me server name "pulseaudio". I had to use the -sdlaudiodriver pulse flag to get audio working.

The reason I have PipeWire installed is because obs-studio requires it, even if not used :man_facepalming:.

Here's the versions of PipeWire and PulseAudio installed, but keep in mind that PipeWire is not being used (as far as I know):

pipewire
Compiled with libpipewire 1.0.6
Linked with libpipewire 1.0.6

pulseaudio 17.0

I do not have pipewire-pulse installed.

I'm on Arch (ignore 'void', I'm not on void, I just call my system that):

                   -`                    void@void 
                  .o+`                   --------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Kernel: 6.9.1-arch1-1 
               `+oooooo:                 Uptime: 51 mins 
               -+oooooo+:                Packages: 1371 (pacman) 
             `/:-:++oooo+:               Shell: fish 3.7.1 
            `/++++/+++++++:              Resolution: 2560x1440, 2560x1440 
           `/++++++++++++++:             WM: i3 
          `/+++ooooooooooooo/`           Theme: Adwaita [GTK2/3] 
         ./ooosssso++osssssso+`          Icons: Adwaita [GTK2/3] 
        .oossssso-````/ossssss+`         Terminal: kitty 
       -osssssso.      :ssssssso.        CPU: AMD Ryzen 9 7950X (32) @ 5.881GHz 
      :osssssss/        osssso+++.       GPU: NVIDIA GeForce GTX 1070 
     /ossssssss/        +ssssooo/-       Memory: 15065MiB / 31816MiB 
   `/ossssso+/:-        -:/+osssso+-
  `+sso+:-`                 `.-/+oso:                            
 `++:.                           `-/+/                           
 .`                                 `/

Here's my audio hardware:

           *-multimedia
                description: Audio device
                product: Family 17h/19h HD Audio Controller
                vendor: Advanced Micro Devices, Inc. [AMD]
                capabilities: pm pciexpress msi bus_master cap_list
                configuration: driver=snd_hda_intel latency=0
                
           *-multimedia
                description: Audio device
                product: GP104 High Definition Audio Controller
                vendor: NVIDIA Corporation
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: driver=snd_hda_intel latency=0

AlexanderArvidsson avatar May 24 '24 11:05 AlexanderArvidsson

Probably worth mentioning that pipewire libraries should always be available to the game from the Steam Linux Runtime - Sniper container environment, regardless of a running pipewire service on the host system.

At least pipewire 0.3.65 as of this writing (https://repo.steampowered.com/steamrt-images-sniper/snapshots/latest-container-runtime-depot/sources/).

kisak-valve avatar May 24 '24 12:05 kisak-valve

I still haven't been able to reproduce this. Can someone having this issue check if the system thinks the game is playing anything at all?

This might look different on your system, but in Gnome on Fedora 40, you want the system settings -> Sound -> Volume Levels (it's at the bottom, scroll down!)...see if there's a thing called "SDL Application" in there while DOTA2 is running.

image

If not, we probably didn't manage to talk to PipeWire at all. If so, something else is wrong. Also, make sure the volume is up on that "SDL Application" slider. :)

icculus avatar May 24 '24 22:05 icculus

Nope, I checked this when I first started having the issues. All it had was Firefox. Inside of dota settings memu, the sound device just says something along the lines of "sounds disabled."

On Fri, May 24, 2024, 6:01 PM Ryan C. Gordon @.***> wrote:

I still haven't been able to reproduce this. Can someone having this issue check if the system thinks the game is playing anything at all?

This might look different on your system, but in Gnome on Fedora 40, you want the system settings -> Sound -> Volume Levels (it's at the bottom, scroll down!)...see if there's a thing called "SDL Application" in there while DOTA2 is running.

image.png (view on web) https://github.com/ValveSoftware/Dota-2/assets/673562/5b4b30a0-ab5a-419e-8ab0-8030c61d009a

If not, we probably didn't manage to talk to PipeWire at all. If so, something else is wrong. Also, make sure the volume is up on that "SDL Application" slider. :)

— Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/Dota-2/issues/2707#issuecomment-2130421934, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEMQHEPKD2IWL7X2GL2M6DZD62EDAVCNFSM6AAAAABIEWFRO2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZQGQZDCOJTGQ . You are receiving this because you authored the thread.Message ID: @.***>

MissPotato avatar May 24 '24 22:05 MissPotato

I also have no audio not right from the start, but usually only after playing for some time. Sometimes when it happens, the game (or maybe even the whole system) lags for a second, then there is some short cracking noise and then no in game sound after that.

System: Pop!_OS 22.04 Audio: Sunrise Point-LP HD Audio Pipewire version: 1.0.3 Not sure if it might affect it in any way, but I also run dota through gamemode and mangohud

ZhulanovAA avatar May 25 '24 12:05 ZhulanovAA

I'm on Manjaro, updated hours ago.

Description:    Manjaro Linux
Release:        24.0.0
Codename:       Wynsdey
  • Running native steam client (not via flatpak).
  • Dota 2 on native client.

The system has a "manjaro-pipewire" package, that I installed about 5m ago. Launching the game, without specifying an audio driver on launching options. On "Audio", it shows "default option", and the two audio devices. Sounds working normally. Will try a couple of games and see if there's anything to report.

  • A couple of (bloody/messy) matches later: no stuttering, no sound problems. Was planning on installing pipewire, anyway.

hcuevas avatar May 25 '24 15:05 hcuevas

I'm not sure if I have the same issue, but I'll describe it.

Initially my client has sound but it loses it right after I find a match. After that I need to restart Dota and reconnect and it works. Something with the match found sound, like how recently Steam was crashing when you had screenshot sound turned on?

upd: -sdlaudiodriver pipewire does not help System: EndeavourOS Audio server: Pipewire

Qunas101 avatar May 26 '24 07:05 Qunas101

I still face the same issue as mentioned way back(in #2491) . Dota2 simply doesn't play any audio via my USB interface unless I manually redirect pipewire to my USB interface. I see the selection in audio options - either soundcard from MB or my USB interface. However if I select USB interface as audio device, nothing happens.

Dota2 - audio interface from motherboard: image

Dota2 - Selected my USB interface (note - Dota2 process simply disappear) image

Dota2 - Manually routed sound to my USB interface. I have to set motherboard soundcard in dota2 and route signal to my USB interface in pipewire. Sound works as expected then. image

System info:

  • Archlinux
  • Kernel 6.9.1
  • Pipewire 1.0.7

PBatomic avatar May 27 '24 17:05 PBatomic

@icculus Just in case this input helps:

Since a recent update (within the last 2 weeks; I'm not sure if it was 7.36 exactly or slightly before), my Dota's audio randomly disappears, after working for a while.

Sometimes this happens within a few minutes of starting the game (e.g. in the main menu), sometimes it happens after an hour or so.

~When it happens, I believe (will check in detail next time) that SDL Application: Audio Stream disappears from the Playback tab of pavucontrol.~ Edit: That's wrong. It's still three, but stops metering.

I am not sure if it is the same issue, as most people here seem to have no audio at all.

I have not tried -sdlaudiodriver pulse yet.

Compiled with libpipewire 1.0.1
Linked with libpipewire 1.0.1
NixOS 23.11

Audiodevice is a "UGREEN USB to 3.5 mm" mini sound card because my builtin Intel Kaby Lake audio died some time ago.

nh2 avatar May 27 '24 20:05 nh2

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 avatar May 28 '24 23:05 icculus

That custom build worked, my sound is working in game now! Thank you! I'm going to play a few games to see if anything works.

MissPotato avatar May 29 '24 01:05 MissPotato

I played 4 games of turbo with no issues at all!

MissPotato avatar May 29 '24 02:05 MissPotato

For those that are curious, this is the fix: https://github.com/libsdl-org/SDL/commit/aeb223fc23c057af5d6bce12719b0f872b8ae8bf

I'll wait to get more feedback here, then I'll recommend Valve pull this into DOTA2.

icculus avatar May 29 '24 13:05 icculus

I recently switched off of PulseAudio to PipeWire as I was still having issues, unrelated to this one. However, since the 7.36b update I've been getting no audio randomly. It seems to happen after a match, maybe related to alt-tabbing. However, I tried downloading the libSDL here, but after switching to it my game will not boot, so I am unable to test if this fixes the issue.

MissPotato avatar Jun 08 '24 02:06 MissPotato

This sounds like a different issue, if sound works for awhile, fwiw.

icculus avatar Jun 08 '24 06:06 icculus

I definitely think you're correct, I just wanted to make sure it was known the fixed lib was causing crashes.

MissPotato avatar Jun 08 '24 18:06 MissPotato