TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded retail run under Wine with a counts-only summary #1819

Manually merged
github merged 1 commit from gh-pr/1819/head into gh-pr/1819/base 2026-11-26 10:07:05 +00:00
Owner

@⁠aslan2142 on GitHub · 2026-11-25 12:32 UTC · original
aslan2142:tools-wine-game-run → main · +926 −1 · 7 files · 1 commits · merged 2026-11-25 12:37 UTC

Claim: TOOLS-WINE-GAME-RUN (#1608)

What

scripts/run_game_wine.sh runs gta6rt.exe --run once under Wine on Linux, with the startup and D3D12 traces on.

  • Display: headless on a private kwin_wayland --virtual --xwayland session, or on the current display with --visible. Xvfb has no DRI3, so RADV can't present there.
  • Sound: off. Wine's audio drivers are disabled, and LEONIDA_AUDIO=silent makes the runtime serve the silent output endpoint from #1598.
  • Device: --device VID:DID pins the Vulkan device (MESA_VK_DEVICE_SELECT). Without it, the script warns that Mesa picks one.
  • Bounds: a time limit, a lock (one run at a time) and full teardown on exit or a signal. LEONIDA_* variables pass through, LEONIDA_INPUT_SCRIPT included.
  • Screenshots: --screenshot-every S captures the game window into the run folder. The shots are game content and stay local.
  • Paths: they come from options or environment (--build, --exe, --game-dir, --shaders, --out); nothing is user-specific.

tools/game_run_summary.py prints counts only and never a log line: run time, how the run ended, exceptions, D3D12 calls by outcome, presents, the top failing calls, and log categories with digits masked. The summary can be shared in issues; the run folder's own logs may quote what the title prints and stay local.

Why

There was no repeatable way to run the retail game under Wine and share the result safely. This complements #851 (the optional native launcher to check, build and start the port) and scripts/run_wine_session.sh (unit tests under Wine).

Tested

  • tests/test_run_game_wine.py (9 cases): the script against stub wine/setsid, with no Wine or game. It covers bash -n, --help, missing and wrong arguments, the missing-kwin_wayland message, no DISPLAY, a held lock, and a whole --visible run.
  • tests/test_game_run_summary.py (8 cases): synthetic run folders, including a check that planted log text is never echoed.
  • Repository checks: all tests/test_docs_*.py, test_text_write_line_endings, test_ci_registration, test_ctest_registration and test_shell_launchers pass, as do compileall and check_no_game_data.py.
  • One real 120 s --visible run of the retail 1.0.2.1 package on main 0d80bc5df: 3,752 presents, the silent endpoint served, 4 failed CreatePipelineState calls, stopped at the limit.

GPUs tested: AMD Radeon RX 7900 XTX, Mesa RADV, Wine 11.22 (Staging), Arch Linux (kernel 7.3, zen).

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 12:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1819) `aslan2142:tools-wine-game-run` → `main` · +926 −1 · 7 files · 1 commits · merged 2026-11-25 12:37 UTC Claim: `TOOLS-WINE-GAME-RUN` (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What `scripts/run_game_wine.sh` runs `gta6rt.exe --run` once under Wine on Linux, with the startup and D3D12 traces on. - **Display:** headless on a private `kwin_wayland --virtual --xwayland` session, or on the current display with `--visible`. Xvfb has no DRI3, so RADV can't present there. - **Sound:** off. Wine's audio drivers are disabled, and `LEONIDA_AUDIO=silent` makes the runtime serve the silent output endpoint from #1598. - **Device:** `--device VID:DID` pins the Vulkan device (`MESA_VK_DEVICE_SELECT`). Without it, the script warns that Mesa picks one. - **Bounds:** a time limit, a lock (one run at a time) and full teardown on exit or a signal. `LEONIDA_*` variables pass through, `LEONIDA_INPUT_SCRIPT` included. - **Screenshots:** `--screenshot-every S` captures the game window into the run folder. The shots are game content and stay local. - **Paths:** they come from options or environment (`--build`, `--exe`, `--game-dir`, `--shaders`, `--out`); nothing is user-specific. `tools/game_run_summary.py` prints counts only and never a log line: run time, how the run ended, exceptions, D3D12 calls by outcome, presents, the top failing calls, and log categories with digits masked. The summary can be shared in issues; the run folder's own logs may quote what the title prints and stay local. ### Why There was no repeatable way to run the retail game under Wine and share the result safely. This complements #851 (the optional native launcher to check, build and start the port) and `scripts/run_wine_session.sh` (unit tests under Wine). ### Tested - **`tests/test_run_game_wine.py`** (9 cases): the script against stub `wine`/`setsid`, with no Wine or game. It covers `bash -n`, `--help`, missing and wrong arguments, the missing-`kwin_wayland` message, no `DISPLAY`, a held lock, and a whole `--visible` run. - **`tests/test_game_run_summary.py`** (8 cases): synthetic run folders, including a check that planted log text is never echoed. - **Repository checks:** all `tests/test_docs_*.py`, `test_text_write_line_endings`, `test_ci_registration`, `test_ctest_registration` and `test_shell_launchers` pass, as do `compileall` and `check_no_game_data.py`. - **One real 120 s `--visible` run** of the retail 1.0.2.1 package on `main` `0d80bc5df`: 3,752 presents, the silent endpoint served, 4 failed `CreatePipelineState` calls, stopped at the limit. GPUs tested: AMD Radeon RX 7900 XTX, Mesa RADV, Wine 11.22 (Staging), Arch Linux (kernel 7.3, zen). AI-assisted (Claude Code, Claude Opus 5.5).
The launcher runs gta6rt.exe --run once under Wine on Linux, headless on a
private kwin_wayland --virtual --xwayland session (Xvfb has no DRI3, so RADV
cannot present there) or on the current display with --visible. Sound is off
(Wine's audio drivers disabled, Pulse/PipeWire/ALSA pointed at nothing,
LEONIDA_AUDIO=silent for the runtime's silent output endpoint), --device pins
the Vulkan device through MESA_VK_DEVICE_SELECT, and a hard time limit, a lock
and full teardown bound the run. Every path comes from arguments or the
environment.

tools/game_run_summary.py prints counts only: run time, end, exceptions by
code, D3D12 calls by outcome, presents, the top failing calls and the [rt]
lines by category with numbers masked. It never prints a log line.

Tests need no game, Wine or GPU: the script against stubs, the summary on
synthetic run folders. docs/linux_proton.md describes the script.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:07:02 +00:00
github manually merged commit 597cf76623 into gh-pr/1819/base 2026-11-26 10:07:05 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 12:37 UTC · original

Merged, so anyone on Linux can do a bounded retail run under Wine with one command and share a counts-only summary.

  • scripts/run_game_wine.sh: headless or --visible, sound off (Wine's audio drivers disabled, LEONIDA_AUDIO=silent), --device to pin the Vulkan device, a time limit, a lock, teardown, and optional local-only screenshots.
  • tools/game_run_summary.py prints counts only, never a log line; the run folder's logs stay local.
  • Usage is in docs/linux_proton.md.
  • Checked on main 0d80bc5df + 597cf7662: the semantic suite passes (489 files, 6,288 tests, 0 files failed); test_game_run_summary, test_run_game_wine pass; the 14 docs and writer tests pass; check_no_game_data.py is clean on the 7 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 12:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1819#issuecomment-7162626895) Merged, so anyone on Linux can do a bounded retail run under Wine with one command and share a counts-only summary. - `scripts/run_game_wine.sh`: headless or `--visible`, sound off (Wine's audio drivers disabled, `LEONIDA_AUDIO=silent`), `--device` to pin the Vulkan device, a time limit, a lock, teardown, and optional local-only screenshots. - `tools/game_run_summary.py` prints counts only, never a log line; the run folder's logs stay local. - Usage is in `docs/linux_proton.md`. - **Checked on `main` `0d80bc5df` + `597cf7662`:** the semantic suite passes (489 files, 6,288 tests, 0 files failed); `test_game_run_summary`, `test_run_game_wine` pass; the 14 docs and writer tests pass; `check_no_game_data.py` is clean on the 7 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.