Linux wine write watch check #3100
No reviewers
Labels
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!3100
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3100"
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?
@kawaii-shakal on GitHub · 2026-12-02 10:44 UTC · original
kawaii-shakal:linux-wine-write-watch-check→main· +303 −0 · 4 files · 3 commits · merged 2026-12-02 13:50 UTCClaimed in the coordination issue as: LINUX-WINE-WRITE-WATCH-CHECK (#2570)
What and why
Both runtimes keep the title's graphics memory write-watched (
MEM_WRITE_WATCH,d3d12/crates/leonida-hle/src/modules/xmem.rs). Wine answers write watches in one of two ways:PAGEMAP_SCAN, Linux 6.7+): upstream Wine from the 10.7 development release (absent in 10.6 and the stable 10.0), and Proton's Wine;scripts/play-linux.shuses the systemwine, and Ubuntu 24.04 ships 9.0, Debian 13 ships 10.0. The launcher now says so in one line and still starts the game:ntdll.sobesidewinedecides (the kernel path's messages namePAGEMAP_SCAN);ntdll.sofound,wine --versiondecides;LEONIDA_WINE_CHECK=0leaves the line out.docs/linux.mdgets a "Which Wine" section with the measurements, andscripts/write_watch_bench.cmeasures them under any Wine.Tested
Measured on a 4-core cloud VM, Linux 6.18, our own memory only (no game):
PAGEMAP_SCAN: 0.7-0.85 us. Not measured under Wine 10.7+/Proton itself.How many pages a frame writes under Wine was not measured.
Tests:
python3 -I tests/test_play_linux_wine_check.py: 6 tests OK. They cover the versions, the kernel boundary, the ntdll check in the lib / lib64 / Debian multiarch layouts,winereached through a symlink, and the switch.play-linux.shthe new tests fail (12 subtests).test_play_linux.py,test_play_linux_defaults.pyandtest_docs_*.py(57) pass.check_no_game_data.pyis clean on the changed files.sh -nanddash -nare clean.GPUs tested: n/a (no GPU involved)
AI-assisted: yes. Written with Claude Code (Claude Opus 5.5); test runs by Claude Haiku agents; reviewed before opening by a separate read-only reviewer agent on Claude Opus, twice, whose findings were addressed (the 10.7 boundary, ntdll over version, docs wording, layout tests).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
@MoonEyes on GitHub · 2026-12-02 13:20 UTC · original
RUN (independent run on Windows 11 with WSL2 Ubuntu (Linux 6.6, dash, Python 3), #3100 head
811b0c442, merged locally intomainf6dd2242ewithgit merge --no-ff, no conflict)Not the author's run: the tests were run by a separate agent on a different machine. The PR touches
scripts/play-linux.sh, so the POSIX tests were run inside WSL (on native Windows they are skipped, not passed).Red. With
main'sscripts/play-linux.shswapped in (the PR's test file kept),tests/test_play_linux_wine_check.pyfails: 6 tests ran, 13 failures (subtests). File restored afterwards,git statusclean.Green. On the merge:
python3 -I tests/test_play_linux_wine_check.py: 6 tests OKtests/test_play_linux.py(1) andtests/test_play_linux_defaults.py(2): OKtests/test_docs_*.py: passsh -nanddash -n scripts/play-linux.sh: cleancheck_no_game_data.pyon the 4 changed files: cleanMutations of
write_watch_kindinplay-linux.sh, each run against the 6 tests:LEONIDA_WINE_CHECK=0switch ignored: killed (1 failure)lib64ntdll layout removed: killed (2 failures)readlink -f) removed: killed (3 failures)6 of 6 killed.
Merge conditions.
811b0c442: all 5 checks pass (change-scope, check, linux-python-and-viewer, no-game-data, semantic-tests).Depends on.Not covered.
scripts/write_watch_bench.cwas not built or run (no clang-cl/xwin here). The microsecond figures indocs/linux.mdwere not re-measured. No real Wine was launched: the tests use stand-inwine,unameandntdll.so, so whether a given real Wine build containsPAGEMAP_SCANin itsntdll.sois taken from the PR's description. The test file is skipped on native Windows.Verdict: PASS
AI-assisted (Claude Code).
@MoonEyes on GitHub · 2026-12-02 13:21 UTC · original
Merging. Head
811b0c442merges cleanly withmainbf7886746and does not force a rebase of #2566. Independent red/green by MoonEyes' agent on head811b0c442(red: 13 failures with main's play-linux.sh; green: 6 wine-check tests plus the play-linux and docs tests pass in WSL; 6 of 6 mutations of write_watch_kind killed), see #3100, CI green including no-game-data, no open review or question, claimed item LINUX-WINE-WRITE-WATCH-CHECK in #2570. Merged by MoonEyes.AI-assisted (Claude Code).