Skip to content

Docs: running under Wine/Proton on Linux (short notes) - #2082

Open
desplmfao wants to merge 18 commits into
Marvisak:mainfrom
desplmfao:docs/linux-wineserver
Open

desplmfao wants to merge 18 commits into
Marvisak:mainfrom
desplmfao:docs/linux-wineserver

Conversation

@desplmfao

@desplmfao desplmfao commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Why

The compiler point is the one that matters most and isn't written down anywhere else. Wine's builtin d3dcompiler_47 refuses VIctory's run-time helper shaders. Then every indirect draw and dispatch is dropped (no argument clamp: indirect execution dropped), and most of the world is not drawn. This is likely behind several Linux reports of a blue, white or empty picture. With Microsoft's DLL, the world is drawn.

The wineserver patch is worth knowing about: a world frame goes from about 4 s to 1 s here (RTX 5080), and about 3 s to 1 s on an RX 9070 (measured by Beqren).

Changed after review

The first version also carried the Wine patch ports (about 540 lines, LGPL) and scripts that fetch and build Wine (tools/wine/). Following the triage, those are out of the tree now. The doc links to notes kept outside the repository instead.

Tested

The setup in the doc is what our runs use: RTX 5080, Linux, proton-cachyos 11.0 with Proton Experimental's vkd3d-proton 3.2.0. cargo xtask policy: 183 files ok.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

docs/linux.md: what has worked under Wine/Proton (vkd3d-proton, DLL
overrides, the pipeline journal on NVIDIA) and how to run with a
patched wineserver. tools/wine/: ajsem1337's view-tree patch from Marvisak#340,
ported to wine-cachyos 11.0, a script that builds the server from a
Proton release's Wine source, and one that makes a Proton copy using
it. A world frame went from about 4.0 s to 1.0 s on an RTX 5080.

The patch is kept as .patch.txt to stay inside the asset policy's
allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao
desplmfao marked this pull request as draft November 25, 2026 04:30
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremygold02

Copy link
Copy Markdown
Contributor

Triage verdict — Keep the Proton guide, verify the source on rebuild (5d192ed)

Evidence

Checks and limits

Next step

  • Verify the existing checkout’s remote and resolved revision against the request, or require a fresh work directory when they differ. A small script test can use two local Git refs and assert that reusing the directory fails clearly before the build.

This verification was AI-assisted.

desplmfao and others added 2 commits November 24, 2026 23:39
build-wineserver.sh now uses the first view-tree patch that applies. The
11.0 patch also applies to Proton Experimental (experimental_11.0) and
GE-Proton 11; Proton 10 and upstream master get ports of their own.
Each builds server/wineserver without warnings and matched the original
list lookups in a randomized comparison; only proton-cachyos 11.0 has
been run with the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ton ships it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao
desplmfao marked this pull request as ready for review November 25, 2026 04:41

@DenRakEiw DenRakEiw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally merged onto origin/main (940d32f, Windows 11 x64):

  • cargo xtask policy — ok (189 files ok)

Clear Linux/Proton documentation and reproducible wineserver view-tree helper scripts/patches. Looks good.

AI-assisted (Gemini 4 Neon).

…red tree

build-wineserver.sh also takes an already prepared Wine source directory
(GE-Proton's Wine only exists after GE's prep script). docs/linux.md
gives the exact commands for proton-cachyos 11.0, Proton Experimental,
Valve Proton 10, GE-Proton 11 and a self-built upstream Wine, and says
which have been run with the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review only: docs/tools change — no crate code.

Proton run docs + wineserver view-table notes — valuable for Linux/Proton users; the emulator's Windows-only build makes this the practical path there.

@ajsem1337

Copy link
Copy Markdown

Thanks, it's great to see someone take the idea further and actually find a use for it. That was the main point for me: that it helps further development.

No need for full credit on my side. The patch was written by Claude under my direction. A mention of me and @neonbyte1 is plenty; neonbyte1 ran tests and contributed to it as well. Keep the patch files in tools/wine/ for as long as they're useful.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Deilach

Deilach commented Nov 25, 2026

Copy link
Copy Markdown

Tested a different path, on AMD: CachyOS, RX 9070 XT (RDNA4), RADV (Mesa 26.3.1), system Wine 11.22 rather than Proton, with vkd3d-proton master. Here's what AMD users will hit that the doc could cover:

  1. RADV crashes on entering the world with any released vkd3d-proton. dxil-spirv makes invalid SPIR-V for some world shaders: a loop exit that isn't a structured exit, which spirv-val rejects. RADV then segfaults in radv_shader_spirv_to_nir, and the process ends with exit code 3 and no message. The fix is dxil-spirv's structurizer rewrite (71967a38, 2026-10-27). It's in vkd3d-proton master, but not yet in a release: the latest tag, v3.1 (2026-10-28), pins a dxil-spirv from 10-26. Building vkd3d-proton master fixed it here (meson setup --cross-file build-win64.txt --buildtype release build64 && ninja -C build64, then use its d3d12.dll/d3d12core.dll). Is the "vkd3d-proton 3.2.0" in the doc a proton-cachyos build? There's no v3.2 tag upstream.
  2. Wine's HLSL compiler can't build VIctory's two runtime shaders. These are the indirect-argument clamp and the 16-bit depth conversion (Wine: the indirect argument clamp does not compile with Wine's HLSL compiler, so every indirect execution is dropped (fix on a branch) #909, Wine/vkd3d: indirect execution is dropped because the argument clamp cannot be compiled there; rewriting its HLSL does not help #170). Proton's d3dcompiler_47 is Wine's too. Without them every indirect draw is dropped, and the world is mostly black. Until GPU: an argument clamp Wine's compiler builds too #1279 or GPU: our compute shaders compiled by the build on Windows #2093 lands: winetricks d3dcompiler_47, or protontricks <appid> d3dcompiler_47.
  3. vkd3d-proton refuses some things Windows drivers accept. These have open fixes:

A DualSense under plain Wine needed winebus DisableHidraw=1 and Enable SDL=1 here.

Happy to send these as a follow-up PR to docs/linux.md after this one lands, if you'd prefer that to folding them in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

@Deilach thanks, that's a very useful set of notes. Please do send it as a follow-up PR to docs/linux.md once this one lands. You measured it on AMD and I can't check any of it here, so it's better under your name than folded in by me.

On the version: "vkd3d-proton 3.2.0" was the one bundled with proton-cachyos 11.0. It reports itself as applicationVersion: 3.2.0, build 2576c0b4adfae4a, not an upstream tag. The doc now says that (docs/linux.md, setup section).

The setup said proton-cachyos 11.0 ships vkd3d-proton 2576c0b4. It ships
3dfc6f07; the tested d3d12.dll and d3d12core.dll were Proton
Experimental 11.0's (2576c0b4), next to victory.exe. Also where to read
a Proton's vkd3d-proton build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

Correction to the setup section, now pushed: the tested d3d12.dll and d3d12core.dll were Proton Experimental 11.0's (vkd3d-proton 3.2.0, 2576c0b4), placed next to victory.exe and run with proton-cachyos 11.0. proton-cachyos 11.0 itself ships an older vkd3d-proton (3dfc6f07), which I haven't measured. I'd written that proton-cachyos ships 2576c0b4, which was wrong. The doc now says this, and where to check a Proton's vkd3d-proton build (files/lib/wine/vkd3d-proton/version).

With vkd3d-proton's raw access chains, one of the title's compute
programs does not finish at the start of the first mission: Xid 109 in
the kernel log, a stalled desktop, and the title's watchdog ending the
process (Unsignaled CrossQueueBarrier). VKD3D_DISABLE_EXTENSIONS avoids
it; measured on an RTX 5080, as found by testers in Marvisak#844 and Marvisak#1528.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

Added an NVIDIA note to the setup section (170e1ca): set VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains.

On this RTX 5080 (driver 615.71, vkd3d-proton 3.2.0), most runs used to stop at the start of the first mission. The kernel logged NVRM: Xid 109 … CTX SWITCH TIMEOUT, the desktop stalled, and the title's watchdog ended the process with Unsignaled CrossQueueBarrier in its crash log. I bisected the stuck submission down to compute 72f552f4553fb5f9: skipping it alone got into the world. With only the extension disabled (no skip), the same build reached the world and stayed there with no Xid. Testers found the same in #844 (RTX 5090) and #1528 (RTX 4070), where the raw access chains in this program's SPIR-V were the difference.

desplmfao and others added 2 commits November 25, 2026 03:44
Disabling VK_NV_raw_access_chains avoids the hang but changes how every
shader is compiled, and the picture turned white with it here; skipping
only compute 72f552f4553fb5f9 avoids the hang and keeps the rest drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wine's builtin D3DCompile refuses VIctory's run-time helper shaders
(E5005 on RWByteAddressBuffer methods), so the indirect argument clamp
is never built and every indirect draw and dispatch is dropped. With
Microsoft's d3dcompiler_47.dll next to victory.exe and a native override,
the clamp and the other helpers compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

Added in fbc7944: under Wine, use Microsoft's d3dcompiler_47.dll. Wine's builtin D3DCompile refuses VIctory's run-time helper shaders (E5005: Method 'Load' is not defined on type 'RWByteAddressBuffer'), so the log says no argument clamp: indirect execution dropped and every indirect draw and dispatch is skipped. That's most of the world, and likely why several Linux reports see only a blue or white picture. With the native DLL next to victory.exe and d3dcompiler_47=n,b, the clamp and the other helpers compile (the clamp, compare and depth-plane errors all go away), and the world is drawn here. The description is updated too.

@Beqren

Beqren commented Nov 25, 2026

Copy link
Copy Markdown

The Proton Experimental row, run with the title on AMD

On Valve's Proton Experimental experimental-11.0-20261112 (Wine 11.0) on an RX 9070 (RADV, Mesa 26.2.6, CachyOS), I replaced only files/bin/wineserver with one built with the view-tree patch. A world frame went from 2.9-3.2 s (stock) to 0.7-1.0 s (patched), and the world was reached in about 35 s instead of 86 s. The full numbers are in my comment on #834.

I used CachyOS/wine-cachyos#50 as published, which is neonbyte1's version without the in_tree flag. This PR's -cachyos11 file is the earlier variant with the flag. Both do the same lookups. #50 applied to Valve's tree with line offsets only.

Some details for the Experimental section of docs/linux.md:

  1. Pin the exact Wine commit. Take it from the Proton tag rather than the branch head. Today they are the same commit, but Experimental moves:
    gh api "repos/ValveSoftware/Proton/contents/wine?ref=experimental-11.0-20261112" --jq .sha
    # 5b557605b4e51f0853ec8e0e4f0eb536c669fae3; the installed tag is in "<Proton>/version"
  2. Check the built server against the Proton it will run with, not only print the version. Valve's committed include/wine/server_protocol.h says 930 and lacks the fsync requests, so the server does not compile from it. tools/make_requests (run by autogen.sh) regenerates it as 931. The stock ntdll.so compares against that number, which you can confirm:
    V=$(sed -n 's/^#define SERVER_PROTOCOL_VERSION //p' src/include/wine/server_protocol.h)
    objdump -d --no-show-raw-insn "<Proton>/files/lib/wine/x86_64-unix/ntdll.so" | grep -F -c "\$0x$(printf %x "$V"),"
    # 2 here (cmp $0x3a3 and the error message); 0 means the source is not the one this Proton was built from
    With a prepared source directory that already has a configure, autogen.sh is skipped, so the header there is worth checking.
  3. The server runs in umu's steamrt4 container as built. I configured with nearly everything off, as the script does, plus --disable-tests, and left inotify on, as the stock server has it. Built that way, its dynamic imports match the stock server's: libc only, GLIBC_2.38 at most. A full copy of the Proton directory (cp -a --reflink=auto) with only files/bin/wineserver replaced also works as the "copy" step. Every file in it is real, so ntdll finds the new server.

No game data.

Measured and written with an AI coding assistant (Claude Code) working on my machine; the numbers are from the runs described above.

…s protocol

From Beqren's run of Proton Experimental on an RX 9070 (Marvisak#2082):
- build-wineserver.sh takes a commit as well as a tag or branch, so
  Experimental can be built from the Wine commit its Proton tag pins
  instead of the moving branch head;
- it regenerates server_protocol.h with tools/make_requests (Valve's
  committed header says 930 where the requests make 931), and with a
  Proton directory as fourth argument checks the version against that
  Proton's ntdll.so and stops on a mismatch;
- configure with --disable-tests;
- docs: the pinned Experimental build, Beqren's AMD numbers, the check,
  and the full-copy alternative to proton-with-wineserver.sh.

Tested: proton-cachyos 11.0 end to end (clone, patch, regenerate,
'protocol 932 matches .../ntdll.so', build); the check rejects 931; the
commit-pinned fetch checks out the tag's commit.

Co-Authored-By: Beqren <Beqren@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

@Beqren thank you, that's the row I couldn't test, and all three points are in cea755b:

  1. Pinned commit: build-wineserver.sh now takes a commit as well as a tag or branch. The Experimental instructions build from the Wine commit of the installed release (gh api "repos/ValveSoftware/Proton/contents/wine?ref=<tag>" --jq .sha), not the branch head.
  2. Protocol: the script now always regenerates server_protocol.h with tools/make_requests and prints the version. Given the Proton directory as a fourth argument, it checks that version against the Proton's ntdll.so and stops on a mismatch. I used (cmp|mov) \$0x<version>, rather than a plain grep for the constant: here it gives 2 hits for the right version and 0 for the neighbours (a plain grep also hit 931 once).
  3. Build and copy: --disable-tests is added (inotify stays on), and the doc mentions the full-copy alternative (cp -a --reflink=auto with only files/bin/wineserver replaced).

Your RX 9070 numbers (2.9–3.2 s to 0.7–1.0 s per world frame, world in 35 s instead of 86 s) are in the Experimental section, credited to you.

Tested here: proton-cachyos 11.0 end to end (clone, patch, regenerate, protocol 932 matches …/ntdll.so, build). The check rejects 931, and the commit-pinned fetch checks out the tag's commit. I haven't built Experimental itself here.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs work: needs the maintainer's decision (unchanged). Since dc7f3ff, the only changes are to the d3dcompiler_47 note in docs/linux.md (0644272, d6c3e4e). It now asks for a Windows 10/11 SDK build of the DLL and warns that winetricks' 6.3.9600 build lacks cs_5_1. That matches the test report in the comments, and main compiles its helper shaders for that target (indirect.rs). The PR is still a README pointer plus a 69-line doc, with no code or scripts. It merges cleanly, and CI passes (check).

What's left is not a code problem:

If a Linux note is wanted, the d3dcompiler_47 and VKD3D_DISABLE_EXTENSIONS lines are the most useful parts.


Generated by Claude Code

desplmfao added a commit to desplmfao/VIctory that referenced this pull request Nov 25, 2026
…pt in this fork

Moved here from Marvisak#2082, which upstream keeps short. The patches are
ajsem1337's view-tree change from Marvisak#340 with neonbyte1's contributions;
each file credits them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve out of the tree

Upstream's triage asked for short docs and for the Wine (LGPL) patch code
and the scripts that fetch and build Wine to stay outside the repository.
docs/linux.md keeps the setup that matters (native D3D12 DLLs, Microsoft's
d3dcompiler_47), the NVIDIA notes, and links to the patch's comment in
Marvisak#340, the Wine bug, the wine-cachyos PR and the out-of-tree build notes.
tools/wine/ is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao desplmfao changed the title Docs, tools: running under Proton, and the wineserver view-tree patch from #340 Docs: running under Wine/Proton on Linux (short notes) Nov 25, 2026
@desplmfao

Copy link
Copy Markdown
Contributor Author

Thanks for the triage, I've followed it. As of 2da4da7 this PR is two files and 55 lines:

The point I'd most like to keep is Microsoft's d3dcompiler_47.dll. Without it, Wine's compiler makes VIctory drop every indirect draw, and the world isn't drawn under Linux. If Linux is out of scope for the repo, that one line would still save people a lot of time, wherever it ends up.

The title's strand-hair passes hang NVIDIA GPUs with vkd3d-proton's
VK_NV_raw_access_chains; with the extension off they run and the people
in the scene stay intact (RTX 5080, five minutes in the world).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slauko

slauko commented Nov 25, 2026

Copy link
Copy Markdown

Three things every tester on Linux will hit that docs/linux.md does not have yet — each with the log line that names it.

1. The start screen waits for ever without a pad — it is a phantom pad. Under Wine, XInput can report a gamepad that never presses a button: here the keyboard interface of a Logitech G502 (an HID interface with BTN_GAMEPAD, /dev/input/js0). The runtime gives the title its keyboard stand-in only while XInput has no pad at all (any_pad in crates/victory-hle/src/modules/gameinput.rs). The log tells them apart: input device device=0 connected=true is the phantom pad, device=4 the stand-in. SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT=0000/0000 keeps every pad from Wine's side, and Return goes through the start screen. (Zettrox/ztrx#2 documents this as a "known Wine gap".)

2. Tools need a display too. victory warm or translate --pipelines with WAYLAND_DISPLAY and DISPLAY both unset gets no Vulkan surface extension: DxvkInstance::createInstance: Failed to create Vulkan instance, then no host D3D12 device. warm still translates, but under a key made without the device's facts (wave size, view limit), and the run never finds those entries — the cache is warm and cold at once. Start tools on an Xvfb like the run. With WAYLAND_DISPLAY set and no X display, Wine opens on the tester's real desktop instead.

3. Once the pipeline library works, the second launch hangs. With VIctory#1722 in (the empty library with a null blob; vkd3d-proton refuses the dangling one) the library is saved — and the next launch starts every pipeline the last run drew with early: 1,657 here. The title presented no frame after frame 32 and its watchdog ended it (0xc0000005 at title+0x2215c35, 45 s). The same binary without the library ran the title screen at 30 fps. VICTORY_EARLY_PIPELINES=0 (fxceless/victory-fork#845) has pipelines requested on first use, which loads them from the library all the same.

Two smaller ones for the setup section:

Measured with Proton Experimental 20261112, vkd3d-proton master@ec20719, an RTX 3080 Ti, and the fork line (fxceless/victory-fork with uiliannn/VItoriaBr): menus 25–30 fps, the intro at 1.3–2.5 fps with a tree-indexed wineserver. The full list in the order it failed is in fxceless/victory-fork#6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

@slauko thanks, these are useful, and each one names its log line. As of ece0c78, two of them are in a short Common snags section, credited to you:

  • the phantom pad, with the device=0 log line and SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT=0000/0000
  • VKD3D_SHADER_CACHE_PATH being a folder

I left the others out, only because the triage asked to keep this doc short and to keep it from going stale on things outside main:

The doc is 70 lines now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@arogan178

Copy link
Copy Markdown

Note

🤖 Claude Opus 5.5 responding on behalf of @arogan178

The winetricks d3dcompiler_47 step does not fix the clamp: winetricks installs the Windows 8.1 build (6.3.9600.16384), which rejects VIctory's cs_5_1 target. The Windows SDK's build does compile it.

Reproduced on CachyOS, RX 9070 XT (RADV), Proton-CachyOS 11.0 with Proton Experimental's vkd3d-proton 3.2.0 d3d12.dll/d3d12core.dll beside the exe, WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3dcompiler_47=n,b":

The SDK's DLL is in the "Windows SDK for Windows Store Apps Tools" installer's cabinets (the x64 PE32+ one of the D3DCOMPILER_47.DLL files). Suggest the doc names that build, or at least the minimum version, instead of winetricks.

winetricks installs the Windows 8.1 build (6.3.9600.16384), which does not
know cs_5_1: the clamp shaders fail and every indirect execution is
dropped, as with Wine's own compiler. Found and checked by arogan178 on an
RX 9070 XT under Proton; the build we tested with is 10.0.26100.7705.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desplmfao

Copy link
Copy Markdown
Contributor Author

@arogan178 thanks, you're right. The DLL I tested with is 10.0.26100.7705 from the Windows SDK, and I never checked what winetricks installs. 064427 changes the doc to name a Windows 10/11 SDK build (10.0.x, the x64 file from the "Windows SDK for Windows Store Apps Tools" cabinets). It also warns against winetricks d3dcompiler_47, with the X3506 error and the dropped indirect executions you found, and credits you for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants