Play: VICTORY_CARD_CPU_FILE stays off under Wine (opening cutscene lost its first 15 s) #4276
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4276
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4275"
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?
@Saul5662 on GitHub · 2026-11-30 18:04 UTC · original
Saul5662:fix/cpu-file-wine→main· +787 −822 · 34 files · 11 commits · closed without mergingWhat it changes
Since
c71899d9/39ceb0d3,playturnsVICTORY_CARD_CPU_FILE=1on by default: the CPU mirrors of two-sided GPU buffers become temporary files undercache/cpu-mirrors, mapped withCreateFileMappingW/MapViewOfFile. Under Wine those are mapped files on the Linux file system (ext4 here). With them on, the opening police cutscene loses its first ~15 seconds: the dialogue and subtitles play while the picture shows the player standing in the open world, then it jumps to the coffee shop. About 1.5 GB of mirrors are written during the load.This change leaves the switch off when
on_wine()is true (it prints one line saying so) and notes it indocs/windows-memory.md. Linux has no commit limit for the files to relieve, so nothing is lost there. Windows is unchanged.How it was tested
c71899d9added (CARD_ALL,UAV_FOLD,WAIT_SHARE,QUIET_WAITS,TEXTURE_SOFT_MB,LAZY_COMPARE_MB,LAZY_NARROW,TABLE_SAME,CARD_CPU_FILE): all off renders the cutscene; onlyVICTORY_CARD_CPU_FILE=0renders it (3 runs); defaults with it on lose it (3 runs).cache/cpu-mirrorson tmpfs (file mirrors still on): the cutscene renders. So the file-backed mapping on a Linux disk file system is the trigger. Writeback stayed at 0 (the files are deleted on unmap) while dirty pages peaked at ~1.5 GB; my guess is first-write faults on the sparse file, not proven.VICTORY_CARD_CPU_FILE=1set by play): the cutscene renders from the first frame; the log has no "CPU mirrors in temporary file-backed memory" lines.cargo testpassed for the crates it touches: not run (two-line condition inrun.rsplus a doc note); release build checked.Checked for overlap
CARD_CPU_FILE, file-backed mirrors and cutscene skips. None found.AI use: Claude Code (Claude Opus 5.5) bisected the defaults, wrote the change and this text. Label: [pr-fix].
🤖 Generated with Claude Code
@Deilach on GitHub · 2026-11-30 19:45 UTC · original
Independent confirmation from a different setup (RX 9070 XT 16 GB, RADV, CachyOS, GE-Proton11-15, 32 GB RAM,
cacheon btrfs on a QLC NVMe SSD, Intel 660p), on v2026.11.30.02, Series S profile, driving in the open world. Same build and settings; the only intended difference was where thecpu-mirrorsfolder was (a symlink to /dev/shm for the RAM run). It is one person driving roughly the same road, not a scripted route, and the runs are 4-5 minutes long.From 60 s on, frame times by MangoHud:
In run 2 I recorded writes to that SSD (the whole drive, /proc/diskstats): 19 to 33 MB/s on average per minute, up to 213 MB/s, with up to 372 MB of dirty pages. In the tmpfs run it was about 0.1 MB/s. (Run 1 has no write figures.) Run 1 had freezes of 0.5 to 1.9 s; in the two seconds with a freeze that I looked at, the submitting thread's refresh step averaged 151 and 204 ms a frame (32 ms just before) for about the same number of refreshes, and the process's CPU use was lower at the freezes, so it looks like waiting rather than work. I have not traced the kernel side, so this is strong correlation, not proof of the mechanism.
I have not tested the variant in this PR (the switch off under Wine), only the files on tmpfs. The runs also had frame pacing (a local pick of #3851) and
VICTORY_PORT_CONSTANTS=1(a local pick of #2455) on in all three drives, and two local patches (unaligned raw twins, raw typed loads).AI use: Claude Code ran the analysis and wrote this text.
🤖 Generated with Claude Code
@andrewpozdnakov7-jpg on GitHub · 2026-12-01 11:19 UTC · original
I cherry-picked your
39d06a59onto currentmain5fabb46eas2113dcf58f56bf08f93fd6a760319d612e3336cf, preserving your Git authorship. The patch ID matches. This reduces the PR to the two intended files instead of bringing in the divergent base history.The Wine check stays in
run, so it covers the nativevictory playpath and launchers that callvictory run. The script defaults proposed in #4842 complement that and leave the native command unchanged.cargo xtask policy --stagedpassed for both files. I did not rerun the opening on Proton. Your original result and the separate Proton report cover the runtime symptom. The rebased commit is ready for you to adopt here.AI-assisted with OpenAI Codex.
@trustno1-coder on GitHub · 2026-12-01 18:44 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed