Wine/Proton: one-page MapViewOfFile3 calls get slower with every view (the stop at +0x4dcbc9d reported here was the no-audio-device case, see #222) #834
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#834
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ghmfreitas on GitHub · 2026-11-24 11:53 UTC · original
Host
d3d12.dll/d3d12core.dll; rootful Xwayland window at 60 Hz; no networkffe310eplus 3 localcfg(windows)test-only commits,cargo build --profile diag -p victory --features diagnostics --target x86_64-pc-windows-msvccross-built on Linuxvictory run <exe> --execute, no inputSymptom (12 of 12 runs)
All 587 imports bind (0 missing), the device is created on the RTX 3070, frames are presented at 15 to 20 fps with 3 draws each, and every frame VIctory captures (1, 2, 4 ... 64) is black. After 82 frames or a few dozen more, about 19 s into the title's own running time, the title hits a breakpoint on its main thread and writes its own crash report:
What the threads are doing
With
VICTORY_STACKS=10,14,18the three dumps are identical (92 threads). The main thread waits in+0x5ab130a(called from+0x21b70b1), the same function the breakpoint path leaves from (+0x5ab13ed). One title thread sits inXMemMapPhysicalPages→xmem::map(xmem.rs:621and:715, symbolized fromvictory.pdb); the others are in waits.Where the time goes
Shortly before, the title reserves 3,542,286,336 bytes (54,051 pages of 64 KiB); the
xmem::mapcalls that follow are one 64 KiB page each. With a local timer around the two host calls inxmem::map(my own instrumentation, not in the tree):MapViewOfFile353,900 calls took 18.2 s, 11.85 s of it inside
MapViewOfFile3. TheVirtualFreethat splits the placeholder adds 0.41 s in total. The stop comes about 40,000 calls after the last pause in the call stream, so before 54,051 pages could be mapped (I did not log addresses; that count is an estimate).The stop does not wait for the mapping
Adding a 150 µs spin to each call makes the title stop with 42,900 calls done instead of 53,000. In three runs the stop comes 13.1 to 13.9 s after call 11,000. That fits a bounded wait on the main thread. I have not shown the deadline directly, nor that the title goes on when the mapping is fast.
Reproduction without the title
A test that allocates 54,051 physical pages, reserves one range with
XMemVirtualAlloc(MEM_RESERVE | PAGES_64K)and callsXMemMapPhysicalPages(at, 1, …)once per page takes 17.9 s and 18.2 s under wine-11.0 (two runs, test profile). Cost per call grows in a straight line, from 62 µs in the first 6,000 calls to 627–672 µs in the last 6,000. The CPU time is inwineserver: 10.7 s of user time there against about 2 s in the test process at the last sample. I did not read whatwineserverdoes per view.I have no Windows number for the same test. It is about 30 lines in
xmem.rs's test module; I can post it or open a PR with it marked#[ignore]if that helps.Ruled out here
xaudio2call is traced before it.WINEFSYNC=1(fsync: up and running), same stop and the same time insideMapViewOfFile3.--console series-s: same address.Not known
How Linux testers who reach the menus (#752, #144) get past this point: a faster core for
wineserver, a different Wine, or a different path. Whether fewer, larger views under Wine would be safe inxmem(#234 touches the same area).Side note for Linux testers
With Xvfb as the X server the run dies earlier, with
0xc0000094indxgi.dll+0x1c7cc(DXVK's dxgi from Proton 11.0) right afterCreating swapchain. Xvfb reports a 0 Hz mode; a rootful Xwayland window (60 Hz) does not hit it.@pushkarreddyy on GitHub · 2026-11-24 12:06 UTC · original
Claiming this issue for investigation and resolution.
Architectural Analysis & Proposed Optimization
In
crates/victory-hle/src/modules/xmem.rs,XMemMapPhysicalPagesprocesses physical page arrays by issuing an individualMapViewOfFile3call for each 64 KiB page. When titles reserve ~3.5 GB (54,051 pages), making 54,051 distinct system calls incurs massivewineserverIPC context switching under Proton/Wine (~18 seconds), triggering internal title watchdogs/deadlines.By scanning the physical page descriptors for contiguous runs of physical pages mapped to contiguous virtual addresses, we can coalesce runs into single multi-page
MapViewOfFile3calls (or batch adjacent mappings). For typical contiguous allocations, this reduces system calls by orders of magnitude (from 54,000+ to under 100).Preparing an optimization branch on fork.
@MichaelSmithAI on GitHub · 2026-11-24 12:52 UTC · original
Bruce measured the one-page case through VIctory's guest XMem API. The source-built Win64 fixture made 54,051 separate calls, one 64 KiB page each. It used the same executable and Wine 11.22 client for all four runs. Only the wineserver changed, using a private build with the view-tree patch discussed in #340.
On stock, the last 6,000 calls took 0.91–1.42 s. With the tree, they took 0.19–0.23 s. The first and last mapped slots retained their expected values in all four runs. This gives a measured improvement even when each guest call contains just one page, as in your trace. These timings cover the mapping loop on our Wine 11.22 setup. Whether that change affects the title's wait on your Proton 11.0 setup remains open.
@pushkarreddyy on GitHub · 2026-11-24 12:55 UTC · original
Updated Fix: Cross-Call Page Coalescing with Demand-Paging VEH
Thank you @ghmfreitas for the sharp diagnosis and call-count telemetry! Your profiling pinpointed the exact bottleneck: the title initializes bulk memory by issuing
XMemMapPhysicalPages(addr, 1, page)in a sequential loop where 44,660+ calls are contiguous across calls, causing wineserver to allocate and track 50,000+ individual 64 KiB views.I have updated the branch with commit
546d9b0(on branchperf/xmem-coalesce-page-maps):Architectural Solution (
crates/victory-hle/src/modules/xmem.rs):When subsequent calls on the same thread continue the active run (
addr == pending.base + pending.n * PAGEwithin the same section and index run),XMemMapPhysicalPagesincrementspending.n += nand returns immediately without issuingVirtualFreeorMapViewOfFile3.When the run ends (non-contiguous address, section change, unmap, query, or other HLE memory calls),
flush_pendingexecutes a singleVirtualFreeandMapViewOfFile3for the entire multi-thousand-page run at once. This collapses the 44,660+ individual views and syscalls down to a single view.Registered
on_map_faultviaAddVectoredExceptionHandler. If title CPU code touches memory in the pending placeholder window before another HLE API is invoked, the VEH intercepts the access violation, flushes the mapping, and returnsEXCEPTION_CONTINUE_EXECUTIONfor seamless transparent resumption.Added
physical_pages_coalesce_across_individual_callsasserting that sequential 1-page invocations coalesce into a single view (assert_eq!(view, Some(10 * PAGE))) with verified read/write accessibility.Tested with
rustfmt --edition 2024 --checkand zero Rule #1 asset violations. @ghmfreitas, please try commit546d9b0when you have a chance!@vladbondarenko97 on GitHub · 2026-11-24 13:03 UTC · original
This looks like the "no audio output device" case rather than page-mapping cost. Same trap, same address:
+0x4dcbc9dis the title's assert when a 96 KiB per-thread audio command stream fills up. When the host has no playback device, the title's audio setup leaves a lock held, and the audio thread never drains those streams. The full chain, with RVAs, is in ivall/xcl#695; #222 here describes the Wine side (no sound driver → stops ~15 s in).Evidence from another machine: on an RTX 3080 Ti PC with no active Windows render endpoint, VIctory and xcl both trap at
+0x4dcbc9d. xcl with its silent-endpoint PR (ivall/xcl#887) runs past it: https://github.com/ivall/xcl/pull/887#issuecomment-7132280693.Quick check for this report: does the Proton prefix have a working audio driver (
winecfg→ Audio, orWINEDLLOVERRIDESwithoutwinepulse/wineoss)? If not, enable one (or a null sink such aspactl load-module module-null-sink) and see whether the trap goes away before changingXMemMapPhysicalPages.AI use: Claude Code (Claude Opus 5.5) drafted this from our test runs; I reviewed it.
@Sunkiller-qc on GitHub · 2026-11-24 13:13 UTC · original
This isn't Wine-only. The same
int3at+0x4dcbc9d, at the same title frame 82, shows up on native Windows too:+0x4dcbc9don frame 82, with the same stack (+0x4e52a83,+0x4e529c4,+0x5ab13ed,+0x21b70b1,+0x1d83996,+0x81afb9).int3on the append-to-buffer check.So it's the title's shared 96 KiB buffer filling up before its consumer drains it. It happens every time under Wine, sometimes on Windows, and every time in Tanju42's setup. Your slow one-page
MapViewOfFile3calls would make it worse, but they're probably not the only thing that triggers it.@Sunkiller-qc on GitHub · 2026-11-24 13:46 UTC · original
Thanks for checking. That changes my reading too: I took the Windows hits as proof that the trap didn't depend on Wine, but the no-audio-device explanation would cover them as well. On #872, MichaelSmithAI pointed to an XCL report on Windows that got past the same offset on a PC with no active playback device, plus the Fedora/Wine case in #222.
So it would help to know whether the native Windows stops at
+0x4dcbc9dhad a working playback device at the time: @Tanju42 (#698, real GPU and WARP) and @JFIREonFIRE (#872, 1 boot in 13). If they didn't, all of these are #222, and this issue is left with just the Wine mapping cost, as your new title says.@vladbondarenko97 on GitHub · 2026-11-24 13:53 UTC · original
A fix for this, tested on the retail title. PR creation is limited to collaborators right now, so here is the branch: https://github.com/vladbondarenko97/VIctory/tree/audio/silent-endpoint (one commit,
d80294f, onmainffe310e; compare: https://github.com/Marvisak/VIctory/compare/main...vladbondarenko97:VIctory:audio/silent-endpoint). If a PR is preferred once that is open again, I'll open one.What is in it
modules/audio/silent.rsoverrides the title'sCoCreateInstance(ole32.dll,api-ms-win-core-com-l1-*; the retail exe imports it fromapi-ms-win-core-com-l1-1-0.dlland has noCoCreateInstanceEx/CoGetClassObjectimport). The host call always runs first. Only a successfulMMDeviceEnumerator/IMMDeviceEnumeratorcreation without aggregation is looked at.GetDeviceids and notifications go to the host.ISpatialAudioClientaccepts 48 kHz float. ItsISpatialAudioObjectRenderStreamsignals the title's event every 10 ms while started, hands out 480-frame buffers and discards them. Start/Stop/Reset can be repeated, and dynamic objects are counted and capped. One info line is logged when it is used.windows/windows-corebecome plaincfg(windows)dependencies (they were diagnostics-only).Tested
Unknown). RTX 3080 Ti (driver 32.0.16.1060), i7-12700KF, 32 GB, Windows 11 Pro 26300,--profile diag --features diagnostics, this branch merged ontomainffe310e, scripted keys (VICTORY_KEYS) through the first-run menus.no active playback device: the title gets a silent audio endpointat start; 30.0 fps throughout; no+0x4dcbc9dtrap. Captures show the intro key art (frame 1024) and the Rockstar legal terms screen with the Privacy Policy box ticked at frame 5400 (~3 min). Without this change,mainand xclmainboth trap at+0x4dcbc9don this PC (~20–30 s).cargo clippy --workspace --all-targets --locked -- -D warningsand with--all-features: clean.cargo test -p victory-hle --locked: 99 passed, 1 failed. The failure ismodules::display::tests::sdr_and_display_deferrals(0x80070032), which fails the same way on cleanmainon this machine. The 6 new tests pass: routing native vs silent, the 48 kHz float format accepted / 44.1 kHz rejected, 20 buffer cycles → Stop (no signal) → Start → 20 more, dynamic object counting, and a realCoCreateInstancecall (skips itself without an audio service).cargo test -p xtask --locked: 4 passed.Not tested
AI use: Claude Code (Claude Sonnet 5.5) implemented the change and tests; Claude Opus 5.5 reviewed it, ran the retail test on my machine and wrote this description. I reviewed it.
@pushkarreddyy on GitHub · 2026-11-24 14:13 UTC · original
Thanks @vladbondarenko97 for the detailed investigation into the audio endpoint assert!
It's great to have both angles resolved:
Both fixes complement each other cleanly to ensure stable boots across Wine/Proton and native Windows environments.
@mkslzk on GitHub · 2026-11-24 14:21 UTC · original
Reproduction on a different GPU, with the same shape as your measurement.
Stack: CachyOS kernel 7.3.5, RX 7900 XT (RDNA3, RADV), Mesa 26.3.1, Wine 11.22,
vkd3d-proton 3.2.0, build
ffe310eplus theproton-fixesbranch (#844).In the world, per frame:
54 MB in 7.35 s is 7 MB/s. That is not bandwidth, it is per-call overhead, and it confirms your
analysis of one
MapViewOfFile3per 64 KiB page and thewineserverround trips that come with it.The cost also scales with the number of views rather than with the byte count (46 MB took 774 ms in
one frame, 54 MB took 7350 ms in another), which is the signature you describe rather than a
throughput limit.
We have your
perf/xmem-coalesce-page-mapscommit (47b1f3b) cherry-picked ontoproton-fixesandare measuring the same run with it now. If the copies collapse as expected, I will add the numbers
here, so the patch has a second data point on RDNA3 next to your RTX 3070.
One detail that may matter for the coalescing: our reservations are large (
vm.vma.size137 438 953 344in the title's crash report, so 128 GiB of address space) while the physical pages actually mapped per
frame are small. If the run coalesces by contiguous virtual run, as your patch does, that should be
exactly the right axis.
@pushkarreddyy on GitHub · 2026-11-24 12:15 UTC · original · edited 2026-11-24 14:22 UTC
Verified Patch Ready on Fork
The optimization coalescing page mappings is ready on my fork:
47b1f3bbased onmain(ffe310e)Changes (
crates/victory-hle/src/modules/xmem.rs):map_alias: Replaced page-by-page mapping loop with view slice run coalescing (view_avail.min(len - k)), mapping contiguous ranges in singlemap/MapViewOfFile3invocations.XMemMapPhysicalPagesScatter: Added adjacent address and page run detection, coalescing contiguous blocks into single multi-pageXMemMapPhysicalPages(addr, run, page_ptr)calls instead of iterating one page at a time.Verification:
rustfmt --edition 2024.cargo xtask policyclean).@sander110419 on GitHub · 2026-11-24 16:43 UTC · original
A Linux/Wine data point from the world. It adds view counts, a wineserver profile and a test of
546d9b0; it does not include a fix. AI-assisted: Claude Opus 5.5 (Anthropic), running as an agent on my machine, did the measuring and wrote this. Every number below comes from real runs.Setup: Pop!_OS, kernel 7.2.15, Ryzen 9 9955HX, RTX 5070 Laptop 8 GB (driver 595.104.02), 30 GB RAM, GE-Proton11-11 (wine-11.0 staging), vkd3d-proton master
ec207194as natived3d12/d3d12core. VIctoryffe310eplus the #844 proton-fixes commits, #1010 and local diagnostics, built with--profile diag --features diagnostics(cross-built with cargo-xwin). Title: the newer retail game.Views in the world. A counter in
XMemMapPhysicalPageswalksPhysical::viewsevery 10,000 calls:About 80% of the views could merge into the view before them, which would leave about 20,000 views instead of about 99,000. The calls keep coming after loading: about 435 a second while the title draws 800 to 6,000 draws per frame.
What wineserver spends its time on. wineserver uses 85 to 96% of one core the whole time. Of 8 s of
perfsamples on it, 69.6% are inis_valid_view_addrand 29.0% inreq_unmap_view. Both walk theprocess->viewslist inserver/mapping.c, which is still a list on Wine master.One title thread was waiting for a server reply in 27 of 40 samples taken 100 ms apart. In 4 s that thread blocked in 5,293 server calls: 2,457 were
get_mapping_infoundervirtual_map_section, 423 werevirtual_map_sectionitself and 384 wereunmap_view_of_section.A frame takes 2.4 to 6.2 s; 1.2 to 4.9 s of that is copies.
Skipping unchanged mappings does not help. I tried leaving alone the pages that already show the requested slice, in
XMemMapPhysicalPages,XMemMapPhysicalPagesScatterandmap_alias. Not one of 225,607 requested pages was already in place. The title moves pages to new addresses; it does not map the same page at the same address again.546d9b0on top of this tree: the title stops at startup in 2 of 2 runs. About 15 s in, two deferred runs fail to map, and the title then writes into the first page of the second one:The calls that queued these pages had already returned success, so the title had no way to know the pages were not mapped.
My guess, not verified: the merged range covers more than one placeholder, and
MapViewOfFile3withMEM_REPLACE_PLACEHOLDERneeds exactly one. The extra placeholders could be 64 KiB ones left by earlier one-page unmaps, or two reservations that sit next to each other. A fix would need to do one of these when it flushes:MEM_COALESCE_PLACEHOLDERS(this only works within one reservation);In every case, a call should not return success before its pages are mapped.
The view-tree change measured above, on the server side, should cut the cost of all these server calls here too. With about 99,000 views in the process, every map and unmap walks a list that long.
@Marvisak on GitHub · 2026-11-25 03:49 UTC · original · edited 2026-11-26 06:43 UTC
Automated triage for the maintainers. As the corrected title says, the stop at
+0x4dcbc9dis the no-audio-device case. Open PR #929 (silent playback endpoint) and PR #222 address it. What remains here is the Wine cost of many one-page views. Onmain(63bcca4),XMemMapPhysicalPagesincrates/victory-hle/src/modules/xmem.rsstill makes oneMapViewOfFile3view per contiguous run within a call. The title maps one page per call, so the process ends up with tens of thousands of views (about 99,000 to 135,000 in the world in the comments), and wineserver walks a list of them on each map and unmap. The wineserver side is discussed in #340. Related open PRs: #234 (persistent section views), #1224 and #1264.Three independent A/B runs replaced only wineserver with one built with the view-tree change (Wine bug 60868), with no change to the layer:
main63bcca4: time to the first busy frame from 65–72 s to 38 s, wineserver CPU from about 70 % to 3 % of a core; remap cost at 100,000 views from 328 µs to 18 µs.main): opening-sequence frame from about 4.5 s to about 0.53 s with GPU time unchanged; one run each. The commenter has also proposed the server change to GE-Proton upstream.Layer-side alternatives tried in the comments (narrower lock, joining or coalescing GPU mappings, private copies) did not help or were wrong, so the main lever is on the Wine side; on the VIctory side, any coalescing change still needs each call's pages mapped before it returns (the fork branch
546d9b0did not, and stopped the title in 2 of 2 runs).Generated by Claude Code
@Beqren on GitHub · 2026-11-25 09:52 UTC · original
AMD/RADV data point: the wineserver view tree under Valve's Proton Experimental, and four layer-side alternatives that did not work
With only
wineserverreplaced by one built with the view-tree patch (CachyOS/wine-cachyos#50, Wine bug 60868), a world frame here went from about 3 s to under 1 s. Texture refreshes went from about 1.2 s a frame to about 20 ms, and the world was reached in 33-37 s instead of about 86 s. Everything I tried in the layer instead either did not help or was wrong; details below.Setup: CachyOS, kernel 7.3.3, RX 9070 (RADV, Mesa 26.2.6), Ryzen 7 9800X3D, 60 GB RAM. Proton Experimental
experimental-11.0-20261112(Wine 11.0, its own vkd3d-proton2576c0b4), Microsoft'sd3dcompiler_47.dllin the prefix. The layer is a local branch based on myokex/victory-amd070df42, diagnostics build, run off-screen for 240 s per run. Stock and patched runs alternated, and/proc/<pid>/exeof each run's wineserver showed which binary served it.Per world frame (medians of the world summary lines, ms):
Microbenchmark (one run per point, 300 repetitions each). Each step unmaps a one-page section view to its placeholder, splits the placeholder and maps another page there, which is what the layer does per remapped 64 KiB page. Note that this is not the same operation as neonbyte1's map/unmap pair in #340.
* Noisy: earlier stock runs of the same bench gave 14-24 µs at 100 views. Don't read this row as a patch effect. The point is that the patched cost stays flat in the number of views.
In the world this process held 123,000-135,000 views, 43,000-48,000 of them the GPU's page mappings (
CopyPageMappingsBatchX). The title remapped 1,000-4,000 single 64 KiB pages a frame, at 0.6-0.9 ms per memory call on the stock server.What did not work in the layer (all stock server):
next_page == start_page + runnever matched. This applies to the GPU's alias mappings only. It does not contradict sander110419's count forXMemMapPhysicalPagesviews.The same holds as in sander110419's runs: 0 of 2,000-3,700 remapped pages a frame were already mapped as asked.
Mapping behind Wine's back is not available from the Windows side either. Wine 11 turns on syscall user dispatch for every thread, so a raw
syscallfrom PE code is serviced as an NT system call:getpidreturned0xC0000005andmemfd_createreturned0xC000001C. The clean routes are a unix-side helper called through__wine_unix_call, which would have to ship matched to each Proton build, or the server fix. The server fix needs no change to the layer.One caveat about the patched runs. All three patched runs ended early, at 64, 148 and 182 s, with
dstorage: request failed: copying options=0x0 ... hr=0x800703e6followed by the title's breakpoint. That failure also happens on the stock server. It is a race in the layer: a kernelReadFilelands in a page that another thread has just guarded again. A fix for the fork is proposed in myokex/victory-amd#2; ours is a different one, described in my comment there. After our fix, two 10-minute runs on the patched server had no failure, with median world frames of 349 and 401 ms. Those runs used a later build, so they are not part of the A/B above. How the server was built for Valve's Proton Experimental is in my comment on PR #2082.No game data; counts and timings only.
Measured and written with an AI coding assistant (Claude Code) working on my machine; the numbers are from the runs described above.
@necrobytes on GitHub · 2026-11-26 01:26 UTC · original
I repeated the wineserver view-tree comparison on stock VIctory
63bcca43after reading the RX 9070 result. Fedora 45, Ryzen 5 9600X, RX 9060 XT, RADV 26.2.7. I used the same Proton Experimental 11.0 client, vkd3d-proton, working audio device, starting profile and warm-cache snapshot for all four launches. The only binary changed was the wineserver, built from the same Valve Wine revision with or without the CachyOS view-tree change.CPU and FPS cover the first 40 seconds after that marker. I calculated CPU from the active wineserver process’s CPU time and FPS from consecutive presents. One patched run exited about 42 seconds after the marker. All four covered the reported window. The opening sequence progressed at different rates, so I wouldn’t use these runs to estimate a general gameplay FPS multiplier.
With a separate synthetic 64 KiB remap test and 100,000 existing views, median time per remap on Proton fell from 328.25 to 18.19 µs. With zero existing views it was 18.30 vs 18.03 µs. That lines up with the startup and CPU improvements on unmodified VIctory. Frame rate on this machine still hovered around one FPS after the change.
AI-assisted with Codex.
@Foxiquek on GitHub · 2026-11-26 04:45 UTC · original
A third A/B with only wineserver swapped, the first on GE-Proton: CachyOS/wine-cachyos@fd66dbc built from GE-Proton11-14's source. The tree is LooperSalty/AnyXboxX's copy of VIctory (Neptune base), not this repo's
main.Setup: RX 9070 XT, RADV, Linux Mint 22.3, GE-Proton11-14. AnyXboxX
main(c4c93bd) plus Marvisak/VIctory#1885, with the launcher's tuned set plus the Linux changes fromdocs/running-gta6.md, and a warm shader cache.I built
wineserverfrom GE-Proton11-14's own source (its Wine patches applied, protocol 938) with and withoutfd66dbc, and swapped only that binary. The source-built server without the patch started fine with GE's client.Opening sequence, median of the frame lines with at least 1,000 draws:
Caveats: one run each, and the patched run is shorter (10 frame lines over 1 minute, against 37 over 6 minutes). Both are from the opening in-engine sequence, not gameplay, and the numbers are for that scene only. Still, an 8.5x gap with unchanged GPU time is hard to put down to noise.
Building it: clone
proton-ge-customat the tag with thewineandwine-stagingsubmodules, run the Wine section ofpatches/protonprep-valve-staging.sh, thentools/make_requests,tools/make_specfiles,dlls/winevulkan/make_vulkanandautoreconf -f. Applyfd66dbc(clean, with offsets), configure, and runmake server/wineserver. Replacefiles/bin/wineserverin the GE install and keep the original. It must come from the same source: GE-Proton11-14's protocol is 938, not stock 11.0's 930.@Foxiquek on GitHub · 2026-11-26 05:25 UTC · original
I've proposed the view-tree patch to GE-Proton so it can ship there without a local build: GloriousEggroll/proton-ge-custom#1016.
@anon31-006459 on GitHub · 2026-11-26 17:07 UTC · original
NVIDIA data point for the view-tree wineserver, and two pitfalls when building it yourself.
Setup: Pop!_OS 24.04, kernel 7.2.15, RTX 3070 Ti 8 GB (NVIDIA 595.104.02, open kernel module), Ryzen 7 3700X, 32 GB RAM. Proton Experimental 11.0-20261112 (its own vkd3d-proton), started through
files/bin/winedirectly. VIctory:fxceless/victory-forkmain + the #1820 recipe, MinGW cross-build, Series S. wineserver built fromValveSoftware/wineexperimental_11.0at5b557605(the protocol matches that Proton build) with the CachyOS view-tree commitfd66dbcaapplied, and nothing else changed.Result, same save and scene, frame-log means over 40 readings:
VICTORY_PIPELINE_WAIT_MS, see fork #1181)The submitting thread went from 616 ms "at work" per frame (80 ms of it on the CPU, the rest blocked) to 123 ms.
Pitfall 1: Proton ignores
WINESERVER. Proton's ntdll runs thewineservernext to its own binaries before it looks at$WINESERVER, so setting the variable silently keeps the stock server. It does connect to a server already running for the prefix, so we start the patched one first:WINEPREFIX=... ./wineserver-viewtree -p10, then launch.Pitfall 2: build it with
MFD_EXECdefined, or mappings go to disk.create_temp_file()inserver/mapping.conly usesmemfd_create#if defined(HAVE_MEMFD_CREATE) && defined(MFD_EXEC). Older headers (we built in a Debian 12 container) don't defineMFD_EXEC, so the server silently falls back to unlinkedtmpmap-*files in/tmp/.wine-$UID/server-*/. The title's physical memory sections then get written back to disk: here 60 MB/s, the NVMe 100 % busy, and 3 to 13 s frames with the card idle. Building withCFLAGS="-O2 -DMFD_EXEC=0x0010U"(the value fromlinux/memfd.h; the kernel needs to be 6.3 or newer) fixes it. Check withls -l /proc/$(pgrep -f wineserver)/fd | grep -c memfd:wine-mapping(non-zero is right;tmpmapentries mean the fallback).AI-assisted (Claude Code, Claude Opus 5.5); all numbers are from runs on my machine. No game data.