https://bugs.winehq.org/show_bug.cgi?id=41271
Bug ID: 41271 Summary: Fallout 4 - Audio issues (no sounds, hangs when playing intro video) Product: Wine Version: 1.9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: xaudio2 Assignee: wine-bugs@winehq.org Reporter: kimmo.myllyvirta@gmail.com Distribution: ---
Created attachment 55571 --> https://bugs.winehq.org/attachment.cgi?id=55571 1.9.18 logs
This could be dupe of bug #36977, but also hits bug #39402 possibly some others too. But since I can't find a decent workaround which works for Fallout 4, it might be ok to open a new bug. Not quite sure if the component is correct, either xaudio2 or dsound anyway. A bunch of logs attached, see below what they mean.
Steam version of the game, only Steam and Fallout 4 installed to a clean prefix. Steam installs xact from _CommonRedist when first time launching the game.
When the game is started it hangs when it should play the intro video; +tid,+dsound log attached (Log: fo4_tid_dsound.txt, +tid,+dsound). This could be bug #36977, since the game uses radgametools bink.
With builtin xaudio2_7 the intro video works sometimes (extremely rarely, sorry I don't have decent log of this). But after the video is finished it will always hang after; warn:xaudio2:IXAudio2Impl_CreateSourceVoice OpenAL can't convert this format! when it tries to play the music for the main menu. (see bug #39402)
With xaudio2_7 set to disabled the intro video works, but again extremely rarely. And it results to no sounds in Fallout 4 since bink player uses dsound, but Fallout 4 itself doesn't, it seems. There is "sAudioAPI=XAudio2" setting in Fallout4.ini, but it is a legacy setting. I can't find any indication of it supporting anything else than xaudio2 (on older Bethesda games there was other options available).
Now the weird hack part; Since this feels like a race condition, I added usleep(100000) to the beginning of IDirectSound8Impl_Release, which seems to help a lot (this issue might not have anything to do with dsound release, that's just the first place I tried); - native xaudio2: the intro video works, and the music in main menu plays ok, always - success :) (Log: fo4_tid_dsound_sleep_hack.txt, +tid,+dsound ) - builtin xaudio2_7: the intro video works, but the music in main menu doesn't and the game hangs (as expected) after; warn:xaudio2:IXAudio2Impl_CreateSourceVoice OpenAL can't convert this format! (Log: fo4_tid_dsound_xaudio2_sleep_hack_builtin_xaudio2_7.txt, +tid,+dsound,+xaudio2 ) - disable xaudio2_7: the intro video works, no music in the main menu, but the game doesn't hang (Log: fo4_tid_dsound_sleep_hack_disable_xaudio2_7, +tid,+dsound )
Notes; - The main menu is just a black screen (lots of d3d11 fixmes in those logs), you just have to listen and imagine you are there :) - I also tried xact and xact_jun2010 with winetricks - those make no difference, works just like the xact shipped with the game
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #1 from Kimmo Myllyvirta kimmo.myllyvirta@gmail.com --- Created attachment 56250 --> https://bugs.winehq.org/attachment.cgi?id=56250 hack to get past the intro video
Still an issue with wine-1.9.24. With the attached patch the intro video plays ok.
https://bugs.winehq.org/show_bug.cgi?id=41271
cetedus@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cetedus@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=41271
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #2 from winetest@luukku.com --- Kimmo since you got the game and you seem to have deeper understanding of things. Could you take a look at the open fallout4 bugs (unless you have already deleted the prefix/game). There are currently 2 similar bugs open I doubt we really need them both. what's the real issue that is blocking fallout 4 now working?
https://bugs.winehq.org/show_bug.cgi?id=41271
Kimmo Myllyvirta kimmo.myllyvirta@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu
--- Comment #3 from Kimmo Myllyvirta kimmo.myllyvirta@gmail.com --- I don't have it installed atm, but I'll retest it later and take a look at those other bugs.
This bug is about the intro video not playing. And it is highly possible that some users do not have this issue (there's one old success report in appdb with 1.9.18 staging). Just a slight delay fixes it, which also makes debugging this quite difficult.
With a quick look, all the three bugs are different issues. The patch from this bug might help with that intro video on OS X (bug 41890), dunno, I'm not familiar with OS X. Apparently MaxVersionGL hack is used there to get it started, but GL_ARB_texture_view and a lot more is missing.
But, in general if you are running it with an opengl implementation, where you don't need to use MaxVersionGL hack (it just allows this game to start without crashing), then; - The launcher works - If the intro video doesn't play (black screen, hangs), use the patch from this bug - You can get to the main menu with CheckFormatSupport patch (bug 40046) - The game will hang when a new game is started. Needs at least CreateTexture1D (bug 40976), and a lot more.
https://bugs.winehq.org/show_bug.cgi?id=41271
Adam Bolte abolte@systemsaviour.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |abolte@systemsaviour.com
https://bugs.winehq.org/show_bug.cgi?id=41271
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=41271
bugzilla@biechl.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@biechl.net
--- Comment #4 from bugzilla@biechl.net --- Is there anything one can do to help resolving this issue, which seems to be the main game-breaker for this game?
The audio hack of Kimmo worked for a short while, made it possible to get past the intro, but for the last months we're again stuck at a black screen when the game starts and video should play. A few manage to get past it, but nobody knows exactly why, sadly.
The last lines of WINE output look pretty much the same to me for the last months, not sure what we can do to help resolving this issue, but if there is anything we/I can do... Might a new dump be of help?
https://bugs.winehq.org/show_bug.cgi?id=41271
Robert Walker bob.mt.wya@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bob.mt.wya@gmail.com
--- Comment #5 from Robert Walker bob.mt.wya@gmail.com --- (In reply to Kimmo Myllyvirta from comment #1)
Created attachment 56250 [details] hack to get past the intro video
Still an issue with wine-1.9.24. With the attached patch the intro video plays ok.
Thanks with this patch and Wine Staging 2.15 the intro video plays fine. I can get to the in-game menu screen (which appears to be working fine). The game finally dies after loading a Steam Cloud save - just a hang, with the sound of my panting dog looping :-)
Without the patch the game hangs at a black screen - immediately after clicking play on the game launcher.
https://bugs.winehq.org/show_bug.cgi?id=41271
mrdeathjr28@yahoo.es changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mrdeathjr28@yahoo.es
https://bugs.winehq.org/show_bug.cgi?id=41271
Stanly Ibkis bloodyiron@shaw.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bloodyiron@shaw.ca
--- Comment #6 from Stanly Ibkis bloodyiron@shaw.ca --- Any chance we can get this baked into main wine already? It's already helping people with Fallout 4.
https://bugs.winehq.org/show_bug.cgi?id=41271
Thomas winehq@spam.b2ag.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winehq@spam.b2ag.de
--- Comment #7 from Thomas winehq@spam.b2ag.de --- You have to understand, that adding a call to sleep to prevent some race condition is considered a hack. No sane developer would send this upstream. It's ok to compile your Fallout 4 wine version with this patch and the patch should help devs to further narrow down the real problem here. But as long as no one found a real fix chances are low to have to problem fixed in mainline wine.
https://bugs.winehq.org/show_bug.cgi?id=41271
tim110011@163.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tim110011@163.com
--- Comment #8 from tim110011@163.com --- Is this bug relate to Bug 42414?
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #9 from Bloody Iron bloodyiron@lanified.com --- So what is the preferable method to address this? I certainly can appreciate adding bad practice code to mainline is a bad idea, but can't we take the method, and write it better, then stuff it into mainline?
(In reply to Thomas from comment #7)
You have to understand, that adding a call to sleep to prevent some race condition is considered a hack. No sane developer would send this upstream. It's ok to compile your Fallout 4 wine version with this patch and the patch should help devs to further narrow down the real problem here. But as long as no one found a real fix chances are low to have to problem fixed in mainline wine.
https://bugs.winehq.org/show_bug.cgi?id=41271
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kaazoo@drqueue.org
--- Comment #10 from Józef Kucia joseph.kucia@gmail.com --- *** Bug 41890 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=41271
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |headstaryt@gmail.com
--- Comment #11 from Józef Kucia joseph.kucia@gmail.com --- *** Bug 43083 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=41271
Johan Gardhage johan.gardhage@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johan.gardhage@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #12 from bugzilla@biechl.net --- Still a thing in Wine 3.0-rc3. Hack still needed, as using (native dsound and xaudio2) does not solve the issue for me.
https://bugs.winehq.org/show_bug.cgi?id=41271
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #13 from Zebediah Figura z.figura12@gmail.com --- The difference caused by the hack is that it allows the mixer thread [i.e. DSOUND_mixthread()] to run, instead of immediately returning. But I don't know why this would have an effect. 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.
https://bugs.winehq.org/show_bug.cgi?id=41271
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=41271
caleb@phobeus.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |caleb@phobeus.de
https://bugs.winehq.org/show_bug.cgi?id=41271
Freso bugs.winehq.org@freso.dk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs.winehq.org@freso.dk
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #14 from tim110011@163.com --- wine-3.8 and wine-3.8-staging test report:
2D sound plays fine, 3D sound plays as strange engine noise. 2D sound: like player firing a weapon. 3D sound: any actor speech, npc firing a weapon, music. Quit game generate this error: AL lib: (WW) ReleaseContext: 0x7f647c01bcb0 released while current on thread AL lib: (EE) ReleaseThreadCtx: Context 0x7f647c01bcb0 current for thread being destroyed, possible leak!
When modding fo3 and fnv with xEdit you can see a weapon plays to kinds of sound like GunFireSound2D and GunFire3D. (Any fo4 modder please confirm this.)
Audio walkaround is manually override X3DAudio1_7.dll and XAudio2_7.dll to native. After using walkaround, quit game will not generate AL lib error.
https://bugs.winehq.org/show_bug.cgi?id=41271
charles.gorand.dev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.gorand.dev@gmail.co | |m
--- Comment #15 from charles.gorand.dev@gmail.com --- Wine 3.8 + dxvk + [bBackgroundMouse=1]:
Test 1 : normal use case
* Wine 3.8 with no changes.
=> Game stuck on intro : black screen.
Test 2 : prevent mixthread to lock anything and avoid any race condition in wine.
* Commenting while loop in DSOUND_mixthread()
=> Game stuck on intro : black screen.
Test 3 : Working scenario
* Change the code as follow :
static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcGUID) {
[...] device->thread = CreateThread(0, 0, DSOUND_mixthread, device, 0, 0); usleep(100000);
=> Game is working perfectly.
Test 4 : Working scenario and prevent mix thread to do anything.
* Code changes of Test 2 and 3
=> Game is working perfectly. (No sound on intro video)
My analysis (maybe I'm wrong) :
Test 1 and 2 show there is something wrong inside the game and not related to wine. I think we will get the same result if "dsound" implementation is completely stubs. (I can try it to confirm it). Test 2 shows there is no (visible?) race condition within wine (dsound) that cause the issue.
Test 3 and 4 confirm there is an issue in the game (sorry not easy to explain, but it looks clear for me).
Adding a delay in Initialize() or Release() will avoid a race condition in the game.
DirectSound is only used by intro player (bink player ?)
The game use XAudio and works perfectly once bink intro is skipped.
I tried also to change intro video permission to prevent game from playing it. The game is stuck with black screen.
If there is a way to disable bink player, I think it's the only way to play the game without hacking wine.
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #16 from tim110011@163.com --- Skip intro:
Fallout4Custom.ini
[General] SIntroSequence=0 fChancesToPlayAlternateIntro=0 uMainMenuDelayBeforeAllowSkip=0
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #17 from charles.gorand.dev@gmail.com --- It does not work. Moreover these settings only works in Fallout4.ini :
sIntroSequence=0 fChancesToPlayAlternateIntro=0 uMainMenuDelayBeforeAllowSkip=0 bPreloadIntroSequence=0
With the hack, the cinematic is skipped correctly, without hack the game is stuck in the same way.
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #18 from Luis Alvarado luisalvaradox@gmail.com --- Tested on Wine 3.10 with Ubuntu 18.04 The cinematic at the beginning sounds like an old movie which I believe is fine. After that I only hear a car engine forever. And many sounds are simply not there.
https://bugs.winehq.org/show_bug.cgi?id=41271
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=41271
Arthur Huillet arthur.huillet@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.huillet@free.fr
https://bugs.winehq.org/show_bug.cgi?id=41271
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org
https://bugs.winehq.org/show_bug.cgi?id=41271
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair@hotmail.com
--- Comment #19 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Created attachment 62826 --> https://bugs.winehq.org/attachment.cgi?id=62826 Possible patch
Does the attach patch work for you?
If not, can you please provide a +dsound log?
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #20 from charles.gorand.dev@gmail.com --- I have moved my Fallout installation to Steam Linux with Proton. I'm not able to test anymore.
I reviewed your patch and it looks valid and usefull anyway.
My previous test patch was to put a delay after CreateThread() which solve also the issue.
The way you implement it, is better :
- DirectSoundDevice_Initialize() * Init stuff * Create Thread * Wait thread is running. * return from DirectSoundDevice_Initialize()
- DirectSoundDevice_Release() * Check if thread running * Wait for thread termination * Deinitialize stuff.
I suggest you submit your patch in wine.
https://bugs.winehq.org/show_bug.cgi?id=41271
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com
--- Comment #21 from Jacek Caban jacek@codeweavers.com --- A related patch was committed lately: https://source.winehq.org/git/wine.git/commitdiff/158a2c96cc4044f8cb2f63686e...
I meant to revisit this, but I can't reproduce the problem anymore (even with the patch reverted, so it does not seem to be the reason).
Could someone ease confirm that it's still a problem with recent Wine version?
https://bugs.winehq.org/show_bug.cgi?id=41271
--- Comment #22 from Robert Walker bob.mt.wya@gmail.com --- (In reply to Jacek Caban from comment #21)
A related patch was committed lately: https://source.winehq.org/git/wine.git/commitdiff/ 158a2c96cc4044f8cb2f63686ebde6b5f59e747e
I meant to revisit this, but I can't reproduce the problem anymore (even with the patch reverted, so it does not seem to be the reason).
Could someone ease confirm that it's still a problem with recent Wine version?
Jacek,
I've been playing a fair bit of Fallout 4 recently. I've not needed to apply the dsound patch for a while. The game appears to start very consistently.
There still remains all the other FO4 sound issues (crackling, no fall-off with distance, from source, and game sounds completely cutting out, with some machine gun turrets), not related to this bug.
https://bugs.winehq.org/show_bug.cgi?id=41271
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=41271
Ethan Lee flibitijibibo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |flibitijibibo@gmail.com
--- Comment #23 from Ethan Lee flibitijibibo@gmail.com --- Wine 4.3 includes a new XAudio2 implementation based on FAudio, so from Wine's perspective this should be RESOLVED FIXED.
Note that Fallout 4 uses xWMA for audio, so you won't get most (if not all) sound effects without using a special build of FAudio that uses FFmpeg for that format.
https://bugs.winehq.org/show_bug.cgi?id=41271
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #24 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.14?
https://bugs.winehq.org/show_bug.cgi?id=41271
Gcenx gcenx83@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gcenx83@gmail.com
--- Comment #25 from Gcenx gcenx83@gmail.com --- Not really sure anyone really cares about using native xact anymore but this bug is still present.
To get it working id needed to apply “hack to get past the into video” to get the game working on most launches.
https://bugs.winehq.org/show_bug.cgi?id=41271
Neko-san nekoNexus@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nekoNexus@protonmail.ch