Linux wine write watch check #3100
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-12-02T10:44:32Z.
Claimed 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
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T13:20:57Z.
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).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T13:21:31Z.
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 https://github.com/ProjectLeonida/mandy/pull/3100#issuecomment-7346734111, 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).