upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/linux_proton.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/linux_proton.md')
-rw-r--r--docs/linux_proton.md55
1 files changed, 52 insertions, 3 deletions
diff --git a/docs/linux_proton.md b/docs/linux_proton.md
index f98aacf14..de4760d70 100644
--- a/docs/linux_proton.md
+++ b/docs/linux_proton.md
@@ -53,12 +53,61 @@ the layout the comments at their top describe (`/opt/leonida` for traces, overla
53 `__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1`. 53 `__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1`.
54- **Input:** a pad through GameInput/SDL3, or the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), or a script: 54- **Input:** a pad through GameInput/SDL3, or the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), or a script:
55 `LEONIDA_INPUT_SCRIPT=a@210,a@240` presses A at those seconds (any length since this branch; it was cut at 63 55 `LEONIDA_INPUT_SCRIPT=a@210,a@240` presses A at those seconds (any length since this branch; it was cut at 63
56 characters before). 56 characters before). The script also works in a build without SDL3, where it drives one scripted pad
57 ([docs/gameinput.md](gameinput.md#scripted-input-without-sdl3)); pads and the keyboard pad need SDL3.
57- **Window:** frames are presented in the title's own window; `LEONIDA_PRESENT_WINDOW=own|hidden` chooses otherwise. 58- **Window:** frames are presented in the title's own window; `LEONIDA_PRESENT_WINDOW=own|hidden` chooses otherwise.
58 59
59Three setup mistakes each give a blank or empty picture without an error: the executable's embedded shaders missing 60Three setup mistakes each give a blank or empty picture without an error: the executable's embedded shaders missing
60from the library (`exe/index.json`), a build without SDL3 (no pad), and a BCPack predictor file that was never 61from the library (`exe/index.json`), a build without SDL3 and without `LEONIDA_INPUT_SCRIPT` (no pad, so nothing
61generated (`tools/build_dstorage_history.py`; without it the loading art and most BC7 textures stay empty). 62gets past the first prompt; set a script, or build with SDL3 for a pad or the keyboard pad), and a BCPack predictor
63file that was never generated (`tools/build_dstorage_history.py`; without it the loading art and most BC7 textures
64stay empty).
65
66## Running the game under Wine with one command
67
68`scripts/run_game_wine.sh` makes one bounded, silent run of the retail game under Wine and prints counts only. It
69complements `scripts/run_wine_session.sh` (the runtime's unit tests under Wine) and the `systemd --user` boot
70wrappers described above: it needs no fixed paths, and its output is a summary that can go into an issue.
71
72```sh
73scripts/run_game_wine.sh --build <build folder or checkout> --exe <game executable> --game-dir <package folder> \
74 --shaders <translated library> --out <new run folder> --device 1002:744c --seconds 600
75```
76
77`--help` lists every input. Each path comes from an argument or from `LEONIDA_GAME_EXE`, `LEONIDA_GAME_DIR` and
78`LEONIDA_SHADERS`; `WINE` names another Wine (Proton's `files/bin/wine`), and `WINEPREFIX` (or `--prefix`) a prefix to
79reuse instead of a new one in the run folder.
80
81What it needs:
82
83- **Wine** (the `wine` on `PATH`, or `WINE`), `timeout`, `flock`, `setsid` and Python 3.
84- **A Vulkan driver** for the GPU (Mesa's RADV was tested). `--device VID:DID` pins it through
85 `MESA_VK_DEVICE_SELECT`; without it the script warns that Mesa picks the device.
86- **A display.** By default the run is headless: a private `kwin_wayland --virtual --xwayland` session under
87 `dbus-run-session`, with its own `XDG_RUNTIME_DIR` in the run folder, so nothing appears on the desktop. Its
88 rootless Xwayland offers DRI3, which RADV needs to present; Xvfb has none, so without `kwin_wayland` the script
89 says what is missing instead of falling back. `--visible` opens the window on the current `DISPLAY` instead.
90- **A runtime build**: a folder with `gta6rt.exe` and `gta6rt_tls_host.dll`, or a checkout, whose `runtime/` it
91 cross-builds first with clang-cl and xwin (`XWIN_DIR`, see [linux.md](linux.md#the-runtime-under-wine-or-proton)).
92
93What it does:
94
95- **Sound off:** Wine's audio drivers are disabled through `WINEDLLOVERRIDES`, PulseAudio, PipeWire and ALSA point
96 at nothing, and `LEONIDA_AUDIO=silent` makes the runtime serve its silent output endpoint
97 ([runtime_imports.md](runtime_imports.md)); the summary says whether it was served.
98- **Limits:** a hard time limit (`--seconds`, then SIGTERM and SIGKILL 10 s later), a lock so one run happens at a
99 time (`--lock`, by default in `XDG_RUNTIME_DIR`), and teardown of Wine and the whole session on exit, time-out or
100 signal.
101- **Traces:** `gta6rt --run` with `--trace` and `--trace-d3d12`, a fresh `--overlay` and save folder in the run
102 folder. Every other `LEONIDA_*` variable reaches the runtime unchanged, so `LEONIDA_INPUT_SCRIPT=a@210,a@240`
103 presses A as above. Arguments after `--` go to `gta6rt`.
104- **Summary:** `tools/game_run_summary.py` prints the run time, how it ended, exceptions by code, D3D12 calls by
105 outcome, presents, the most frequent failing calls and the `[rt]` lines by category with numbers masked. It never
106 prints a log line. `--screenshot-every S` captures the game window into the run folder (ImageMagick's `import` and
107 `xprop`).
108
109The run folder's `stderr.log`, `boot.jsonl` and screenshots can show or quote what the title prints, so they stay on
110your machine; share the summary.
62 111
63## What a healthy boot looks like (Linux machine) 112## What a healthy boot looks like (Linux machine)
64 113