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.