Skip to content

Instantly share code, notes, and snippets.

@gabrielmaialva33
Last active October 13, 2026 07:30
Show Gist options
  • Select an option

  • Save gabrielmaialva33/33ebb2542f0513d55100b22aa2149ff5 to your computer and use it in GitHub Desktop.

Select an option

Save gabrielmaialva33/33ebb2542f0513d55100b22aa2149ff5 to your computer and use it in GitHub Desktop.
The Witcher 3 5.0 on Proton/Linux: re-enable DLSS, DLSS-G and ray tracing (wine_get_version check patch)

The Witcher 3 5.0 on Proton: re-enable DLSS, DLSS-G and ray tracing

game 5.01 NVIDIA AMD Proton

An unofficial workaround until CD PROJEKT RED or Valve fix this properly. As soon as the 5.0 executable sees Wine, it turns off Streamline (DLSS SR/RR, DLSS-G, Reflex), ray tracing, path tracing and FSR frame generation. Everything here brings them back.

Important

The exe patch script supports only bin/x64_dx12/witcher3.exe 5.0.0.1048522 (patch 5.01, 2026-10-08, Steam build 25773555, sha256 2df76539…b101), 5.0.0.1044392 (the 2026-10-01 5.00c hotfix, Steam build 25646871, sha256 9406eccc…fe51) and 5.0.0.1041720 (the 2026-09-29 "Remastered" release, Steam build 25575366, sha256 c272b2c2…c7e25). It picks the build by size, checks the sha256, and refuses anything else, so a future game update needs a script update. The GOG exe passed the same hash check in one report. Wineland and the sed one-liner don't depend on the build.

Pick your path

You use Do this You get
Steam, any GPU Proton Wineland 11.0-20260930 or newer, original exe Everything, nothing to patch
Proton Experimental (2026-10-02 or newer) The sed one-liner Everything
GE-Proton11-7 The script DLSS SR/RR, Reflex, DLSS-G. RT and path tracing also need a newer vkd3d-proton
AMD / Intel on another Proton The script with --rt-only RT, path tracing, FSR FG
GOG through Heroic, or Lutris / Faugus Wineland plus the manual step in #75 / #76 / #77, or the sed one-liner if that step doesn't stick (confirmed through Faugus by @micker) Everything
A laptop, or any PC with the iGPU enabled Read Hybrid GPUs first

"Everything" means DLSS SR/RR, Reflex and DLSS-G on NVIDIA (DLSS-G needs an RTX 40 or newer), plus ray tracing, path tracing and FSR frame generation on any GPU.

Contents: Wineland · Other Protons · Ray tracing · Troubleshooting · DLSS 5 NR · Notes · Under the hood

Recommended: Proton Wineland

Tip

Proton Wineland 11.0-20260930 or newer (nanomatters' proton-cachyos) hides Wine from witcher3.exe only, through a per-game fix (HideWineExports for that exe). The game files stay untouched, so game updates do not break it. It also carries the vkd3d-proton fixes ray tracing needs (the BLAS size fix, tight alignment, the RADV shader fix) and turns NVAPI off on non-NVIDIA GPUs.

  1. Download the newest proton-wineland-11.0-<date>-x86_64_v3.tar.xz (or the x86_64 one for CPUs without AVX2) from the release page and extract it into ~/.local/share/Steam/compatibilitytools.d/. As of 2026-10-05 that is 20261005, which also smooths out the frame pacing swings NVIDIA Reflex caused in this game. It is a regular Proton build, not tied to CachyOS.
  2. Restart Steam, then pick it in The Witcher 3 → Properties → Compatibility.
  3. Use it with the original exe: if you patched it with the script, run python3 w3_proton_patch.py --restore first (or Steam's "Verify integrity of game files").
  • The per-game fix runs when Steam launches the game. Heroic, Lutris and Faugus need a manual step for now: #75, #76, #77.
  • Tested here on 5.00c and 5.01 (RTX 4090, 615.71.09): with the unmodified exe, Streamline loads, DLSS SR/RR, DLSS-G and the RT options are all available. A session of over 15 minutes with path tracing and DLSS-G on ran with no hang and no Xid.

Other Protons

GE-Proton: a protonfix that hides Wine from this game automatically was merged on 2026-10-10 (umu-protonfixes#641), and GE's tree now also has a vkd3d-proton with #3308 and #3332, which the game needs once Wine is hidden. Both ship in the next GE-Proton after 11-7. Until then, GE-Proton11-7 needs one of the options below plus a newer vkd3d-proton.

One-liner (survives game updates)

From @Saancreed: rename the string the game looks up, so the lookup fails and every Wine check goes away at once.

cd "<Steam library>/steamapps/common/The Witcher 3/bin/x64_dx12"
sed -i s/wine_get_version/frog_get_version/ witcher3.exe
  • This behaves like --rt below: DLSS, RT and the non-Wine buffer alignment are all exposed. So it needs a vkd3d-proton with #3308, or the game crashes at startup (GE-Proton11-7's does not have it), and the RT fixes before turning RT on. Proton Experimental has them since its 2026-10-02 update (vkd3d-proton 44cf7c20, which includes #3332 and the dxil-spirv fix; if Steam hasn't updated it yet, the bleeding-edge beta has them too). A vkd3d-proton master build or nanomatters' wineland-11.0-20260930 have them as well.
  • On AMD, also PROTON_DISABLE_NVAPI=1 on GE-Proton and other Protons that don't do it yet. Proton Experimental (since 2026-10-01) and Wineland already turn NVAPI off for this game when no NVIDIA driver is loaded.
  • It changes the exe, so the script then refuses it. Use one or the other; Steam's "Verify integrity of game files" undoes either.

The script

Close the game first. Python 3, no dependencies.

python3 w3_proton_patch.py                # NVIDIA: DLSS SR/RR, Reflex, DLSS-G   (default Steam path)
python3 w3_proton_patch.py /path/to/witcher3.exe
python3 w3_proton_patch.py --rt           # NVIDIA: the above + RT and path tracing
python3 w3_proton_patch.py --rt-only      # AMD / Intel: RT, path tracing and FSR frame generation
python3 w3_proton_patch.py --dry-run      # show the state, change nothing
python3 w3_proton_patch.py --restore      # undo everything
GPU Run You get
NVIDIA default DLSS SR/RR, Reflex and DLSS-G. Nothing else needed
NVIDIA --rt The above plus ray tracing and path tracing, which need a recent vkd3d-proton (below)
AMD / Intel --rt-only Ray tracing, path tracing and FSR frame generation. On AMD, RT also needs the dxil-spirv fix (below)
  • The DLSS patches are NVIDIA only: with OptiScaler/fakenvapi they made the game exit in one report, so AMD and Intel use --rt-only.
  • A copy of the original is saved once as witcher3.exe.orig-<version> (e.g. witcher3.exe.orig-5.0.0.1044392). Steam's "Verify integrity of game files" also restores the original.
  • A game update replaces the exe and the offsets change. Run the script again only if it says the build is supported.

Then choose DLSS and Frame Generation in Options → Graphics.

Hiding Wine by hand

HideWineExports=Y, or "Hide Wine version" in winecfg (proton-cachyos, wine-staging), hides Wine from the game entirely, which exposes DLSS and RT without touching the exe. It still needs a vkd3d-proton with #3308 and the RT fixes. With those it was reported working on NVIDIA in #3226 and on AMD (@drizzt, GOG version through Heroic).

  • On proton-cachyos the per-app key did nothing and the global HKCU\Software\Wine\HideWineExports=Y worked (@vharmash, RX 9070). Wineland's per-game fix uses the per-app key and works.
  • Older proton-cachyos builds crash with it because their lsteamclient lacks SteamUtils011.

Hybrid GPUs (laptops)

Patch 5.01 fixes a case where the game picked the wrong GPU, so try without the settings below first. With an integrated GPU enabled, the game's hardware detection can pick the iGPU instead of the dedicated one: Low preset, RT locked, settings that "revert", DLSS reported as not supported, and very low FPS. Found by @Soyalexf. Hide the iGPU from the game by pointing Vulkan at the dedicated GPU's driver only, in the launch options:

VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%   # NVIDIA
VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json %command%   # AMD

On NVIDIA laptops with PRIME offload, __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command% does the same.

If none of that helps, turning the iGPU off in the BIOS (dGPU-only or MUX mode, on laptops that have it) takes it out of the picture entirely. That fixed the frame rate on an RTX 3050 laptop (@San10deep). DLSS still needs one of the fixes above to show up.

Ray tracing and path tracing

--rt, --rt-only, the one-liner and hiding Wine all clear the Wine flag, so RT and path tracing become selectable. What else is needed depends on the GPU.

Warning

NVIDIA, drivers 590 and newer: vkd3d-proton #3332 (by @Stanni97, merged 2026-09-30). Without it, RT hangs the GPU within about a minute (Xid 109 / VK_ERROR_DEVICE_LOST).

  • The cause: vkd3d-proton's Witcher 3 workaround asked for BLAS sizes with ALLOW_UPDATE forced on. On NVIDIA that reports up to ~5x less build scratch than BLAS built without it actually use.
  • Tested here on 5.0 (RTX 4090, 615.71.09) with vkd3d-proton master 4d06d745 plus #3332, nothing else: about 29 minutes, ~17 with RT and ~12 with path tracing, DLSS RR and DLSS-G on. No hang, and zero register_rtas_scratch_range warnings.

Warning

AMD (RADV): dxil-spirv PR #311 (by @drizzt, merged 2026-09-30 and in vkd3d-proton master). Without it, RADV crashes in vkCreateRayTracingPipelinesKHR while the game loads, because one of the game's path-tracing shaders translates to invalid SPIR-V (Mesa #16450).

With it, RT was reported working on a Radeon 7900X (@drizzt), and with #3332 as well on an RX 6800 XT, ~20 minutes stable (@Soyalexf). @Soyalexf's scripts for AMD: https://github.com/Soyalexf/witcher3-rt-amd-proton

Note

No build needed on Proton Experimental or Wineland. Proton Experimental has both fixes since its 2026-10-02 update (if yours is older: Steam → Library → Tools → Proton Experimental → Properties → Betas → bleeding-edge), and so does nanomatters' wineland-11.0-20260930. On another Proton, build vkd3d-proton master as below.

Step by step: vkd3d-proton master (about 10 minutes, for GE-Proton and other Protons)

Most of the time is the build. Close Steam first. The commands are bash: on fish or another shell, run bash first.

# 1. Build tools
sudo pacman -S --needed git meson ninja glslang mingw-w64-gcc wine          # Arch, CachyOS
# sudo apt install git meson ninja-build glslang-tools mingw-w64 mingw-w64-tools   # Debian, Ubuntu

# 2. vkd3d-proton master (it already has #3332, #3308 and the dxil-spirv fix for AMD)
cd ~
git clone --recursive https://github.com/HansKristian-Work/vkd3d-proton.git
cd vkd3d-proton

# 3. Build (64-bit is all this game needs)
meson setup build --cross-file build-win64.txt --buildtype release -Dstrip=true
ninja -C build

# 4. A copy of your Proton with the new DLLs.
#    P = your GE-Proton folder name in compatibilitytools.d (it may be GE-Proton11-7 or GE-Proton11-7-x86_64)
cd ~/.local/share/Steam/compatibilitytools.d
P=GE-Proton11-7
cp -a "$P" "$P-w3"
sed -i "s/\"$P\"/\"$P-w3\"/g" "$P-w3/compatibilitytool.vdf"
D="$P-w3/files/lib/wine/vkd3d-proton/x86_64-windows"
rm -f "$D/d3d12.dll" "$D/d3d12core.dll"
cp ~/vkd3d-proton/build/libs/d3d12/d3d12.dll ~/vkd3d-proton/build/libs/d3d12core/d3d12core.dll "$D/"
  1. Start Steam. In The Witcher 3 → Properties → Compatibility, pick the new ...-w3 entry.
  2. Run python3 w3_proton_patch.py --rt (NVIDIA) or --rt-only (AMD / Intel), then turn on ray tracing / path tracing in the game.

Troubleshooting

Symptom What to do
DLSS still greyed out after patching Run once with PROTON_LOG=1 and check that sl.common.dll and sl.dlss.dll get loaded. If only sl.interposer.dll shows up, the exe that actually runs is not the patched one. With a plain Wine runner instead of Proton, also check that dxvk-nvapi is set up.
Crash at startup right after hiding Wine The vkd3d-proton is older than #3308 (GE-Proton11-7's is). Use a newer one, or the script's --rt / --rt-only, which keep Wine's buffer alignment.
Crash in Steam.dll at startup The remaster needs SteamUtils011, which older proton-cachyos builds (20260703) lack. With an outdated Steam client, recreating a missing ~/.local/share/Steam/steam/games folder let Steam update itself (@Patola).
Low preset, RT locked, DLSS "not supported", very low FPS The game picked the iGPU: see Hybrid GPUs.
GOG through Heroic: witcher3.exe runs with no window The GOG update leaves empty folders under content/ and dlc/, and the game hangs on them. From the game folder, find content dlc -depth -type d -empty -delete fixed it (Heroic #5941, confirmed by @Ritaku02).
Stutter while signed in to a CDPR account While signed in, the game checks the connection about 10 times a second, and under Wine each check re-reads the stats of every network adapter; one slow NIC driver is enough (profiled by @ninele7 in Proton#607). Wineland 11.0-20261011 ships a fix for it. On other Protons, signing out of the CDPR account avoids it.
"Frozen" loading screen after dying Under Proton, "Load last save" from the death screen can take 3–4 minutes, while the same save loads in seconds from the main menu. Reported on Steam Deck and desktop Linux, not on Windows; one report says Proton 11-02 cut it to ~30 s (Steam thread). For now, quit to the main menu and load from there.
Random crash in menus with a live 3D scene (inventory, map, alchemy, character), witcher3.exe+0x3317E3 A race in the game itself, much more common under Wine. @p-valentin's fix patches it: for 5.00c, and for 5.01 (the same patch with the 5.01 addresses; @Snuffles20 crashed the unpatched 5.01 within minutes and not since). It needs the unmodified exe: on Wineland just run it; with the sed one-liner, apply it first and the sed after. It can't be combined with this gist's script.
AMD: crash with Mesa's anti-lag layer on Add DISABLE_LAYER_MESA_ANTI_LAG=1 to the launch options (@vharmash).

Extra: DLSS 5 Neural Rendering on top

Once DLSS works in the game, you can add DLSS 5 Neural Rendering (NR) on top of it with OptiScaler. My own setup is in a kit: W3-DLSS-NR-kit-8f603d70.zip, with the OptiScaler_DLSSNR build 8f603d70, the NR model and my OptiScaler.ini. Tested on an RTX 4090 with path tracing, Ray Reconstruction and DLSS-G: 50–60 fps at 3440x1440 with DLSS Quality.

  1. Extract it into bin/x64_dx12, next to witcher3.exe. If your NVIDIA driver isn't 615.71.09, replace _nvngx.dll with your own: cp /usr/lib/nvidia/wine/_nvngx.dll <game>/bin/x64_dx12/.
  2. Launch options: WINEDLLOVERRIDES="dxgi=n,b" %command%.
  3. In game, pick DLSS. F7 turns NR on and off, and Home opens the OptiScaler menu.
  • The kit's ini already has ApplyAfterRR=true. Without it, NR skips every frame while Ray Reconstruction is on.
  • In the tests published so far, NR costs around 30% of the frame rate with path tracing.
  • If the GPU hangs (Xid 109) only with NR on, reset any GPU overclock first. NR is much heavier than DLSS upscaling, and an overclock that was stable in other games hung here until it was reset (@tuxrinku).
  • If NR doesn't run, OptiScaler.log next to the exe says why: look for the lines starting with DLSS-NR.
  • Unofficial; single player only.

Notes

  • Tested here on Linux with an RTX 4090. Reported working with DLSS on RTX 3060, 4060 Laptop, 4070, 4090, 5070 Ti and 5090, and with RT on AMD (Radeon 7900X, RX 6800 XT, RX 7900 XTX, RX 9070). DLSS-G needs an RTX 40 or newer.
  • HairWorks works under Proton. It is built into the DX12 exe, and the NVHair*.dll / GFSDK_HairWorks files next to it are not used, so their absence from a PROTON_LOG means nothing. Every graphics preset, RT ones included, turns it back off, so set it after choosing a preset. Path-traced hair stays unavailable: it needs Linear Swept Spheres, which NVIDIA lists for RTX 50 only and dxvk-nvapi does not report.

Caution

Modifying the executable may be against the game's EULA. It does not touch any DRM, only the platform check, and it is fully reversible.

Under the hood

Why DLSS is missing under Proton

The 5.0 executable asks ntdll for wine_get_version. When it finds it (Wine/Proton), the game does three things:

  • Skips NVIDIA Streamline entirely. It never calls slInit, so DLSS Super Resolution, Ray Reconstruction, DLSS Frame Generation and Reflex are all reported as unsupported.
  • Sets a cached "Wine or Steam hardware" flag. That flag forces DLSS-G unsupported, zeroes the ray tracing capability (all RT and path tracing options greyed out), skips the path-tracing shaders, disables FSR frame generation, and changes buffer alignment.
  • Nothing else. It is not the NVAPI IDs or the D3DKMTQueryAdapterInfo type 31 queries seen in the logs.

Root-cause details: ValveSoftware/Proton#607. RT hang details: HansKristian-Work/vkd3d-proton#3226.

Patches (file offsets)
5.0.0.1041720 5.0.0.1044392 (5.00c) 5.0.0.1048522 (5.01) Original → new Effect
0x1B709CB 0x1B7169B 0x1B77ECB 75 42 → 90 90 Default and --rt: creates the Streamline manager under Wine (DLSS SR/RR, Reflex)
0x1B759A0 0x1B76620 0x1B7CE30 74 → EB Default and --rt: DLSS-G support comes from Streamline instead of the Wine flag
0x1EE2A53 0x1EDE8F3 0x1EE4C33 75 0B → 90 90 --rt, --rt-only: the Wine flag no longer set (RT, path tracing, FSR FG)
0x1EE09F7 0x1EDC897 0x1EE2BD7 75 → EB --rt, --rt-only: keep Wine's buffer alignment (needed only on vkd3d-proton older than #3308)
0x106E0D — — 20 00 00 00 → 00 01 00 00 Old --rt only, no longer applied: RT BLAS scratch default 32 → 256 MiB

@d1g1talpump found the 5.00c offsets first, in a fork of this gist that is no longer online. The offsets were checked independently here before being added. The 5.01 offsets were found here and checked in game on Proton Experimental (RTX 4090): DLSS SR/RR, DLSS-G, RT and path tracing all available.

Buffer alignment, and what was superseded

Both RT options also keep the buffer alignment behaviour Wine gets. That is only needed on vkd3d-proton older than #3308, such as the one in GE-Proton11-7: there, clearing the flag alone makes the game request tight-aligned 256-byte buffers, which get rejected, and the game crashes within seconds. On newer builds it is harmless.

Superseded: vkd3d-rtas-prebuild-x8.patch in this gist (×8 prebuild sizes) and the game-side scratch buffer 32 → 256 MiB. Both were stopgaps before the cause was known; #3332 alone is enough. The script published on 2026-09-29 still applied the scratch patch with --rt by mistake. It is harmless (it was the earlier stable setup, and costs ~224 MiB of VRAM); running --rt again with the current script takes it out, and --restore undoes it too.

diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 44685730..3b531c9d 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -7946,6 +7946,25 @@ static void STDMETHODCALLTYPE d3d12_device_GetRaytracingAccelerationStructurePre
info->UpdateScratchDataSizeInBytes = size_info.updateScratchSize;
}
+ /* LOCAL WORKAROUND (vkd3d-proton #3226): Witcher 3 RT hangs on NVIDIA 590+ unless the RTAS result and
+ * scratch sizes reported to the application are inflated. x8 by default;
+ * VKD3D_RTAS_SIZE_MULT=<n> overrides it at runtime (1 = stock behaviour). */
+ {
+ static uint32_t rtas_size_mult;
+ uint32_t mult = vkd3d_atomic_uint32_load_explicit(&rtas_size_mult, vkd3d_memory_order_relaxed);
+
+ if (!mult)
+ {
+ mult = max(1u, vkd3d_env_var_as_uint("VKD3D_RTAS_SIZE_MULT", 8));
+ vkd3d_atomic_uint32_store_explicit(&rtas_size_mult, mult, vkd3d_memory_order_relaxed);
+ INFO("RTAS prebuild sizes are multiplied by %u (local workaround).\n", mult);
+ }
+
+ info->ResultDataMaxSizeInBytes *= mult;
+ info->ScratchDataSizeInBytes *= mult;
+ info->UpdateScratchDataSizeInBytes *= mult;
+ }
+
TRACE("ResultDataMaxSizeInBytes: %"PRIu64".\n", info->ResultDataMaxSizeInBytes);
TRACE("ScratchDatSizeInBytes: %"PRIu64".\n", info->ScratchDataSizeInBytes);
TRACE("UpdateScratchDataSizeInBytes: %"PRIu64".\n", info->UpdateScratchDataSizeInBytes);
#!/usr/bin/env python3
"""Re-enable DLSS / DLSS-G (and optionally ray tracing) in The Witcher 3 5.0 under Proton/Wine.
The Witcher 3 5.0 ("Remastered", DX12) detects Wine through GetProcAddress(ntdll, "wine_get_version") and then
deliberately skips NVIDIA Streamline (so DLSS SR/RR, DLSS Frame Generation and Reflex are unavailable) and forces
ray tracing / path tracing off. This script flips those checks in bin/x64_dx12/witcher3.exe. It only accepts the
exact builds listed in BUILDS below (5.0.0.1041720, the 5.00c hotfix 5.0.0.1044392 and patch 5.01,
5.0.0.1048522), checked by sha256.
python3 w3_proton_patch.py [path/to/witcher3.exe] DLSS SR/RR, Reflex and DLSS-G
python3 w3_proton_patch.py --rt [path/to/witcher3.exe] also RT and path tracing (read the README first:
needs a vkd3d-proton with #3332, or the GPU hangs
within a minute on NVIDIA 590+)
python3 w3_proton_patch.py --rt-only [path/to/witcher3.exe] AMD / Intel: RT, path tracing and FSR frame generation,
without the NVIDIA-only DLSS patches (RADV also needs
dxil-spirv PR #311 in vkd3d-proton; see the README)
python3 w3_proton_patch.py --restore [path/to/witcher3.exe] undo every patch (Steam "Verify integrity" also does)
add --dry-run to only report the current state.
The DLSS patches are NVIDIA only. Unofficial; use at your own risk. Close the game before running it.
"""
import argparse
import hashlib
import os
import shutil
import sys
DEFAULT_PATH = os.path.expanduser(
"~/.local/share/Steam/steamapps/common/The Witcher 3/bin/x64_dx12/witcher3.exe")
# (file offset, original bytes, patched bytes, description). Per build: the same four checks, found in 1044392 by
# matching the code around each 1041720 site with RIP-relative displacements wildcarded (each matches exactly once,
# and the instructions around it are unchanged). In 1048522 (5.01) WF and AL matched the same way; SL and DG did
# not, because a register and a stack frame changed around them, and were found through the wine_get_version
# string references and the reads of the cached Wine flag, which map one to one between the builds.
SL = "create the Streamline manager (slInit) under Wine: DLSS SR/RR, Reflex"
DG = "do not force DLSS-G 'unsupported' on the Wine flag"
WF = "clear the cached Wine flag: RT, path tracing, FSR FG"
AL = "keep buffer alignment as under Wine (only needed on vkd3d-proton older than #3308)"
BUILDS = {
90832336: {
"version": "5.0.0.1041720", "steam_build": "25575366",
"sha256": "c272b2c2e61f84c758e28fab69ab2915944dd1e539dbb435fae9fc67494c7e25",
"base": [(0x1B709CB, b"\x75\x42", b"\x90\x90", SL), (0x1B759A0, b"\x74", b"\xEB", DG)],
"rt": [(0x1EE2A53, b"\x75\x0B", b"\x90\x90", WF), (0x1EE09F7, b"\x75", b"\xEB", AL)],
# Applied by earlier versions of --rt. Not needed with vkd3d-proton #3332 and no longer applied, but still
# recognised so that --restore undoes it.
"legacy": [(0x106E0D, b"\x20\x00\x00\x00", b"\x00\x01\x00\x00",
"(old --rt, no longer applied) RT BLAS scratch 32 -> 256 MiB")],
},
90674640: {
"version": "5.0.0.1044392", "steam_build": "25646871",
"sha256": "9406eccc12b68e08920931442ef6a57340e910d3e01f2082e88232487433fe51",
"base": [(0x1B7169B, b"\x75\x42", b"\x90\x90", SL), (0x1B76620, b"\x74", b"\xEB", DG)],
"rt": [(0x1EDE8F3, b"\x75\x0B", b"\x90\x90", WF), (0x1EDC897, b"\x75", b"\xEB", AL)],
"legacy": [],
},
90715600: {
"version": "5.0.0.1048522", "steam_build": "25773555",
"sha256": "2df765398a3d1f165db418271be7200178320a4466817379f2fa0dc0001fb101",
"base": [(0x1B77ECB, b"\x75\x42", b"\x90\x90", SL), (0x1B7CE30, b"\x74", b"\xEB", DG)],
"rt": [(0x1EE4C33, b"\x75\x0B", b"\x90\x90", WF), (0x1EE2BD7, b"\x75", b"\xEB", AL)],
"legacy": [],
},
}
def has_nvidia_gpu():
try:
return any(open(os.path.join("/sys/class/drm", d, "device/vendor")).read().strip() == "0x10de"
for d in os.listdir("/sys/class/drm") if d.startswith("card") and "-" not in d)
except OSError:
return True # cannot tell; do not warn
def state_of(data, patch):
off, orig, new, _ = patch
cur = data[off:off + len(orig)]
return "original" if cur == orig else "patched" if cur == new else "unknown"
def main():
ap = argparse.ArgumentParser(
description="Re-enable DLSS / DLSS-G (and optionally RT) in The Witcher 3 5.0 under Proton/Wine.")
ap.add_argument("exe", nargs="?", default=DEFAULT_PATH)
mode = ap.add_mutually_exclusive_group()
mode.add_argument("--rt", action="store_true", help="also enable ray tracing and path tracing")
mode.add_argument("--rt-only", action="store_true",
help="AMD / Intel: RT, path tracing and FSR frame generation without the DLSS patches")
mode.add_argument("--restore", action="store_true", help="revert every patch")
ap.add_argument("--dry-run", action="store_true", help="report only, change nothing")
args = ap.parse_args()
path = args.exe
if not os.path.isfile(path):
sys.exit(f"not found: {path}")
data = bytearray(open(path, "rb").read())
build = BUILDS.get(len(data))
if build is None:
sys.exit(f"unexpected size {len(data)}: this script supports witcher3.exe (DX12) "
+ ", ".join(b["version"] for b in BUILDS.values()) + "; a newer game update needs a script update")
BASE, RT, LEGACY = build["base"], build["rt"], build["legacy"]
ALL = BASE + RT + LEGACY
version = build["version"]
states = [state_of(data, p) for p in ALL]
if "unknown" in states:
sys.exit("unexpected bytes at a patch site: different build or modified exe; nothing changed")
# Rebuild the original image in memory and check it is exactly the supported build.
orig = bytearray(data)
for off, o, _, _ in ALL:
orig[off:off + len(o)] = o
if hashlib.sha256(orig).hexdigest() != build["sha256"]:
sys.exit(f"sha256 mismatch: not witcher3.exe {version} (DX12); nothing changed")
print(f"witcher3.exe {version} (Steam build {build['steam_build']})")
print("current state:")
for p, s in zip(ALL, states):
print(f" 0x{p[0]:07X} {s:8} {p[3]}")
if not args.restore and not args.rt_only and not has_nvidia_gpu():
print("WARNING: no NVIDIA GPU found. The DLSS patches are for NVIDIA; on AMD or Intel use --rt-only "
"(RT and FSR frame generation). See README.")
if args.restore:
target = bytes(orig)
elif args.rt or args.rt_only:
# Exactly the chosen set, from the original: --rt-only takes out DLSS patches from an earlier run, and both
# take out the old scratch patch an earlier --rt applied.
target = bytearray(orig)
for off, _, new, _ in (RT if args.rt_only else BASE + RT):
target[off:off + len(new)] = new
target = bytes(target)
else:
target = bytearray(data)
for off, _, new, _ in BASE:
target[off:off + len(new)] = new
target = bytes(target)
if target == bytes(data):
print("nothing to do")
return
if args.dry_run:
print("dry run: would write changes")
return
backup = path + ".orig-" + version
if not os.path.exists(backup):
with open(backup, "wb") as f:
f.write(bytes(orig))
print(f"backup of the original: {backup}")
tmp = path + ".tmp-patch"
with open(tmp, "wb") as f:
f.write(target)
shutil.copymode(path, tmp)
os.replace(tmp, path)
if args.restore:
print("restored the original")
elif args.rt_only:
print("patched: RT/path tracing and FSR frame generation only (no DLSS patches)")
else:
print("patched: DLSS/DLSS-G" + (" + RT/path tracing" if args.rt else ""))
if args.rt or args.rt_only:
print("WARNING: RT under Proton needs a recent vkd3d-proton: with #3332 on NVIDIA 590+ (or the GPU hangs), "
"and on AMD (RADV) also with dxil-spirv PR #311 (or the game crashes while loading). See README.")
if __name__ == "__main__":
main()
@xsetiadi

xsetiadi commented Oct 1, 2026

Copy link
Copy Markdown

ok, revert back to original exe files. and using proton wineland. raytracing and fsr framegen is back now. thanks for the info.

@DISOhda

DISOhda commented Oct 2, 2026

Copy link
Copy Markdown

Just in case: would the script still work with 5.00c? I'm only interested in DLSS with Linux, my 4070 Laptop is too weak for RT/PT anyway.

@ArrayPirate

ArrayPirate commented Oct 2, 2026 •

Copy link
Copy Markdown

Works like a charm! Thank you so much @gabrielmaialva33 for your work!

Archlinux x86_64 7.2.7
RTX 4080S
Ryzen 7 5800X

@pixrgy

pixrgy commented Oct 2, 2026

Copy link
Copy Markdown

I can't get any of these solutions working. Im on RX7600 with MESA build 26.2.0devel, via SteamOS. the game refuses to start regardless

@dzhurai

dzhurai commented Oct 2, 2026

Copy link
Copy Markdown

it works, thank you!
Linux Zorin OS
RTX4060 Laptop
i713th Intel

@gabrielmaialva33

Copy link
Copy Markdown
Author

@DISOhda yes, the script supports 5.00c (5.0.0.1044392), and the default run (no flags) is the DLSS-only one. If you launch through Steam, Proton Wineland is even easier since you don't patch anything. Being on a laptop, check the "Hybrid GPUs (laptops)" part of the README too.

@Damunfoxwood a few things worth checking:

  • Is Properties → Compatibility really on proton-wineland-11.0-20260930? Older Wineland builds don't have the Witcher fix.
  • Which tarball did you get? The _v3 one needs a CPU with AVX2. On an older CPU, grab the plain x86_64 one.
  • Is there anything extra in bin/x64_dx12 (OptiScaler, ReShade, a dxgi.dll/winmm.dll)? Try without it.
  • You don't need protontricks/winecfg for this, the per-game fix sets it when Steam launches the game.

If it still crashes, a log would help: launch options PROTON_LOG=1 %command%, it ends up as ~/steam-292030.log. Plus your GPU and driver.

@pixrgy first check whether the plain game starts: Steam "Verify integrity of game files" to get the original exe back, then Proton Experimental (bleeding-edge branch) with no patch at all. If that doesn't start either, it's not the Wine check: make sure the Steam client itself is up to date (the remaster needs a recent one, see Patola's note in Proton #607), and a PROTON_LOG=1 %command% log would show what's going on. If it does start, try Wineland with that same original exe. On Mesa, @vharmash also saw the anti-lag layer crash this game, so DISABLE_LAYER_MESA_ANTI_LAG=1 %command% is worth a try if you have it on.

@v1ld @xsetiadi @ArrayPirate @dzhurai thanks for reporting back, it helps to know it works on other cards too.

@Twi-Hard

Twi-Hard commented Oct 2, 2026 •

Copy link
Copy Markdown

People with a very similar setup to me (4090, 1440p ultrawide) are able to get good enough performance with ultra settings with path tracing on windows but it's not playable on Linux at the moment. Is this something that can be fixed or might be fixed eventually? I'm using the wineland fix on cachyos

Edit: ray tracing maxed out with path tracing disabled works fine but path tracing looks a lot better. I'm using frame gen by the way

@gabrielmaialva33

Copy link
Copy Markdown
Author

@Twi-Hard similar setup here: 4090, 3440x1440, i9-13900K, 32 GB RAM, driver 615.71.09, Arch, Wineland. With path tracing, DLSS Quality + Ray Reconstruction and DLSS-G 2x I get roughly 50-60 fps on screen (25-31 rendered), and that's with DLSS 5 Neural Rendering running on top through my OptiScaler fork, which costs some GPU time as well. So it's playable here, though the base framerate is on the low side for frame gen.

What numbers do you get, and on which DLSS mode? With path tracing, going from Quality to Balanced or Performance is the biggest lever. I don't have Windows numbers for this machine, so I can't say how big the Linux gap is. If you do have a Windows comparison with numbers, that would be worth reporting to vkd3d-proton.

@Twi-Hard

Twi-Hard commented Oct 2, 2026

Copy link
Copy Markdown

@gabrielmaialva33
OK, I discovered the issue and it runs a lot better now. I was using these variables and removing them fixed it:
PROTON_ENABLE_NVAPI=1 PROTON_ENABLE_WAYLAND=1 VKD3D_CONFIG=dxr11 PROTON_USE_NTSYNC=1

Performance is kinda bad with DLSS set to Quality so I have it at Performance.

I installed your OptiScaler fork but I don't see how to enable the neural rendering stuff at all. None of the options seems to be related to it.

my settings in game:
ray tracing on
path tracing on
dlss performance
ray reconstruction on
frame generation on
hairworks off
sharpening off
all of the settings below that are on or ultra+

With frame generation on and DLSS set to quality, I get 70 FPS in the first room in the game but it feels worse than 30 FPS. With DLSS set to performance it says the FPS is ~100 and is good enough to play I think

Something is still making it perform worse for me than you. the only thing I have open in the background is a browser, terminal and steam. Is there something I'm missing that can make this better?

My CPU is i9-14900K by the way

@gabrielmaialva33

Copy link
Copy Markdown
Author

@Twi-Hard nice, glad it runs better now! Your numbers aren't actually worse than mine: I get 50-60 fps at Quality with NR running on top, and you get ~70 at Quality without it. The "feels worse than 30" part is frame gen working from a low base framerate. At Quality you're rendering around 35 fps, and frame gen adds latency on top of that, so Performance (or Balanced) is the right call with path tracing. Keep Reflex on.

NR is off by default, and with Ray Reconstruction on it needs one more key. What I have in bin/x64_dx12:

  • OptiScaler.dll renamed to dxgi.dll, with nvngx.dll_dlssnr.dll from the same package next to it
  • nvngx_dlssnr.dll, the NR model itself (310.8.x). The fork doesn't ship it and it isn't in the Linux driver, so you have to supply it
  • a copy of /usr/lib/nvidia/wine/_nvngx.dll
  • launch options: WINEDLLOVERRIDES="dxgi=n,b" %command%
  • in OptiScaler.ini:
    • [DlssNr]: Enabled=true, ApplyAfterRR=true (without it NR skips every frame while Ray Reconstruction is on), and ToggleKey=0x76 if you want F7 to switch it on and off
    • [Vulkan]: SkipHooks=true

The OptiScaler menu opens with Insert. If NR still doesn't show up, the OptiScaler.log next to the exe says why: look for the lines starting with DLSS-NR.

@gabrielmaialva33

Copy link
Copy Markdown
Author

@Twi-Hard I packed my exact setup into a zip: OptiScaler_DLSSNR 8f603d70 as dxgi.dll, the forwarder, the NR files and my OptiScaler.ini (NR on, ApplyAfterRR, F7 to toggle), plus a README with the steps: https://github.com/gabrielmaialva33/OptiScaler_DLSSNR/releases/download/w3-nr-kit-20261002/W3-DLSS-NR-kit-8f603d70.zip

Copy what's inside the folder into bin/x64_dx12. Also, my ini opens the OptiScaler menu with Home, not Insert like I said before.

@Pepin208

Pepin208 commented Oct 3, 2026

Copy link
Copy Markdown

The Witcher 3: Wild Hunt — Remastered (v5.0) on Linux

Verified fix for Ray Tracing, Path Tracing and FSR Frame Generation under Proton, on AMD.

Tested on 2026-10-03 with:

Component Version
Game The Witcher 3: Wild Hunt — Remastered, 5.0.0.1041720 (2026-09-29 release, Steam build 25575366)
Executable bin/x64_dx12/witcher3.exe, size 90,832,336 bytes
Executable sha256 (original) c272b2c2e61f84c758e28fab69ab2915944dd1e539dbb435fae9fc67494c7e25
Launcher Faugus Launcher 2.4.2 (umu-launcher 1.4.4)
Runner proton-wineland-11.0-20260930-x86_64 (nanomatters' proton-cachyos)
GPU AMD RDNA2 (amdgpu, PCI id 1002:73df)
Kernel 7.2.2-1-cachyos-bore-lto
Session Wayland / KDE Plasma 6

The same method applies to Steam, Heroic and Lutris; only the way you pass environment
variables and the runner changes. The exe patch itself is launcher-agnostic.


TL;DR

  1. Use a Proton runner with the vkd3d-proton fixes for this game. Here:
    proton-wineland-11.0-20260930 (it carries vkd3d-proton #3332, the buffer-alignment
    fix #3308, and the RADV dxil-spirv fix #311).
  2. Run the exe patch with --rt-only (AMD / Intel) on the original, unmodified
    witcher3.exe.
  3. Add these environment variables to the launch:
    PROTON_DISABLE_NVAPI=1 ENABLE_LAYER_MESA_ANTI_LAG=0
  4. Launch. Ray tracing, path tracing and FSR Frame Generation are now selectable.

If you are on NVIDIA, this is not the guide you want — you would use --rt
instead (it also patches Streamline/DLSS), and you need a vkd3d-proton with #3332 or RT
hangs the GPU within a minute on driver 590+. See the upstream gist in Credits.


Background: why the options are greyed out

The 5.0 executable probes ntdll for the export wine_get_version. When it finds it
(the game is running under Wine/Proton), it does two separate things:

  1. Skips NVIDIA Streamline entirely — it never calls slInit, so DLSS Super
    Resolution, Ray Reconstruction, DLSS Frame Generation and Reflex all report as
    unsupported. This is the part the --rt mode fixes; it is irrelevant on AMD.
  2. Sets a cached "Wine or Steam hardware" flag. That flag forces DLSS-G unsupported,
    zeroes the ray tracing capability (all RT / path tracing options greyed out),
    skips the path-tracing shaders, disables FSR Frame Generation, and changes buffer
    alignment.

The second point is what we are fixing with --rt-only.

Symptom A — instant hang in a tight retry loop

If you "fix" the Wine detection by renaming the string the game looks up
(sed -i s/wine_get_version/frog_get_version/ witcher3.exe), the game now believes it is
on Windows and hard-requires Streamline. It then probes NVAPI in the menu. On a
non-NVIDIA GPU, dxvk-nvapi init fails and the game retries in a tight loop forever,
loading and unloading d3d11.dll + nvapi64.dll hundreds of times, until it hangs.
This is exactly what our first log showed:

nvapi_QueryInterface (0xad298d3f): Unknown function ID
DXVK-NVAPI wineland-11.0-20260930+ ... (witcher3.exe)
<-NvAPI_Initialize: NVIDIA or other suitable device not found or initialization failed
Unloaded module C:\windows\system32\vkd3d... d3d11.dll / nvapi64.dll   (repeated ~500x)
[streamline] error                  (repeated 2736x)
211293.906:0124:0128:trace:seh:raise (22)

Do not use the frog_get_version rename on AMD. If you already did,
PROTON_DISABLE_NVAPI=1 is what stops the loop (it removes nvapi64.dll entirely, and
Streamline's no-NVIDIA fallback becomes clean), but the exe patch below is the better
route because it survives game updates and does not force the Streamline path.

Symptom B — game launches, but RT and FSR Frame Gen stay greyed out

This is the state after restoring the original exe with only the environment variables
applied. The log shows Streamline half-initialised:

Loaded sl.interposer.dll ... native
[streamline][error] sl.cpp:168[slValidateState]
    SL not initialized or no plugins found -
    please make sure to include all required plugins including sl.common

sl.interposer.dll loads but its plugins (sl.common.dll, sl.dlss.dll, sl.reflex.dll)
do not, because the game took the "Wine" branch and never called slInit. This is
expected and harmless for AMD — RT and FSR go through FidelityFX
(amd_fidelityfx_*.dll), not Streamline. --rt-only clears the Wine flag that gates RT
and FSR FG; it deliberately leaves the Streamline/DLSS patches alone.


Step 1 — get the runner right

The runner must contain a recent vkd3d-proton:

  • #3332 — the BLAS scratch-size fix. Without it, RT hangs (Xid 109 /
    VK_ERROR_DEVICE_LOST) on NVIDIA 590+ within about a minute.
  • #3308 — tight buffer alignment. Without it, clearing the Wine flag alone makes the
    game request tight-aligned 256-byte buffers that get rejected, and it crashes within
    seconds. This is why GE-Proton11-7 and Proton 11.0-2 do not work for RT here.
  • dxil-spirv PR #311 — required on AMD/RADV. Without it, RADV crashes in
    vkCreateRayTracingPipelinesKHR while path-tracing shaders load, because one of the
    game's shaders translates to invalid SPIR-V.

proton-wineland-11.0-20260930 has all three. It also hides Wine from this game's exe via
a per-game fix, but that fix only triggers when Steam launches the game — Faugus,
Heroic and Lutris need a manual step for now (proton-cachyos issues #75, #76, #77), which
is why we patch the exe instead.

Extract the runner into your compatibility-tools directory and symlink it, e.g.:

# Steam location
tar -xf proton-wineland-11.0-20260930-x86_64.tar.xz -C ~/.local/share/Steam/compatibilitytools.d/
# Faugus-style runners (this setup):
# extract into <Runners>/proton-wineland-11.0-20260930-x86_64/ and symlink the name

Pick the _v3 tarball only if your CPU has AVX2; otherwise use the plain x86_64 one.

Step 2 — patch the exe with --rt-only

Do this on the original, unmodified witcher3.exe. If you previously ran the
frog_get_version rename, restore first (Steam: "Verify integrity of game files"; or keep
a copy of the original around).

python3 w3_proton_patch.py --rt-only "/path/to/The Witcher 3/bin/x64_dx12/witcher3.exe"

Expected output for build 5.0.0.1041720:

witcher3.exe 5.0.0.1041720 (Steam build 25575366)
current state:
 0x1B709CB original create the Streamline manager (slInit) under Wine: DLSS SR/RR, Reflex
 0x1B759A0 original do not force DLSS-G 'unsupported' on the Wine flag
 0x1EE2A53 original clear the cached Wine flag: RT, path tracing, FSR FG
 0x1EE09F7 original keep buffer alignment as under Wine (only needed on vkd3d-proton older than #3308)
 0x0106E0D original (old --rt, no longer applied) RT BLAS scratch 32 -> 256 MiB
backup of the original: .../witcher3.exe.orig-5.0.0.1041720
patched: RT/path tracing and FSR frame generation only (no DLSS patches)

What --rt-only writes (and what it leaves alone):

Offset Original → new Effect
0x1EE2A53 75 0B → 90 90 applied — clears the cached Wine flag: RT, path tracing, FSR FG
0x1EE09F7 75 → EB applied — keeps Wine's buffer alignment (needed only on vkd3d-proton older than #3308; harmless on new ones)
0x1B709CB 75 42 → 90 90 left original — Streamline manager / DLSS (NVIDIA only)
0x1B759A0 74 → EB left original — DLSS-G (NVIDIA only)
0x106E0D 20 00 00 00 → 00 01 00 00 left original — legacy RT BLAS scratch patch, no longer applied

The script verifies the build by file size and sha256 before writing, and refuses any
unrecognized build. It saves a one-time backup as witcher3.exe.orig-<version>.

Verify at any time without changing anything:

python3 w3_proton_patch.py --rt-only --dry-run "/path/to/witcher3.exe"

Revert everything:

python3 w3_proton_patch.py --restore "/path/to/witcher3.exe"
# or: Steam -> right-click game -> Properties -> Installed Files -> Verify integrity

Step 3 — launch environment variables

Add these to the game's launch arguments / environment:

PROTON_DISABLE_NVAPI=1 ENABLE_LAYER_MESA_ANTI_LAG=0
  • PROTON_DISABLE_NVAPI=1 — removes nvapi64.dll completely. Without it, a game that
    reached the Streamline path retries NVAPI forever on a non-NVIDIA GPU (Symptom A).
  • ENABLE_LAYER_MESA_ANTI_LAG=0 — Mesa's anti-lag Vulkan layer crashes this game under
    Wine once AMDAntiLag engages (0xc0000005 inside libVkLayer_MESA_anti_lag.so). Disable
    it.

Faugus Launcher

Put the variables in the game's launch arguments field (Faugus turns any KEY=VALUE
token into a real environment variable). Then make sure the game's Runner is
proton-wineland-11.0-20260930 — not GE-Proton.

Steam

Launch options:

PROTON_DISABLE_NVAPI=1 ENABLE_LAYER_MESA_ANTI_LAG=0 %command%

and set Properties → Compatibility to the Wineland build. On Steam, Wineland's per-game
HideWineExports fix may make the exe patch unnecessary; the --rt-only patch does not
conflict with it if you use both.

Step 4 — in-game

Options → Graphics. Ray tracing and FSR Frame Generation should no longer be greyed out.
Start conservatively: enable ray tracing first, without path tracing, on a low preset,
to confirm the RADV path-tracing shader fix is actually present. Turn on path tracing only
after RT is stable.

HairWorks works under Proton (it is built into the DX12 exe; the NVHair*.dll /
GFSDK_HairWorks files are not used — their absence from a log means nothing). Every
graphics preset, RT ones included, turns HairWorks back off, so set it after choosing a
preset. Path-traced hair is unavailable: it needs Linear Swept Spheres, which dxvk-nvapi
does not report.


Why each earlier attempt failed (short version)

Attempt Result Why
Default Faugus runner (GE-Proton10-34 selected, combo actually on Wineland) launched, menu hung Wineland loads, but the unpatched exe sets the Wine flag → RT/FSR grey. With the frog rename instead, Neon→ NVAPI retry loop (Symptom A)
sed s/wine_get_version/frog_get_version/ (rename) tight NVAPI retry loop, raise (22) game believes Windows, hard-requires Streamline, probes NVAPI, dxvk-nvapi fails on AMD and retries forever
Restore original exe + PROTON_DISABLE_NVAPI=1 ENABLE_LAYER_MESA_ANTI_LAG=0 launches and is stable correct stopgap, but the Wine flag keeps RT / FSR FG greyed out (Symptom B)
Original exe + --rt-only + the two env vars RT / path tracing / FSR FG selectable clears the Wine flag; vkd3d-proton in Wineland has the AMD RADV and BLAS fixes

Gotchas

  • The exe patch is tied to the build. A game update replaces witcher3.exe and the
    offsets change. The script will refuse the new build ("unexpected size …") until it is
    updated. --restore, or Steam's "Verify integrity", gets you back to stock.
  • Do not combine frog_get_version with --rt-only. Pick one. The rename forces the
    Streamline/NVAPI path; --rt-only deliberately avoids it. If you renamed, --restore
    first.
  • GE-Proton11-7 and Proton 11.0-2 are not enough for RT here: their vkd3d-proton lacks
    #3308 and the RADV dxil-spirv fix. Use Wineland 11.0-20260930 or newer, Proton
    Experimental bleeding-edge (its 2026-10-01 build ships vkd3d-proton 44cf7c20), or
    a self-built vkd3d-proton master.
  • Older proton-cachyos builds (e.g. 20260703) crash in bin/ddi/Steam.dll at startup
    because the remaster needs SteamUtils011. Use a current build.
  • Hybrid / laptop GPUs: if the game picks the iGPU, you get Low preset, RT locked,
    "reverting" settings and very low FPS. Point Vulkan at the dGPU only:
    VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.json (AMD) or
    .../nvidia_icd.json (NVIDIA).
  • Streamline errors in the log are expected on AMD with --rt-only
    (SL not initialized or no plugins found). They do not affect RT or FSR.

Reproduction checklist

  • Game build is 5.0.0.1041720 (size 90,832,336, sha256 c272b2c2…c7e25) or the
    5.00c hotfix 5.0.0.1044392 (size 90,674,640).
  • witcher3.exe is the original (no frog_get_version rename).
  • Runner is proton-wineland-11.0-20260930 or newer (vkd3d-proton with #3332, #3308,
    and RADV dxil-spirv #311).
  • python3 w3_proton_patch.py --rt-only ... applied; 0x1EE2A53 and 0x1EE09F7 read
    patched in --dry-run.
  • Launch env: PROTON_DISABLE_NVAPI=1 ENABLE_LAYER_MESA_ANTI_LAG=0.
  • Options → Graphics: RT and FSR Frame Generation are selectable.

Credits

  • w3_proton_patch.py and the root-cause analysis — gabrielmaialva33, gist
    "The Witcher 3 5.0 on Proton/Linux: re-enable DLSS, DLSS-G and ray tracing":
    https://gist.github.com/gabrielmaialva33/33ebb2542f0513d55100b22aa2149ff5
    (the 5.00c offsets were first found by @d1g1talpump).
  • Proton Wineland / proton-cachyos — nanomatters:
    https://github.com/nanomatters/proton-cachyos/releases
  • vkd3d-proton — HansKristian-Work: #3332 (BLAS scratch), #3308 (alignment), and
    dxil-spirv #311 (RADV path tracing).
  • PROTON_DISABLE_NVAPI=1 + anti-lag findings on AMD — @vharmash, in the gist comments.
  • Upstream tracking — ValveSoftware/Proton #607; vkd3d-proton #3226; proton-cachyos
    #75 / #76 / #77 (manual HideWineExports for non-Steam launchers).

Unofficial workaround until CD PROJEKT RED or Valve fix this properly.

@gabrielmaialva33

Copy link
Copy Markdown
Author

@Pepin208 thanks for writing this up, nice guide! Two small corrections:

  • It's the other way round on updates: the sed rename survives game updates (it only renames a string), while the script's offsets are tied to the exe build, as your Gotchas section says. On AMD the rename works too with PROTON_DISABLE_NVAPI=1; your --rt-only route just keeps the game off the Streamline/NVAPI path.
  • Mesa's anti-lag layer only turns on when ENABLE_LAYER_MESA_ANTI_LAG=1 is set, so =0 only helps if something set it to 1. DISABLE_LAYER_MESA_ANTI_LAG=1 turns it off in every case.

And on Steam with Wineland, AMD users shouldn't need either: going by its release notes, Wineland hides Wine from the game and already turns NVAPI off on non-NVIDIA GPUs for this game.

@DCHoaxer

DCHoaxer commented Oct 4, 2026 •

Copy link
Copy Markdown

worked fine yesterday, today it stopped - game decided to run on iGPU for some reason.

Its insane what these devs have in their heads. Why blocking DLSS for wine users?

@gabrielmaialva33

Copy link
Copy Markdown
Author

@DCHoaxer the game hasn't been updated since Oct 1, so if it worked yesterday I'd check the system first: run nvidia-smi and vulkaninfo --summary. If the NVIDIA card isn't there, a kernel or driver update probably left the module unloaded, and the game just gets the only GPU left.

If the card is there, you can hide the iGPU from the game. Add this in front of what you already have in the launch options:
DXVK_FILTER_DEVICE_NAME="NVIDIA" VKD3D_FILTER_DEVICE_NAME="NVIDIA" %command%
On a laptop, prime-run %command% does the same job.

@San10deep

San10deep commented Oct 4, 2026 •

Copy link
Copy Markdown

@gabrielmaialva33 just found a nuclear solution for this disable the iGPU in bios i'm checking now ill update more even RDR2 Does the same thing tried everything nuclear option finally worked

DLSS is still shown as not supported but game play FPS has improved 75 - 80 FPS consistently

@gabrielmaialva33

Copy link
Copy Markdown
Author

@San10deep nice find, thanks for reporting back! On laptops that can do it, turning off the iGPU (or dGPU-only/MUX mode) in the BIOS is the cleanest fix for this, since the game can't pick the wrong GPU anymore.

DLSS showing as not supported is a separate thing: the game's Wine check, which is what this gist is about. Which Proton are you on? The easiest route is Proton Wineland 11.0-20260930 or newer with the original exe (the "Recommended" section at the top). On Proton Experimental, the sed one-liner does it. Frame generation will stay off on a 3050, since DLSS-G needs an RTX 40, but DLSS SR should show up. If it's still greyed out after that, run once with PROTON_LOG=1 %command% and post the steam-292030.log.

@San10deep

San10deep commented Oct 5, 2026 •

Copy link
Copy Markdown

@gabrielmaialva33 Proton Wineland 11.0 (20261005) (lastest) did the trick DLSS is back on RT also shown im dont think it would work so keeping it off for now should i also enable and test it ??

I have also added the settings config for anyone requiring help some settings are set to low to make the white ghosting halo around characters

[Rendering/RT/HBIL]
UseHBIL=false
HBILImpact=1
[Gameplay/EntityPool]
SpawnedLimit=130
[Hidden]
HasSetup=true
uiVerticalFrameScale=1
uiHorizontalFrameScale=1
[RTXGI/GlobalGrid]
ProbeMaxRayDist=128
[Localization]
RequestedSpeechLanguage=
SpeechLanguage=EN
RequestedTextLanguage=
TextLanguage=EN
[Viewport]
VSync=false
Resolution="1920x1080"
ReflexMode=2
FullScreenMode=2
AMDAntiLag=0
OutputMonitor=0
[Budget]
TerrainTileMipDataBudget=100
TerrainTileMinTimeout=2
TerrainTileTimeout=10
OcclusionQueryAdditionalMemory=5
TerrainTileLoadingTimeout=5
[ContentManager/Mods]
EnabledLocal=true
EnabledWorkshop=true
MaxNameLength=64
Enabled=true
[Audio]
DynamicRange=1
EnhancedHeadphoneMode=false
Subtitles=true
[LoadingScreen/TCR]
ShowProgress=true
[Game]
DoNotPauseWhileStopped=false
[Scripts]
DebugScriptsForceFlush=true
DebugScriptsLogDir=
[Rendering/RT/PathTracer]
PTHairQualityMode=0
PTLateSpecularScreenSpaceTrace=true
PTEnable=false
PTLateSpecularCheckerboard=true
[PostProcess]
WaterFogPerPixel=true
XeLowLatency=false
DLSSGNumFramesToGenerate=1
SharpenAmount=1
MotionBlurPositionTreshold=0.05
DLSSQuality=1
LockhartPerformanceMode=false
RCASAmount=0.2
FSRSharpnessLow=0.3
AAMode=6
DLSSGMode=0
MotionBlurRotationTreshold=1
FogUseDistInColorLerp=1
AllowMotionBlur=false
XESSQuality=4
FSR1Quality=0
AllowLensEffects=true
NISSharpness=0.2
XessFrameGeneration=false
EnableDLSSRR=false
SSAOEnabled=3
FSRFramegen=0
MotionBlurIntensity=10
AllowBlur=false
FSR2Quality=3
FSRSharpnessHigh=1
XeLowLatencyFrameRateControl=0
[Input]
PadVibrationEnabled=true
KeyboardCooldownSpeed=0.1
InvertCameraXOnMouse=false
InvertCameraYOnMouse=false
CameraAutoRotX=true
FreeCameraSpeed=1
PadVibrationAmount=10
InvertCameraX=false
UIMouseSensitivity=1
CameraAutoRotY=true
RightStickCameraSensitivity=1
InvertCameraY=false
RightStickAimSensitivity=1
MouseSensitivity=1
ForceDisableTouch=false
SteamController=0
ForceDisablePad=false
FreeCameraSensitivity=1
AdaptiveTriggersEnabled=true
AdaptiveTriggersAmount=10
[DLC]
DlcEnabled_dlc_010_001=1
DlcEnabled_dlc_015_001=1
DlcEnabled_dlc_005_001=1
DlcEnabled_dlc_007_001=1
DlcEnabled_dlc_013_001=1
DlcEnabled_dlc_004_001=0
DlcEnabled_dlc_017_001=0
DlcEnabled_dlc_006_001=0
DlcEnabled_dlc_001_001=1
DlcEnabled_dlc_008_001=1
DlcEnabled_dlc_011_001=1
DlcEnabled_dlc_020_001=0
DlcEnabled_dlc_002_001=1
DlcEnabled_ep1=1
DlcEnabled_dlc_014_001=1
DlcEnabled_dlc_009_001=1
DlcEnabled_dlc_018_001=1
DlcEnabled_bob_000_000=1
DlcEnabled_abob_001_001=1
DlcEnabled_dlc_012_001=1
DlcEnabled_dlc_003_001=1
DlcEnabled_dlc_016_001=1
DlcEnabled_dlc_011_002=0
[WatermarkOverlay/TCR]
FadeOutCooldownExtraTime=1
FadeInSpinnerTime=1
NoninteractiveSpinnerTime=3
FadeOutSpinnerTime=1
NoninteractiveEndCooldown=1
[Rendering/RT/RoughnessRemap]
RemapDerivative0=0
RemapDerivative3=1
RemapDerivative2=1
RemapDerivative1=2
[Rendering/DRS]
Enable=false
[Gameplay]
AutoApplyBladeOils=false
ModioEnabled=true
LootMergeEnabled=true
DisableAutomaticSwordSheathe=false
Difficulty=4
CrossProgression=true
MarketingConsent=false
TelemetryConsent=true
AutosaveTimeInterval=15
EnableAlternateSignCasting=1
EnableUberMovement=1
EnemyUpscaling=true
[LevelOfDetail]
SwarmHideDistance=200
DecalsHideDistance=40
DimmerHideDistance=60
DynamicDecalsHideDistance=20
StripeHideDistance=60
[General]
ConfigVersion=7
[LoadingScreen/Editor]
Disabled=false
[Rendering/RT]
EnableAOSSSampling=true
RtRadianceScreenSpaceTrace=true
EnableRT=false
BalanceModeRT=false
RTGIPreset=false
Shadows=0
LocalShadowsAllLightsCastShadows=false
EnableRtRadiance=false
RTAOEnabled=false
EnableAOPretrace=true
[Scene]
SceneDirectorCommentCharLineLimit=180
SceneDirectorCommentPosX=50
SceneDirectorCommentPosY=300
SceneDirectorCommentTextScale=0.4
[LoadingOverlay/TCR]
FadeOutCooldownExtraTime=1
FadeInSpinnerTime=1
NoninteractiveSpinnerTime=3
FadeOutSpinnerTime=1
NoninteractiveEndCooldown=1
[Accessibility]
NoAirDrain=false
MotionSicknessFocusMode=false
AutoLoot=false
DisableDurabilityBoat=false
FocusToggle=false
DisableDurabilityItem=false
ColorblindFocusMode=false
WeightlessItems=true
FastBoats=false
HideHerbs=false
HideCorpse=false
LowHPAutoHealOn=false
[Marketing]
Countdown=0
LastLaunchVersion="v 5.00c"
[RTXGI/Grid1]
ProbeMaxRayDist=128
[Visuals]
HdrPaperWhite=300
AllowClothSimulationOnGpu=false
InventoryBgColorScaleB=0.036
InventoryFixedLuminance=0.25
InventoryBgColorScaleG=0.034
MovieFramerate=30
HdrEnabled=false
GammaValue=0.92
HdrSaturation=0.2
MaxTVBrightness=500
InventoryBgColorScaleR=0.02
[Galaxy]
DevSaveMarks=false
tokenRefA=
SaveAllowTickMarks=true
[Rendering]
AllowReflex=false
ShowStreamlineConsole=false
GrassDensity=3500
DecalsSpawnDistanceCutoff=10
GlobalOceanTesselationFactor=32
HairWorksGlobalWidthLimit=2.25
CascadeShadowDistanceScale2=1
MaxTextureAnizotropy=16
AllowDLSS=true
HairWorksGlobalStrandSmoothness=2
HairWorksGlobalDensityQuality=0.75
CascadeShadowDistanceScale3=1
HairWorkstGlobalDensityLimit=0.35
TextureStreamingHeadsDistanceLimitSq=100
MeshLODDistanceScale=1.2
AllowDLSSRR=true
ScaleformTextureUnstreamDelay=2.5
DecalsChance=1
MaxAtlasTextureSize=4096
TerrainReadAheadDistance=200
AllowDLSSG=true
SSREnabled=false
HairWorksLevel=0
MaxTextureArraySize=2048
TerrainScreenSpaceErrorThreshold=2
TerrainScreenSpaceErrorThresholdFar=5
TextureStreamingCharacterDistanceLimitSq=225
TextureStreamingDistanceLimitSq=40000
HairWorksGlobalDetailLODFactor=0.65
AllowStreamline=true
TextureMipBias=-1
DeveloperMode=false
TextureInFlightCountBudget=12
ShouldRefetchUpscaler=true
CascadeShadowDistanceScale0=1
MeshRenderingDistanceScale=1.5
WidescreenCutscene=false
HairWorksAALevel=0
TextureInFlightCountBudgetLoadingMode=256
CascadeShadowDistanceScale1=1
[Input/Gestures]
EnableSwipe=true
EnablePan=true
EnableGestures=true
EnablePinch=true
[Visuals4K]
PerformanceMode=false
[LoadingScreen]
FadeInTime=3
SkipShowWithAnyKey=true
GameRevealTime=3
SkipHideDelay=3
SkipInputDelay=0.25
FadeOutTime=1.5
SkipAutoshow=false
[Rendering/TAA]
CASPacked=false
CASDistanceDecayStrength=0.6
CASAmountNear=1
CASAmount=1
CASDistanceDecayPower=1.5
CASDenoise=true
TAAUseLDS=false
CASDistanceBased=true
CASFast=false
CASAmountFar=0
EnableCAS=true
[Engine]
LimitFPS=0
[StartupFlow]
LastSeenVersion=500
LaunchCounter=1
[Rendering/SpeedTree]
GrassGenerationEfficiency=0.075
GrassDistanceScale=2
SRTGrassExtraRange=2
FoliageDistanceScale=1.5
FoliageShadowDistanceScale=16
GrassRingSize=6291456
[Rendering/TrimGrass]
trimSlopeMost=0.6
trimSizeMedium=0.65
trimSlopeMedium=0.07
trimSizeBig=1.2
trimSizeSmall=0.1
trimSlopeLeast=0.01
[Rendering/Shadows]
MergedShadowsCascade4LOD=0
MergedShadowsCascade2LOD=0
MergedShadowsCascade3LOD=0
ScreenShadows=true
[Gameplay/BoatCamera]
BoatLocalSpaceCamera=false
[Save]
ShowCompatWarning=false
[Streaming/Textures]
CinematicModeMipBias=1
[Kinect]
Kinect=true
[Foliage]
MaxVisibilityDepth=12

@gabrielmaialva33

gabrielmaialva33 commented Oct 5, 2026 •

Copy link
Copy Markdown
Author

@San10deep great, glad it's working! Sure, give RT a try: on Wineland it won't hang the GPU. Just keep expectations low on a laptop 3050, since RT is heavy and 4 GB of VRAM (6 GB on some models) fills up fast. Path tracing is out of reach there. Turn on one RT option at a time with DLSS on Performance, and if it stutters or drops below ~30 fps, switch it back off.

And thanks for sharing your settings! Quick note for anyone copying them: that's the whole user.settings, so it also carries personal stuff like difficulty, DLC toggles, language, accessibility options (WeightlessItems=true), gamma and AllowReflex=false. Better to copy only the lines you need. Do you know which one fixed the white halo around characters? My guess is [Rendering/RT/HBIL] UseHBIL=false, since horizon-based effects work in screen space and tend to leave halos around moving characters. If you can confirm, I'll add it to the troubleshooting table.

@micker

micker commented Oct 6, 2026

Copy link
Copy Markdown

hello i try to use it with my zephyrus g14 (rtc 4060) + faugus on garuda impossible to actived dlss .. some one can help me ?

@gabrielmaialva33

Copy link
Copy Markdown
Author

@micker two things to check on the G14:

  1. Faugus. Wineland's Witcher 3 fix is applied only when Steam launches the game, so through Faugus you set it once by hand. Use Proton Wineland 11.0-20261005 or newer for the game, then in Faugus: right-click the game → Edit → Tools → Winetricks → "Select the default wineprefix" → "Run a Wine cmd shell", and enter:
    reg add "HKCU\Software\Wine\AppDefaults\witcher3.exe" /v HideWineExports /t REG_SZ /d Y /f
    
    Full steps in nanomatters/proton-cachyos#77. Use the original exe: if you ran the patch script before, --restore it first.
  2. Hybrid GPU. The G14 can hand the game the AMD iGPU, which looks exactly like this: DLSS "not supported", Low preset, low FPS. Add __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only to the game's launch arguments in Faugus or, if your model has a MUX switch, put it in dGPU mode (ROG Control Center / supergfxctl) and reboot.

If DLSS is still greyed out after both, run it once with PROTON_LOG=1 and post the log.

@micker

micker commented Oct 6, 2026

Copy link
Copy Markdown

hello thanks for your return
1 i do wineprefix but i am not sure that works after doing reg when i close cmd i need to close all other windows choose
2 i add argument
3 this is my log https://filepaste.app/p/0jm2s2gr
thanks for your help

@gabrielmaialva33

Copy link
Copy Markdown
Author

@micker thanks, the log helps. The GPU part is fixed: the game runs on the NVIDIA GPU now. What's left is the Wine check: Streamline still says "SL not initialized", so the game still sees Wine. The registry key didn't end up in the prefix Faugus runs the game with.

The quickest way around it is to skip the registry and rename the string the game looks for, in the game's bin/x64_dx12 folder:

cd "<game folder>/bin/x64_dx12"
cp witcher3.exe witcher3.exe.orig
sed -i s/wine_get_version/frog_get_version/ witcher3.exe

It's safe with Wineland 20261005, which has the vkd3d-proton fixes it needs, and putting the .orig back undoes it. Then pick DLSS in Options → Graphics; frame generation works on a 40-series laptop GPU too.

If you'd rather keep the exe untouched, check that the key really is in the prefix from the game's Edit window in Faugus: grep -A2 -i 'witcher3.exe' <prefix>/user.reg should show "HideWineExports"="Y".

@micker

micker commented Oct 7, 2026

Copy link
Copy Markdown

it works !!! many thanks !

@gabrielmaialva33

Copy link
Copy Markdown
Author

Patch 5.01 is out and the gist is updated for it: w3_proton_patch.py now supports 5.0.0.1048522 too (Steam build 25773555), tested in game on Proton Experimental with DLSS SR/RR, DLSS-G, RT and path tracing all available. If it said "unexpected size" today, download it again. Wineland and the sed one-liner work on 5.01 unchanged. One thing to know: @p-valentin's crash fix is for 5.00c only for now, and the same race is still in 5.01's code.

@tuxrinku

tuxrinku commented Oct 9, 2026

Copy link
Copy Markdown

Thanks for the guide, I managed to get everything working including DLSS-NR, but here and there I get a GPU crash with the following error : NVRM: Xid (PCI:0000:01:00): 109, pid=2970526, name=witcher3.exe, channel 0x0000000a, errorString CTX SWITCH TIMEOUT, Info 0x2c00d

According to this thread it's been apparently fixed, but I still get this error frequently. I'm on a RTX 4080 with the 615.71.09 driver on CachyOS. I'm using the latest proton-cachyos which is based on the proton-experimental-11.0-20261001 build that should be including the fix addressing this error.

Any idea how I can fix it ?

@gabrielmaialva33

Copy link
Copy Markdown
Author

@tuxrinku I got the same Xid 109 on a 4090 while chasing the RT hang, but it stopped once the vkd3d-proton fix was in: nothing in my kernel log since Sept 29, and I've been playing with DLSS-NR, RR and path tracing on Proton Experimental 20261001 and Wineland 20261005 since then.

A few things worth checking:

  1. Do you have PROTON_VKD3D_LOWLATENCY=1 in your launch options? With it, proton-cachyos uses vkd3d-low-latency, which is based on vkd3d-proton 3.0.1 and doesn't have the fix. Drop it if it's there.
  2. Check that the fix is actually loaded: launch with PROTON_LOG=1 and look for vkd3d-proton - build: in ~/steam-292030.log. It should say 44cf7c2042168f3 (or a newer master build).
  3. If both look right, narrow it down: play a while with NR off (F7) and RT on, then with RT off and NR on. The old RT hang hit about 40 s after turning RT on, every single time, so a crash "here and there" may be something else.

If it keeps happening, post the DLSS-NR lines from OptiScaler.log (next to witcher3.exe) and roughly when the Xid hit, and I'll take a look.

@tuxrinku

Copy link
Copy Markdown

Turns out it was because of my GPU overclock, even though I had no problem with it before, resetting it fixed the issue. I suppose DLSS-NR is really pushing your GPU to its limits. Thanks !

@gabrielmaialva33

Copy link
Copy Markdown
Author

Glad you found it! Makes sense: the NR model is a lot heavier than DLSS upscaling and runs every frame, so an overclock that's fine elsewhere can still fall over here. I'll add a note about it to the NR section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment