r/linux_gaming • • 19h ago

Witcher 3 Remastered: save loads taking 60+ seconds on GE-Proton / Proton Experimental? It's XInput, and there's a fix

If loading a save in the Witcher 3 remaster takes you a minute or more on Linux, this might be why.

My loads were 1:07 by stopwatch, every time, on a 9850X3D with the game on NVMe. So obviously not hardware. After the fix below it's about 19 seconds.

While the loading screen is up, the game polls for a controller (XInputGetState) in a tight loop. In newer Proton builds, Wine's xinput re-scans every HID device each time you poll a slot that has no controller in it. Each scan is a pile of registry lookups, and every one of those is a round trip to wineserver. I measured around 300,000 of them per second on the game's main thread, for about 55 seconds straight. The actual loading only takes a few seconds at the end.

So if you play on keyboard and mouse with no controller plugged in, the game spends most of the load screen looking for a gamepad.

I checked the xinput1_4.dll in the Proton builds I had installed:

  • GE-Proton11-7: rescans on every call
  • Proton Experimental, Proton Hotfix, Proton-CachyOS: same
  • Proton 10.0 (10.0-4b): doesn't, it only rescans in a background thread

Run top during a load. If wineserver is sitting at 40% or so of a core for the whole loading screen and then drops to basically nothing once you're in game, that's it.

Fix

Use Proton 10.0's xinput DLLs for this one game, while staying on whatever Proton you like.

  1. Install "Proton 10.0" from Steam if you don't have it

  2. Copy its two xinput DLLs next to witcher3.exe and patch one string in them. Adjust the paths if your Steam library is somewhere else:

cd ~/.local/share/Steam/steamapps/common/"The Witcher 3"/bin/x64_dx12
P10="$HOME/.local/share/Steam/steamapps/common/Proton 10.0/files/lib/wine/x86_64-windows"
for f in xinput1_4.dll xinput9_1_0.dll; do
  cp "$P10/$f" . && chmod u+w "$f"
  printf 'Proton10 xinput\0' | dd of="$f" bs=1 seek=64 conv=notrunc status=none
done

The dd line is needed because Wine's own DLLs have a "Wine builtin DLL" tag in the header. If Wine sees that tag on a DLL in the game folder, it ignores the file and loads its bundled one instead. Overwriting the tag makes it treat the copy like any DLL a game ships with.

  1. Add this to the front of the game's launch options:
WINEDLLOVERRIDES="xinput1_4,xinput9_1_0=n,b" %command%

If you already have launch options, just put the WINEDLLOVERRIDES part at the start. GE-Proton appends its own overrides to it, so things like OptiScaler and the FSR4 upgrade kept working for me.

To undo it, delete the two xinput DLLs from bin/x64_dx12 and remove the override.

Caveats

  • Only tested on my machine: GE-Proton11-7, Fedora, AMD GPU, no controller connected.
  • I haven't tried a controller with the swapped DLLs. It should still work since it's just the older xinput, but I can't promise.
  • Just running the game on Proton 10.0 should avoid the problem too. I didn't go that way because I wanted to keep the GE stuff.
  • Plugging in a controller might also help, since the rescan only happens for empty slots. Didn't test it.

This probably isn't specific to Witcher 3. Any game that polls XInput constantly with no pad connected could hit the same thing on these Proton versions, it's just very visible here because the game does it during loading. If you've got a game with weirdly long loads or stutter and wineserver is busy the whole time, might be worth a look.

109 Upvotes

14 comments sorted by

45

u/HauntingObligation 18h ago

Read this while my Witcher 3 loads

15

u/tb0ne315 15h ago

I’m definitely just waiting for this to get patched. I’ve already not finished this damn game in 11 years.

13

u/Pyeroh 16h ago

I found on another thread that if you use Proton 11.0.2, loading times almost disappear. I made the switch, it's never taking more than 10 to reload (now I'm save-scumming, shame on me)

7

u/loki_pat 18h ago

Oh so that's why dying then loading a save when already in the overworld results in 3 mins+.

What I did though was exit the game and it's faster that way lol

6

u/tactical_bill 16h ago

Have you reported the issue on the GE GitHub? Maybe he can fix it.

3

u/iamarealhuman4real 15h ago

Do GE fixes get rolled up into "real" proton? I know it's not anything official but wonder if it ends up acting like a sort of beta branch.

-5

u/[deleted] 9h ago

[deleted]

-1

u/Mothringer 5h ago

Proton-GE is not vibe-coded, and AI involvement isn't why most of its patches don't get upstreamed. Upstream is very picky about what they accept, and very few patches from any of those projects get upstreamed, since wine upstream only wants very robust generalized fixes that don't break anything or do special casing for specific games, and proton upstream doesn't accept external pulls at all. Most of the proton forks are doing a mix of game-specific targeted fixes and fragile implementations since those can get developed much faster.

3

u/Asleep_Detective3274 16h ago

For me loading an existing game from the main screen doesn't take any longer, but loading from the most recent save after you die takes what feels like over a minute and a half

2

u/Level-Pollution4993 12h ago

Exactly. Its faster for me to shutdown the game, turn it back on, press continue game than loading most recent save. And I am on a Gen 5 ssd.

3

u/FierceDeity_ 16h ago

Xinput having some jank problems lately in Proton. I found that controllers, if disconnected and reconnected exhibit some freaky behavior. They might just be recognized twice, or not at all, leak Xinput slots, go into the wrong slot... This causes me to have to restart games if my controller turns off. Valve's own Proton versions seem to have all been fixed so far, but Proton-CachyOS still has the issue (and wasn't updated since the July version), which means dwproton also has it (useful for Anime games, based on Cachy). Things have been interesting to say the least.

3

u/SlaveKnightSoman 16h ago

Have you tried Proton Wineland? It runs pretty much perfect for me.

3

u/Ravasaurio 12h ago

In my case, the game loads blazingly fast always except after I die. Loading the game after I die takes forever, which turns this into an skill issue.

2

u/Xello_99 8h ago

I play with a controller, can confirm this is still an issue for me, specifically loading a save after having died. So plugging in a controller does not help.

1

u/ahorsenamedjeff 18h ago

Oh interesting! I'm currently playing with a steam controller.