https://bugs.winehq.org/show_bug.cgi?id=55665
Bug ID: 55665 Summary: Wine versions >=8.9 do not load Fallout 4 properly Product: Wine Version: 8.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: rcs777@proton.me Distribution: ---
I'm sorry if this is a bit long, but I want to be as detailed as possible. In short, I usually build Wine myself using TkGlitch's build scripts and put the resulting build in Lutris's runtime path. I find that TkG Wine offers slightly better performance for Games than my system-provided wine. However when Wine 8.9 rolled around, my self compiled builds stopped working with Fallout 4; the game simply crashed before the intro played with no backtrace provided. My FO4 has its own logs thanks to mods and they told me it crashed in XAudio2_7.dll. It's worth noting that for FO4 I have XAudio2_7 set to native in winecfg, otherwise the audio that comes through is very muffled. It's pretty much a must have for a playable experience. The first thing I did was try a plain non-modified build of Wine from my package manager and a clean prefix, but had no luck.
After some trial and error I found that FO4 works perfectly on plain Wine 8.8, so I bisected between 8.8 and 8.9 and found that the startup failure was caused by commit 354a8bb1f4a65bdec052606f2799db9e2907b5b1, "ntdll: Better match Windows subheap sizes". However... Reverting that patch only works up to 8.10, on plain 8.11 and up I was back to square one with crashing in XAudio before the intro video. So after bisecting from 8.10 with that patch reverted just for good measure (I don't know if it's actually needed past 8.9) and 8.11, I came up with a82238fad52761114ab2488d422fad3f70dbb854, "ntdll: Allocate 64-bit and kernel stacks in high memory". Assuming that reverting that patch would fix the latest development version too, I jumped straight to 8.16 and reverted it. I found that I also had to revert 3ac808e46e4795e14c5b999aa39fd9cd15f95279, "ntdll: Set Wow64 user space limit based on LARGE_ADDRESS_AWARE" and f473e31341a0dbc2eb5222cc1d1cfe468946bf0a, "ntdll: Load modules with a high base address in high memory" too. I'm not sure if those last two patches actually break anything, but they seem to depend on variables introduced in the 64-bit Allocate patch so without reverting these too I got build time failures. In any case, once these patches are reverted on Wine 8.16, I get a clean build and Fallout 4 works perfectly again.
Here's where I'm confused... I grabbed a vanilla Wine 8.16 build from https://github.com/Kron4ek/Wine-Builds... and it worked, unpatched, out of the box. As far as I can tell from his build scripts, those Wine builds are compiled on Ubuntu Bionic, which means those libraries and compilers are likely far older than mine on Debian Sid. Maybe it's something that an older compiler is doing different, seeing as how the reverted patches seem to have a lot to do with memory allocation? If that were the case it might not even be a bug in Wine.
In any case, here's my specs: OS: Debian GNU/Linux trixie/sid x86_64 Kernel: 6.5.0-1-amd64 DE: Plasma 5.27.8 CPU: AMD Ryzen 7 5800X (16) @ 3.800GHz GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT Memory: 3931MiB / 32011MiB GCC Version: gcc (Debian 13.2.0-4) 13.2.0
All build dependencies while running the configure script were satisfied except for OSS, and I've never actually had satisfied.
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #1 from rcs777@proton.me --- Forgot to include my MingW Cross Compiler Version just in case...
x86_64-w64-mingw32-gcc (GCC) 13-win32
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #2 from rcs777@proton.me --- Retested against Wine 8.17 from the WineHQ Debian repo, Kron4ek's builds, and a self-compiled build, and no dice. Interesting because Kron4ek's 8.16 build *did* work, but 8.17 doesn't. On the self compiled build in addition to the patches I had to revert previously, this time I also had to revert d92d9bc2a9c2fa097beb7c420b7e0229760f365c, "ntdll: Don't free reserved memory on 64-bit macOS", 9b60b671da82123590253472318d95547d8d138d, "ntdll: Don't release the low address space reservation on wow64", and a81c53504ae32715e6e91bd020fdebd5bef20d48, "ntdll: Release the low address space reservation for 64-bit apps" to work around compile-time failures from undefined variables, etc due to the previous patches I listed also being reverted.
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #3 from rcs777@proton.me --- Issue is still present on Wine 8.18
https://bugs.winehq.org/show_bug.cgi?id=55665
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #4 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to rcs777 from comment #2) These three patches to revert are equal to what I found in bug 55761, and further leads to bug 55833.
Do you still need to drop the commits from your first commit?
And instead of dropping d92d9b, 9b60b6 and a81c53 maybe following might work for you and be easier:
dlls/ntdll/unix/virtual.c @@ -4399,3 +4399,3 @@ void virtual_set_large_address_space(void) #ifndef __APPLE__ /* don't free the zerofill section on macOS */ - else + else if (main_image_info.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA) free_reserved_memory( 0, (char *)0x7ffe0000 );
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #5 from Bernhard Übelacker bernhardu@mailbox.org --- A commit like the change above got committed: https://source.winehq.org/git/wine.git/commitdiff/f03c3a167c2e4abe92b1e1bf2e...
Please re-check if the issue still persists with wine-9.0-rc1.
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #6 from rcs777@proton.me --- (In reply to Bernhard Übelacker from comment #5)
A commit like the change above got committed: https://source.winehq.org/git/wine.git/commitdiff/ f03c3a167c2e4abe92b1e1bf2ea5f7c31a07fc3b
Please re-check if the issue still persists with wine-9.0-rc1.
A clean build of Wine 9.0-rc1 from Git with no patches reverted is still broken
https://bugs.winehq.org/show_bug.cgi?id=55665
--- Comment #7 from rcs777@proton.me --- (In reply to Bernhard Übelacker from comment #5)
A commit like the change above got committed: https://source.winehq.org/git/wine.git/commitdiff/ f03c3a167c2e4abe92b1e1bf2ea5f7c31a07fc3b
Please re-check if the issue still persists with wine-9.0-rc1.
Just retested against Git master since I read on that other bug thread that https://gitlab.winehq.org/wine/wine/-/commit/7a7b82880a73e654933b7866e79f3e9... fixed some applications, but FO4 still seems to be broken, and its logs still says it's crashing on an exception access violation in XAudio2_7.dll. Just to recap, XAudio2_7 is set to native in winecfg because having it set to builtin causes very muffled sound effects when firing weapons. The game *does* launch if you set it back to builtin however, but native XAudio worked fine prior to 8.9.