ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.22k stars 174 forks source link

Can't change audio *output* device for music (pulseaudio) #5254

Open CleyFaye opened 6 years ago

CleyFaye commented 6 years ago

Your system information

Please describe your issue in as much detail as possible:

When playing music using the Steam Music Player, it initially goes to the default audio device. I should be able to change that from the PulseAudio settings (moving Steam's audio output to another device), as I do with other programs, but I can't. Either Steam open the audio device in a way that prevent switching, or it is constantly adjusting its output to be the default audio device. There is no error message, and the option to change the output device does show up in pavucontrol, but Steam output immediately goes back to the default device.

Steps for reproducing this issue:

  1. Start playing music in Steam
  2. Try to change the output device in pavucontrol/other pulseaudio mixer software
  3. Output device instantly reset to default value, actual audio output is not affected

If the issue with resetting the output device lies in the steam client, an obvious solution would be to fix it. A setting to choose the audio output device (the same way we can choose the audio input device) would also work.

gladstonedigital commented 6 years ago

Same problem here on Debian. Not just with steam music player, but any audio from steam period.

BruceJohnJennerLawso commented 6 years ago

same issue here

tfaller commented 5 years ago

I noticed that "auto-change" does also not work. For example if I start the player and plug in afterwards my headphones. Any other player would now automatically use the headphones, but steam does not.

nightsky30 commented 5 years ago

I started noticing this after an upgrade from Ubuntu 18.04 to 18.10, but apparently it is not a new issue.

madrang commented 5 years ago

It seems some games are using alsa instead of pulse. Please check your .asoundrc in your home-directory or/and the /etc/asound.conf and verify that the following is in this file:

ctl.dmixer {
type pulse
}

pcm.pulse {
type pulse
}

ctl.pulse {
type pulse
}

pcm.!default {
type pulse
}

ctl.!default {
type pulse
}

If not, you can copy & paste this, save and reboot. This will change the default audio-output to pulseaudio. http://steamcommunity.com/app/221410/discussions/0/618458030650103916/#c618458030650649992

nightsky30 commented 5 years ago

Still an issue with the Xubuntu 19.10 development version. I'm experiencing it with Steam games such as Dead Cells, but other apps outside of Steam allow the switch of output device just fine such as Chrome.

Two workarounds I found:

  1. Before starting the affected Steam game/app, open pavucontrol and set the fallback device in the output tab to whichever device you desire. Then start the Steam game/app. This forces the use of the output device you want. For whatever reason this cannot be switched in pavucontrol for the Steam game/app after it has launched.

  2. The second workaround involves modifying the pulseaudio default config settings. Use the following to list your sound devices:

    pactl list

    Locate the index of the device you want to set as the default/fallback device. You can switch the output device on the fly with the following command while using an app like Chrome playing sound if needed:

    sudo pactl set-default-sink [0,1,2, etc]

    Then set it permanently by modifying the values in pulse's config file:

    sudo nano /etc/pulse/default.pa

    ### Make some devices default
    set-default-sink 1
    #set-default-source input

    Then reboot.

I'd run into the post @madrang mentions, but did not find either file on my system.