docs: run the startup experiments under Wine and Proton on Linux #1661

Merged
JohnConnorNPC merged 1 commit from upstream-pr/1668 into main 2026-11-24 16:53:35 +00:00
JohnConnorNPC commented 2026-11-24 16:44:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-24T16:44:38Z.


Change

Adds docs/wine.md, a page for contributors who run the startup stand-ins and debugger under Proton's Wine on a
Linux desktop. It builds on the one-time setup in docs/non-windows-hosts.md#startup-debugger-under-wine and does
not repeat it. The page adds:

  • What a Wine run is: a translation-layer run of research tooling, not Windows verification. Wine-only failures and skips are reported separately.
  • The environment it was measured with: Proton Experimental 11.0, vkd3d-proton with DXVK dxgi, clang-cl/xwin stand-ins, one X11 host. Also covers display handling, one run per prefix, and the shader-cache location.
  • The launch environment: the run.ps1 variable set for Linux shells, why X2W_XMEM_SHARED_VIEWS=1 is needed there, and WINEDEBUG channels for audio.
  • Audio:
    • With XDG_RUNTIME_DIR unset, as the section-backing note recommends, libpulse cannot find the server.
    • Wine then falls back to ALSA and the stream does not reach the desktop's default output.
    • PULSE_SERVER pointing at the user's pipewire-pulse socket fixes it while the variable stays unset.
  • Behaviour seen only under Wine, with measured numbers:
    • Single-page XMemMapPhysicalPages bursts get slower as views accumulate: per-map cost about 28 µs at
      1,000 views and 1.1 ms at 52,000; a source-built caller measured 40 µs per call at the start and 2,140 µs after 50,000 calls.
    • Placeholder replacement is not atomic for concurrent readers (zeros, not a fault).
    • Wine never sets the debug-heap flags for a debugged process. The _NO_DEBUG_HEAP default has no effect there, and the debug-heap control of startup_debug fails under Wine.
  • How to report a run: tools/startup/triage_run.py output only.

Verification

Commit 0647a981 on top of c864f138, Debian 13, Python 3.13.5.

python3 -B tests/docs_links_check.py
python3 -B tests/bidi_controls_check.py
  • docs links: self-test passed, 17 Markdown files and 362 links checked (exit 0).
  • bidi controls: self-test passed, 1277 tracked files checked, no bidirectional controls (exit 0).
  • The page is documentation only. No code, test or build file changes.

Evidence and follow-up

  • The numbers come from local translation-layer runs on one host: Proton experimental-11.0 (Wine 11.0),
    vkd3d-proton, NVIDIA 550.163.01. Raw logs, paths and captures are not attached. Windows was not measured
    for any of the Wine-only items.
  • Two items come from local experiments that are not part of this PR: the source-built 50,000-call mapping
    caller, and the run-extension experiment that showed the non-atomic placeholder replacement. A fixture for the
    mapping-cost curve could follow as its own PR.
  • Under Wine, startup_debug fails its debug-heap control. A capability skip when the flags never appear
    would make that check usable there. That is left for a separate change.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture. (No new fixture.)
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6586812928 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1668). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-24T16:44:38Z. --- ## Change Adds `docs/wine.md`, a page for contributors who run the startup stand-ins and debugger under Proton's Wine on a Linux desktop. It builds on the one-time setup in `docs/non-windows-hosts.md#startup-debugger-under-wine` and does not repeat it. The page adds: - **What a Wine run is:** a translation-layer run of research tooling, not Windows verification. Wine-only failures and skips are reported separately. - **The environment it was measured with:** Proton Experimental 11.0, vkd3d-proton with DXVK `dxgi`, clang-cl/xwin stand-ins, one X11 host. Also covers display handling, one run per prefix, and the shader-cache location. - **The launch environment:** the `run.ps1` variable set for Linux shells, why `X2W_XMEM_SHARED_VIEWS=1` is needed there, and `WINEDEBUG` channels for audio. - **Audio:** - With `XDG_RUNTIME_DIR` unset, as the section-backing note recommends, libpulse cannot find the server. - Wine then falls back to ALSA and the stream does not reach the desktop's default output. - `PULSE_SERVER` pointing at the user's pipewire-pulse socket fixes it while the variable stays unset. - **Behaviour seen only under Wine, with measured numbers:** - Single-page `XMemMapPhysicalPages` bursts get slower as views accumulate: per-map cost about 28 µs at 1,000 views and 1.1 ms at 52,000; a source-built caller measured 40 µs per call at the start and 2,140 µs after 50,000 calls. - Placeholder replacement is not atomic for concurrent readers (zeros, not a fault). - Wine never sets the debug-heap flags for a debugged process. The `_NO_DEBUG_HEAP` default has no effect there, and the debug-heap control of `startup_debug` fails under Wine. - **How to report a run:** `tools/startup/triage_run.py` output only. ## Verification Commit 0647a981 on top of c864f138, Debian 13, Python 3.13.5. ```bash python3 -B tests/docs_links_check.py python3 -B tests/bidi_controls_check.py ``` - docs links: self-test passed, 17 Markdown files and 362 links checked (exit 0). - bidi controls: self-test passed, 1277 tracked files checked, no bidirectional controls (exit 0). - The page is documentation only. No code, test or build file changes. ## Evidence and follow-up - The numbers come from local translation-layer runs on one host: Proton experimental-11.0 (Wine 11.0), vkd3d-proton, NVIDIA 550.163.01. Raw logs, paths and captures are not attached. Windows was not measured for any of the Wine-only items. - Two items come from local experiments that are not part of this PR: the source-built 50,000-call mapping caller, and the run-extension experiment that showed the non-atomic placeholder replacement. A fixture for the mapping-cost curve could follow as its own PR. - Under Wine, `startup_debug` fails its debug-heap control. A capability skip when the flags never appear would make that check usable there. That is left for a separate change. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. (No new fixture.) - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 17:01:58 +00:00
tedin7 commented 2026-11-24 17:01:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T16:51:46Z.

Review: COMMENTED


Reviewed head 0647a98157 (new docs/wine.md, docs only).

  • Every repo path and name cited exists: tools/startup/run.ps1, debug_launch.py, triage_run.py (--shader-cache flag present), tests/startup_triage_run_check.py, CMake tests startup_debug, xmem_shim_mapped_pages, xmem_shim_page_runs, target startup_debug_probe, presets dev/release.
  • The run.ps1 variable set (AUDIO_PERMISSIVE, D3D12_DEVICE_NOOP, D3D12_LIST_NOOP, D3D12_PERMISSIVE, XMEM_PERMISSIVE, RUNTIME_PROXY) matches run.ps1 lines 36-37; the -Render/-FakeUser/-GpuMirror/-HostCpu switches exist. _NO_DEBUG_HEAP default matches debug_launch.py; the debug-heap control exists in tests/startup_debug_check.py.
  • The 42.9 s / 82 ms / 100,000 pages figures match docs/startup-runtime.md; section-backing and XDG_RUNTIME_DIR advice is consistent with docs/non-windows-hosts.md. All cross-doc anchors resolve.
  • Wine-only timings and audio counts are the author's local measurements (stated as such, with Windows not measured); not re-run here.
  • No game names, dumps, distribution links, private paths or tool names.

Commands executed locally in a checkout of the head:
git diff --check origin/main...HEAD -> clean
python3 tests/docs_links_check.py -> self-test passed, 17 files, 362 links
python3 tests/bidi_controls_check.py -> passed, 1277 files, no bidi controls
CI: all required checks successful, mergeable CLEAN.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6043617254 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1668#pullrequestreview-6043617254). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T16:51:46Z. **Review:** COMMENTED --- Reviewed head 0647a981575228c810d687c985f71e47baaa245d (new docs/wine.md, docs only). - Every repo path and name cited exists: tools/startup/run.ps1, debug_launch.py, triage_run.py (--shader-cache flag present), tests/startup_triage_run_check.py, CMake tests startup_debug, xmem_shim_mapped_pages, xmem_shim_page_runs, target startup_debug_probe, presets dev/release. - The run.ps1 variable set (AUDIO_PERMISSIVE, D3D12_DEVICE_NOOP, D3D12_LIST_NOOP, D3D12_PERMISSIVE, XMEM_PERMISSIVE, RUNTIME_PROXY) matches run.ps1 lines 36-37; the -Render/-FakeUser/-GpuMirror/-HostCpu switches exist. _NO_DEBUG_HEAP default matches debug_launch.py; the debug-heap control exists in tests/startup_debug_check.py. - The 42.9 s / 82 ms / 100,000 pages figures match docs/startup-runtime.md; section-backing and XDG_RUNTIME_DIR advice is consistent with docs/non-windows-hosts.md. All cross-doc anchors resolve. - Wine-only timings and audio counts are the author's local measurements (stated as such, with Windows not measured); not re-run here. - No game names, dumps, distribution links, private paths or tool names. Commands executed locally in a checkout of the head: git diff --check origin/main...HEAD -> clean python3 tests/docs_links_check.py -> self-test passed, 17 files, 362 links python3 tests/bidi_controls_check.py -> passed, 1277 files, no bidi controls CI: all required checks successful, mergeable CLEAN. AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1661
No description provided.