protonscr

Surround sound support?

protonclosed
ValveSoftware/Proton#1803 · opened 2018-10-22 by pedrofleck · updated 2023-02-27 · 33 comments · github
1 matching comments, n / p to jump
Ppedrofleck 2018-10-22 github

Does Proton support surround sound? I know Wine does. If yes, how can I enable it? Because I was trying to play Dead Space (which runs great, except for the keyboard that stops working sometimes) and I noticed the surround isn't working as it should, the three front channels kinda work (but I can still hear some sound from the rear channels), but the rear channels don't work, the sound is reproduced in the front (the game has a built in surround tester).

VVolkinaz 2018-10-23 github

It works exactly in DOOM and WF2

Aaeikum 2018-10-23 github

It works in general, though it's not super well tested so there may well be a problem. First make sure surround is working on your system in general with a native Linux application. Then, if needed, you can override the detected number of channels for a device using winecfg through the run script. See PROTON_DUMP_DEBUG_COMMANDS option in the README.

Ppedrofleck 2018-10-24 github

@aeikum Surround is working, I've been using Kodi for years. The how-to use this script is explained in the README? I'll check when I have time. Thanks!

Aaeikum 2018-10-24 github

Yes. The short version is, run the game once with PROTON_DUMP_DEBUG_COMMANDS=1 %command% in the Steam launch options, then exit the game. This will create some scripts in /tmp/proton_$USER/ that you can use to run stuff in the prefix. For example, you can run /tmp/proton_$USER/run winecfg to launch winecfg for that prefix.

Nnicman23 2019-02-07 github

in doom 2016 i had to winetricks sound=alsa to have sound output in game (in menu and logos i had some sound)

Kkisak-valve maintainer 2019-12-27 github

No surround audio in most of the games

Issue transferred from https://github.com/ValveSoftware/Proton/issues/3363.
@Loacoon1 posted on 2019-12-27T12:21:28:

Surround audio seems to only work with a few games (and may requires tweaks). Others only output stereo no matter the setting.
Games tested with only stereo so far :
Borderlands GOTY
Resident Evil 5
Anno 1404

I'm using Pulse with upmixing disabled on 5.1 analog out.

Aaeikum 2020-01-10 github

I spent some time looking into the games listed here.

Both Dead Space and Borderlands GOTY seem to be bugs in Wine's dsound. I'm working on fixing these.

I wasn't able to get RE5 or Anno 1404 working easily. After fixing the above two games, I'll try applying workarounds for those games, and see if I can dig into what's wrong with their surround sound.

So I think generally, yes, surround sound is supported. Just a couple bugs left to squash. If anyone has other surround sound issues, I would be interested to hear about them here.

LLoacoon1 2020-01-10 github

For Anno just add PROTON_USE_D9VK=1 PROTON_FORCE_LARGE_ADDRESS_AWARE=1 PROTON_NO_D3D11=1 to the startup command. I played more than 20hrs of this game with no issues except the audio.
For RE5 it's much more complicated. The infos are in the protondb page of the game.

I will update on the games with no surround that I find as I try games.

Simple curiosity : It is related to this bug right? https://bugs.winehq.org/show_bug.cgi?id=48106

LLoacoon1 2020-01-10 github

Oh, I forgot to add that having surround on Mirror's Edge (the 2009 one) has been a pain, see my comment here :
https://www.protondb.com/app/17410

Aaeikum 2020-01-10 github

Thanks for the instructions, I will try that out.

Simple curiosity : It is related to this bug right? https://bugs.winehq.org/show_bug.cgi?id=48106

It could be. The problem with Borderlands appears to be that we default to stereo sound in dsound, even if more channels are available. If the game doesn't explicitly request more channels, then we just continue using stereo. However, I haven't yet confirmed how Windows behaves, so that's my next step.

LLoacoon1 2020-01-10 github

Why default to stereo and not stick to winecfg audio setting?

Aaeikum 2020-01-10 github

Because that code was written in 1998 and hasn't been updated since. I'm working on it ;)

LLoacoon1 2020-01-10 github

Wow! Didn't notice the date!...
Makes much more sense.

BTW I'm downloading games that I finished before I realised that Pulseaudio crap is upmixing audio by default. I'll let you know which ones don't have surround.

LLoacoon1 2020-01-10 github

First batch :
Mass Effect 1 : not out of the box, but works with my Mirror's Edge workaround.
Far Cry 2 : only stereo no matter what.

Second batch :
The Witcher Enhanced Edition : Stereo
FFXII The Zodiac Age : Stereo

Aaeikum 2020-01-15 github

@Loacoon1 I have a build you can try out to fix this. It fixes Dead Space for me. I tried Borderlands GOTY on Windows and it didn't obviously have surround sound support, but perhaps my test wasn't valid.

Download this archive: issue1803.tar.gz

Then, head into your Proton 4.11 directory and extract it:

cd ~/.steam/steam/steamapps/common/Proton 4.11/
tar -xvf ~/Downloads/issue1803.tar.gz

This should overwrite two dsound.dll files. Now try out your games and see if it's fixed. I'm going to keep working on this on my end, but it'd be great to get your testing results, too. (Note this won't fix the OpenAL-based games, like Mass Effect and Mirror's Edge.)

(Here's the patch I used to produce that binary: 0001-dsound-Initialize-primary-buffer-with-device-s-chann.txt )

LLoacoon1 2020-01-15 github

For Mass Effect, Mirror's Edge and other OpenAL games my workaround works well so, not very user friendly but at least there is a way.
I will test the games I listed here tomorrow, including Borderlands just in case. I'll let you know as soon as it's done.

Aaeikum 2020-01-15 github

Surround sound seems to be working in FFXII even without that change.

Far Cry 2 surround sound seems to be working for me with the change.

LLoacoon1 2020-01-16 github

Ok so RE5 works with the patch.
Couldn't test Anno 1404 because the screen remains black, can't go to the menu (don't what's wrong, it used to work so well!)
I'm downloading the other games I mentionned earlier to test them.

LLoacoon1 2020-01-16 github

Looks like you've done some magic here.
Far Cry 2 : I confirm.
The Witcher : Ok
Borderlands GOTY : Ok

Aaeikum 2020-01-17 github

Thanks for testing @Loacoon1. If it passes our internal testing, I will include that change in an upcoming Proton release. At that point I think we can close this issue and document any remaining surround-sound issues on each game's issue page.

MM-Reimer 2020-01-25 github

Your patch does fix the surround sound for Bioshock Remastered

Aaeikum 2020-02-27 github

This work was released on the 5.0 branch. Please report on individual game bugs if you are still having surround sound issues, and please feel free to tag me so I see your report.

LLoacoon1 2020-08-12 github

Hi. After a lot of games working wonderfully here I am back.
Tomb Raider 2013 FMV are stereo only.
More important, The Witcher 3 is only stereo. And bad, like very low and voices are even worse.

ZZuikkis 2021-01-04 github

I also have struggled with surround sound issues. I have Dirt Rally 2.0 and Assetto Corsa Competizione, both should have surround but only output stereo.

I have surround (5.1 or 7.1) support in native linux apps and also in native Dota2 game in Steam.

Mmrmatteastwood 2022-05-23 github

Hey @Loacoon1 Would you be willing to elaborate on your workaround for Mirror's Edge and other OpenAL games? I am trying it on my Linux Mint 20.2 box, with home theatre AVR hooked up via HDMI from my GTX 1080 Ti. From your ProtonDB comment (https://www.protondb.com/app/17410):

1. Install on your distro openal and openal32 and set you desired audio in alsoft-config (you'll probably need some tweaking but it's worth). Don't hesitate to try the Decoder Configurations in the Renderer tab.
I can't find openal or openal32 in Synaptic, but I can see that libopenal1 and libopenal1:i386 are installed on my system. Does that look ok to you? Also, do you know where to get alsoft-config?

2. Set openal32 to builtin in Winecfg.
I'm running Mirror's Edge with "Proton Experimental". How can I open Winecfg for that?

3. Disable Steam-runtime so it uses the openal you've installed and your config. (depends on the distro I think, on Manjaro, install steam-native package, you can also do it through Lutris, but make sure you have all the dependancies installed)
I'm kinda lost here. What is Steam-runtime? Where could I read up on this and find out how to disable it on Mint? Any pointers would be greatly appreciated.

Mmrmatteastwood 2022-05-23 github

Surround doesn't work in Black Mesa. Launching the game with Proton-Experimental, I can select 7.1 speakers in the audio options, but the game only plays in stereo.

Mmrmatteastwood 2022-05-24 github

No surround sound in Serious Sam 2, even after editing Sam2.ini as described here:
https://steamcommunity.com/app/204340/discussions/0/846956740661746639/

Mmrmatteastwood 2022-05-24 github

For anybody wondering how to follow @Loacoon1's steps for Mirror's Edge, here's how I pulled it off on Linux Mint 20.2:

1. Ensure OpenAL is installed. On my system, it already was. In Synaptic, I see libopenal1 and libopenal1:i386.

2. Edit /etc/openal/alsoft.conf and set "channels = surround71" (or whatever applies)

3. Run winecfg for the affected games. For instance, my exact command for Mirror's Edge was:

WINEPREFIX=/home/thebrightside/zzLocal/Appdata/Steam/steamapps/compatdata/17410/pfx winecfg

I learned about winecfg for specific Proton prefixes here:
https://www.protondb.com/help/troubleshooting-faq#some-reports-say-they-made-the-game-running-by-installing-some-software-how-do-i-do-that

4. In winecfg, open "Libraries" tab

5. Manually add a new override in "New override for library:" field, call it "openal32"

6. Click "Edit" for that override and set it to "Builtin (Wine")

7. Open Lutris, set up your Steam library and add the game if not yet done

8. For affected game, click on arrow next to "Play" button and select "Configure"

9. In "System Options", select "Disable Lutris runtime" and "Perefer system libraries"

10. Run game. Steam will launch and then the game.

Mmrmatteastwood 2022-06-01 github

Update for Serious Sam 2. It does work! I made a mistake at first. The correct steps are:
Edit Sam2.ini as described here: https://steamcommunity.com/app/204340/discussions/0/846956740661746639/

  • Navigate to [your Steam folder]\steamapps\common\Serious Sam 2\Content\SeriousSam2
  • Edit Sam2.ini
  • Change "sfx_iAPI = 2" to "sfx_iAPI = 1"

Then, follow the same steps as in my comment re. Mirror's Edge: https://github.com/ValveSoftware/Proton/issues/1803#issuecomment-1135784181

LLoacoon1 2022-06-14 github

Sorry for the lack of answer. I don't monitor the email I use for Github enough. Anyway yeah you got it right, I was just not aware that on some distros alsoft-config can be a separated app. https://community.linuxmint.com/software/view/alsoft-conf

Mmrmatteastwood 2022-06-15 github

Sorry for the lack of answer. I don't monitor the email I use for Github enough. Anyway yeah you got it right, I was just not aware that on some distros alsoft-config can be a separated app. https://community.linuxmint.com/software/view/alsoft-conf

No worries, and thanks for getting back to me! I'm wondering, did you find a way to make these edits right in Proton itself, i.e. so that games will work in surround when you launch them normally through Steam? Right now, I'm using the Lutris detour and it works, but it feels a bit wonky. I hear something about steam-native, but there's no such package in Linux Mint's package manager.

Re. alsoft-config, yeah, I actually remember using this many years ago. Alas, Linux Mint 20.2 doesn't have it in its repos at all. Perhaps it's back in 20.3 or it'll be in 21 when that launches in a few weeks...

LLoacoon1 2022-06-20 github

I don't think you can without getting rid of Steam Runtime because I believe that it uses it's own OpenAL library without our settings.

Mmrmatteastwood 2022-08-12 github

No surround sound in Doom Eternal or Dishonored (links lead to my detailed reports).

Both games use wwise, so perhaps if we somehow find a fix to get one working, then other wwise games might work too? I really hope somebody out there has already found a solution.