no sound in Fallout 4

Questions about Wine on Linux
ZombieRedShirt
Level 3
Level 3
Posts: 86
Joined: Fri Oct 07, 2011 6:25 am

no sound in Fallout 4

Post by ZombieRedShirt »

So. I'm trying to run Fallout 4 under wine 3.5 with basically a vanilla wine and a relatively new prefix. I have ubuntu 17.10, an nvidia 970 and latest drivers.
In previous wine versions, I had little issue with sound, however under 3.5 I'm getting no sound at all. From the moment the game starts, nothing.

I'm using export WINEDEBUG=-all,+alsa,+dsound, and am getting messages like this:

Code: Select all

JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
0034:trace:dsound:DllMain (0x7f76a80b0000 1 (nil))
0034:trace:dsound:DirectSoundCreate ((null),0x2e8048,(nil))
0034:trace:dsound:IDirectSoundImpl_Create ({279afa83-4981-11ce-a521-0020af0be560}, 0x23f9d0)
0034:trace:dsound:setup_dsound_options appname = [Fallout4.exe\DirectSound]
0034:trace:dsound:setup_dsound_options ds_hel_buflen = 65536
0034:trace:dsound:setup_dsound_options ds_hq_buffers_max = 4
0034:trace:dsound:setup_dsound_options ds_eax_enabled = 0
0034:trace:dsound:IUnknownImpl_QueryInterface (0x65d8f330,{279afa83-4981-11ce-a521-0020af0be560},0x23f9d0)
0034:trace:dsound:IDirectSound8Impl_AddRef (0x65d8f330) refds=1
0034:trace:dsound:IUnknownImpl_Release (0x65d8f330) ref=0
0034:trace:dsound:IDirectSound8Impl_Initialize (0x65d8f330, (null))
0034:trace:dsound:DirectSoundDevice_Initialize (0x65d8f358,(null))
0034:trace:dsound:GetDeviceID (DSDEVID_DefaultPlayback,0x23f8a0)
0034:trace:dsound:DirectSoundDevice_Create (0x23f890)
0034:trace:dsound:DSOUND_ReopenDevice (0x65d8f650, 0)
0034:trace:dsound:DSOUND_ReopenDevice period 2278 ms frag_frames 100441 buf_frames 3528
0034:trace:dsound:DSOUND_PrimaryOpen (0x65d8f650)
0034:trace:dsound:DSOUND_PrimaryOpen buflen: 65536, frames 3528
0056:trace:dsound:DSOUND_mixthread (0x65d8f650)
0034:trace:dsound:IDirectSound8Impl_SetCooperativeLevel (0x65d8f330,0x20038,DSSCL_PRIORITY)
0034:warn:dsound:IDirectSound8Impl_SetCooperativeLevel level=DSSCL_PRIORITY not fully supported
0034:trace:dsound:IDirectSound8Impl_GetCaps (0x65d8f330, 0x23fae0)
0034:trace:dsound:IDirectSound8Impl_GetCaps (flags=0x00000f5f:
0034:trace:dsound:_dump_DSCAPS DSCAPS_PRIMARYMONO DSCAPS_PRIMARYSTEREO DSCAPS_PRIMARY8BIT DSCAPS_PRIMARY16BIT DSCAPS_CONTINUOUSRATE DSCAPS_CERTIFIED DSCAPS_SECONDARYMONO DSCAPS_SECONDARYSTEREO DSCAPS_SECONDARY8BIT DSCAPS_SECONDARY16BIT )
0034:trace:dsound:IDirectSound8Impl_Release (0x65d8f330) refds=0
0034:trace:dsound:DirectSoundDevice_Release (0x65d8f650) ref was 1
0034:trace:dsound:DSOUND_PrimaryDestroy (0x65d8f650)
0034:trace:dsound:DirectSoundDevice_Release (0x65d8f650) released
0034:trace:dsound:directsound_destroy (0x65d8f330) released
That's all the sound related stuff from the terminal output.

Anyone know anything? Anything I can do?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

ZombieRedShirt wrote:So. I'm trying to run Fallout 4 under wine 3.5 with basically a vanilla wine and a relatively new prefix. I have ubuntu 17.10, an nvidia 970 and latest drivers.
In previous wine versions, I had little issue with sound, however under 3.5 I'm getting no sound at all. From the moment the game starts, nothing.
...
You would need to rebuild and patch Wine for this issue: WineHQ Bug 41271 - Fallout 4 - Audio issues (no sounds, hangs when playing intro video).

If this is too hard - I think the 3rd party Lutris ("Open Gaming Platform") can side-load a pre-patched version of Wine.

The sound issue does appear to a bit intermittent (it is a race condition). The game is doing some unorthodox things with it's Dsound handles:
The game is essentially calling Initialize() and Release() in quick succession, with no other operations—i.e. it doesn't even seem to be explicitly playing any sound.
It's unlikely to get a proper fix, integrated into Wine, anytime soon.

Bob
ZombieRedShirt
Level 3
Level 3
Posts: 86
Joined: Fri Oct 07, 2011 6:25 am

Re: no sound in Fallout 4

Post by ZombieRedShirt »

Bob, I have tried with and without the dsound patch, to no avail. It seems to make no difference.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

ZombieRedShirt wrote:Bob, I have tried with and without the dsound patch, to no avail. It seems to make no difference.
I get some sound in Fallout 4 - but I'm definitely missing some channels. Also channels can randomly drop out.
I think that's the best we've got - till someone wades in with some ninja multithreaded debugging skills.
There's clearly some nasty race conditions occurring at present. :cry:

Bob
ZombieRedShirt
Level 3
Level 3
Posts: 86
Joined: Fri Oct 07, 2011 6:25 am

Re: no sound in Fallout 4

Post by ZombieRedShirt »

It's weird. Sound worked fine in wine 3.3, and sort of worked in 3.4. Don't know what's going on now.
Hosh-blot
Newbie
Newbie
Posts: 1
Joined: Wed Jan 30, 2013 12:42 am

Re: no sound in Fallout 4

Post by Hosh-blot »

In my experience with wine 3.5 I can get full sound in the menu and a SHORT time in game, then it just fails or a sound starts repeating over and over...

ubuntu 16.04 Nvidia 970

and my wine is compiled with the dsound patch

my wine prefix, has xact, d3dcompiler_43 d3dx11, d3dx10, d3dx9, and directx9.
theriddick
Newbie
Newbie
Posts: 2
Joined: Thu May 24, 2018 3:00 am

Re: no sound in Fallout 4

Post by theriddick »

I have sound working with wine3.8 and patches to fix the black screen issue. (dxvk)

The problem I get is the audio will cut out after 30-60minutes (in combat often) and at the same time certain keys fail to work, such as TAB.

Quite a random issue, might be related to my USB Sound Blaster 5.1 setup, have tried changing pulse latency 40ms seems to help a tiny bit, gonna try 60ms and see what happens.

Might not be related to latency issues.
tim110011
Level 2
Level 2
Posts: 30
Joined: Wed Jul 05, 2017 2:29 am

Re: no sound in Fallout 4

Post by tim110011 »

Bob Wya wrote:
ZombieRedShirt wrote:Bob, I have tried with and without the dsound patch, to no avail. It seems to make no difference.
I get some sound in Fallout 4 - but I'm definitely missing some channels. Also channels can randomly drop out.
I think that's the best we've got - till someone wades in with some ninja multithreaded debugging skills.
There's clearly some nasty race conditions occurring at present. :cry:

Bob
Something about Fallout 4 HowTo:

Code: Select all

export PULSE_LATENCY_MSEC=60
This setting may mute "Test Sound" in winecfg.
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

I take it there's still no way around this, other than to recompile with the dsound patch? No way to load the patch alongside an already existing version of wine?

I've seen some people try fixing the issue by installing xact from winetricks, then setting xaudio2_0 to xaudio2_9 to native,builtin in winecfg. Doing so causes the game to crash for me when launching.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

hiigaran wrote:I take it there's still no way around this, other than to recompile with the dsound patch? No way to load the patch alongside an already existing version of wine?

I've seen some people try fixing the issue by installing xact from winetricks, then setting xaudio2_0 to xaudio2_9 to native,builtin in winecfg. Doing so causes the game to crash for me when launching.
You best bet is probably to use the Lutris: Fallout 4 install scripts.
Lutris can pull download custom built versions of Wine, that include the Fallout 4 dsound patch.
The DXVK install script version will give much better performance, if you have a modern(ish) Nvidia GPU or an AMD GPU.

Bob
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Was trying to give that one a go, but it always seems to hang around the steam installation stage.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

hiigaran wrote:Was trying to give that one a go, but it always seems to hang around the steam installation stage.
The Lutris build scripts target Ubuntu 16.04 specifically...

DXVK takes a bit of setting up. E.g. you need the native multilib Vulkan libraries (>1.x.76) installed, etc.

Without a Wine terminal log, I wouldn't be able to help that much. :cry:

Bob
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

No worries. FO4 is lower on my priorities anyway. My main focus is getting Dark Souls 3 to run. Having much better luck with that, but it's still not fully there.
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Okay, I think I'll try doing the manual compiling of Wine with the relevant patch. Couple of things first:

1: How do I have multiple versions of Wine on the same computer? Lutris and PlayOnLinux both have settings where you can install multiple versions, so I'm sure there must be a way to do it without having to run those two.
2: I don't actually know how to compile. Tried following some Wine compiling guide on YouTube, but the links in the video description were dead
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

hiigaran wrote:Okay, I think I'll try doing the manual compiling of Wine with the relevant patch. Couple of things first:

1: How do I have multiple versions of Wine on the same computer? Lutris and PlayOnLinux both have settings where you can install multiple versions, so I'm sure there must be a way to do it without having to run those two.
2: I don't actually know how to compile. Tried following some Wine compiling guide on YouTube, but the links in the video description were dead
This issue is discussed on the WineHQ AppDB page for Fallout 4 (Steam).

There is no major issue with having as many different Wine versions installed as you want.
In fact the WineHQ repositories already support this.
Things only go tits up when you have a path collision. :shock:

Youtube can be OK for documenting technical processes... But very few content creators can do this effectively in this medium.

Bob
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

So this is what I keep getting stuck on. I'm following this guide: https://www.youtube.com/watch?v=XZqkYKlgRrA

Problem is, it's for Arch, and I'm using Ubuntu, so when I get to the part about makepkg, I can't do anything. I don't know what to do with the PKGBUILD file.

There's a precompiled Wine linked in the video description, but the download page is stuck loading on a blank page (my internet connection is not the problem).
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

hiigaran wrote:So this is what I keep getting stuck on. I'm following this guide: https://www.youtube.com/watch?v=XZqkYKlgRrA

Problem is, it's for Arch, and I'm using Ubuntu, so when I get to the part about makepkg, I can't do anything. I don't know what to do with the PKGBUILD file.

There's a precompiled Wine linked in the video description, but the download page is stuck loading on a blank page (my internet connection is not the problem).
@hiigaran

Please read the documentation on the page I linked to (which you clearly haven't done).

You aren't going to get very far with Linux - if you only rely on Youtube videos.

Bob
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Oh, you mean https://appdb.winehq.org/objectManager. ... 2863#notes

I assumed you were trying to show me something from #testdata, since that was the section that was open. Right, will look into that later on then.
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Eh, too complicated. I'll either wait for an update to Wine, or if I really want to, I'll just run a VM.
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

So, I have no idea if an update happened, or if my new wineprefix installing Mono and Gecko was the solution, but FO4 is working better than it was previously.

xaudio2_7 is set to native,builtin, and xact was installed through winetricks. Sound works without any issue, as far as I can tell.

Still another issue though: There seems to be a significant issue with the mouse, where your view would randomly jump around when you try to look around. One solution that seems to work can be found in the link below:

https://bugs.winehq.org/show_bug.cgi?id=42631#c50

Problem is, even with winecfg set to capture the mouse in fullscreen applications, the mouse still moves past the boundaries of the full screen game. On a single monitor setup, it probably wouldn't matter. However, I'm on a triple monitor setup, and the primary monitor is the center one. Doing some more research, it seems that this is solved by enabling virtual desktop emulation, but the problem with this is that the virtual desktop comes up on my left monitor, rather than my center monitor.

So I guess my next question would be: How do you get the virtual desktop on a specific monitor? Using the DISPLAY variable will not work, because my three monitors are apparently seen as one screen (an unrelated startup script I have that opens up gnome-terminal requires a --geometry=XxY+X+Y option to open on the right monitor)
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: no sound in Fallout 4

Post by Bob Wya »

@hiigaran,

Are you following the: Wine-patching guide, Fallout 4 setup script (and AppDB comments) on the WineHQ AppDB: Games / Fallout 4 / Steam page?

The setup guide is basically ripped off from the non-DXVK Lutris Fallout 4 install script.

If you want to get in the weeds...
The AppDB comments cover attempts to stop specific audio channel dropouts, that occur throughout the game.
I would need to compare these with native Windows 10 - transferring saved FO4 games over.
Sadly life is too short... :lol:

Generally, in my experience, using dxvk (third party DX11 to Vulkan translation layer) gives the best Fallout 4 performance (significantly better than Wine Staging + Wine-PBA).

Bob
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Well what I've done this time around was as follows:

1: Create new wineprefix
2: Download Mono and Gecko when prompted
3: Run winetricks xact
4: Set xaudio2_7 to native,builtin

I am not using DXVK for this wineprefix, though. Turns out that the game crashes when DXVK and xact are both installed. Looks like it's high performance with no sound, or medium performance with sound for now. Surprisingly, these four steps were all I did to get FO4 working with sound. The only issue I see left to address is the mouse bug. This is what it looks like in game:

https://www.youtube.com/watch?v=3zAkEMoh5BI

The aforementioned workaround just needs a virtual desktop running on a specific monitor, and it should be playable after that.

I'm not following any patch guides, as I seem to fail spectacularly at compiling things. That, and for some reason, it greatly bothers me if something is not available via an apt install command.
tim110011
Level 2
Level 2
Posts: 30
Joined: Wed Jul 05, 2017 2:29 am

Re: no sound in Fallout 4

Post by tim110011 »

Better read Fallout4 appdb [ :idea: HowTo] and [ :idea: Comments] sections before :roll: :?:
3: Run winetricks xact
Old walkaround do not work: you should manually override these dlls. X3DAudio1_7.dll and XAudio2_7.dll may work, but i suggest override full XACT files. Guide in fallout4 appdb comment section: "Audio Issue Walkaround for wine-3.6"
4: Set xaudio2_7 to native,builtin
Old walkaround do not work: set them to native only

Mouse walkaround: (modify Fallout4Custom.ini only, better do not touch Fallout4.ini)

Fallout4Custom.ini

Code: Select all

[Controls]
bBackgroundMouse=1
Furthermore, you may need `raw input` mod from nexusmods.

Better do not use wine-pba with DXVK.
Recent DXVK do not work with xact walkaround.
https://bugs.winehq.org/show_bug.cgi?id=38668
Using old nvidia driver? DXVK 0.6x may not work, you may try 0.54. (on wine-3.7, this version may work with xact override).

Beware of Bug38668 and Bug39402

## This is not advertisement ##

If you don't want to use gui manager like lutris, i have a command-line manager `Simple Wine Helper` which have a function can override all XACT dlls.
If you want to compile wine, wine-staging, wine-pba with patches, i have a command-line tool `Simple Wine Building Bot`
However, both tools are made on Fedora and are not tested on other distros.

https://github.com/tim110011/Simple-Wine-Helper
https://github.com/tim110011/Simple-Wine-Building-Bot
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

Like I said, audio is working fine just the way that I have it configured in my previous post. And while DXVK and xact don't work together, my GPU performance is still enough to offset the performance reduction, so FPS is still playable. The only issue I have is with the mouse, and while I have already set bBackgroundMouse=1 to stop the jumpy mouse behaviour, this results in the mouse moving out of the fullscreen game and severely limiting how you can look around.

This is solved using a virtual desktop to stop the mouse from leaving the constraints of your set resolution. However, the virtual desktop is opening up on the wrong screen.

I'm going to see if anyone might know over at Ask Ubuntu with my question here.
hiigaran
Level 2
Level 2
Posts: 41
Joined: Fri Sep 22, 2017 12:41 am

Re: no sound in Fallout 4

Post by hiigaran »

My apologies. I thought the audio was fully fixed. Managed to get as far as returning to Sanctuary before the audio stopped working.

Following one of the suggestions in the bugs/comments, I used cabextract to obtain the 62 bit dlls for x2daudio1_7 and xaudio2_7, replacing the originals in the winprefix's system32 folder. No change.
I set x3dadio1_0 to x3dadio1_7, xapofx1_1 to xapofx1_5, and xaudio2_0 to xaudio2_9 all to native. No change.

Also, my current temporary fix for the virtual desktop issue is to press Super, then drag the virtual desktop to the right monitor. Works well enough for now.
Locked