Proton: Surround sound support?

Created on 22 Oct 2018  路  23Comments  路  Source: ValveSoftware/Proton

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).

Most helpful comment

@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 )

All 23 comments

It works exactly in DOOM and WF2

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.

@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!

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.

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

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.

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.

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

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

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.

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

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

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.

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

@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 )

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.

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.

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.

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

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.

Your patch does fix the surround sound for Bioshock Remastered

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AwesamLinux picture AwesamLinux  路  3Comments

ghost picture ghost  路  3Comments

AwesamLinux picture AwesamLinux  路  3Comments

raikirii picture raikirii  路  3Comments

ArekPiekarz picture ArekPiekarz  路  3Comments