mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #1251] [CLOSED] scripts: boot the loader under Wine or Proton from a checkout (LINUX-PROTON-DOCS-SCRIPTS) #1283
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1283
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1251
Author: @Moriz82
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:split/linux-proton-docs-scripts📝 Commits (1)
ed8309ascripts: boot the loader under Wine or Proton from a checkout (LINUX-PROTON-DOCS-SCRIPTS)📊 Changes
7 files changed (+293 additions, -133 deletions)
View changed files
📝
docs/README.md(+1 -0)📝
docs/linux_proton.md(+70 -28)📝
scripts/linux-boot/boot-digest.sh(+33 -33)📝
scripts/linux-boot/boot-inner.sh(+10 -10)📝
scripts/linux-boot/boot.sh(+40 -26)📝
scripts/linux-boot/run-boot.sh(+48 -36)➕
tests/test_linux_boot_scripts.py(+91 -0)📄 Description
Claimed in the coordination issue as: LINUX-PROTON-DOCS-SCRIPTS (claim).
Part of the split of #984 into small pull requests.
Depends on: none
Overlaps: none found.
docs/linux.mdand the README's Running the loader on Linux cover the build and<out>/gta6rt.sh, andscripts/run_wine_session.shruns the CI tests. This child adds the boot scripts of #984 and one page for them, and repeats neither.What and why
scripts/linux-bootis for someone who boots the loader on Linux again and again while working on the runtime, straight from a checkout, and wants to know afterwards what happened:configure-worktree.sh <checkout>configures the clang-cl and xwin cross-build inruntime/build/boot(SDL3_SRCmakes it work offline).boot.sh dry-run|init|run [seconds]starts the loader under Wine or Proton insideunshare -rn, a new user and network namespace that needs no root, so the title has no network at all. It sets the Vulkan backend and the shader library, moves NVIDIA's shader disk cache out of the way and raises its limit, and writes the startup and D3D12 traces with theirtools/boot_trace.pysummary.run-boot.sh <name> <gta6rt.exe> [seconds] [KEY=VALUE ...]runs that as asystemd --userunit: it waits for memory headroom, holds a GPU lock and a build lock for the whole boot, samples RAM, swap, the unit's memory and VRAM every 2 s, and afterwards writes a digest (verdict, counts from the trace, captured frames, memory peaks, kernel OOM and GPU events, every distinct error line with its count). The digest is written also when the kernel orsystemd-oomdkilled the boot.Everything the scripts produce goes to
LEONIDA_BOOT_DIR, outside the repository.docs/linux_proton.mdis the page, with one row indocs/README.md.What changed against the scripts in #984
LEONIDA_GAME_DIR,LEONIDA_SHADERSandLEONIDA_BOOT_DIR. A missing one is refused with one line before anything starts.mainhas. The input script (#1074), the title's own window, the pipeline cache directory and checkpoints, the source-frame capture and the device-type default are gone from the scripts, and so are the digest counters for log lines thatmaindoes not print.tr -d "\x27", which GNUtrtakes as the charactersx,2and7: a failed unit's result became'eit-code', matched no case, and the verdict stayedOK. And the digest unit stopped waiting as soon as the boot unit began to deactivate, before systemd had logged the result. It now waits for the unit to end and also uses the loader's exit code.wine), and the page says in bold to use one Wine per prefix. In #984boot.shdefaulted towineandrun-boot.shto Proton. I made exactly that mistake while testing this child: oneboot.shrun used the distribution's Wine 11.22 on the Proton prefix. A Proton prefix links to files inside the Proton installation, and the other Wine's prefix update wrote through those links: about 1,200 of Proton's own files were overwritten, and from then on every Proton start on this machine failed (its services could not create the device manager).winedbg.exe=d). In that broken state,winedbgstarted for a crashing Wine service crashed as well and was started again for itself, about ten thousand times, until memory and swap were full. That happened twice before the cause was found. With the override a crashing process just ends; the loader's own trace still records the title's exceptions.maindoes. #984's version was a test report of that branch: a boot timeline, three machines, the list of what the branch changes and where it stops. None of that holds formain, so none of it is here; it belongs with the children that bring those changes.runtime/test/xmem_test.cppthat the split map counted under this topic (it belongs to the xmem children), and the fork's own sync script.Tested
CachyOS (Arch), kernel 7.3.5, Proton Experimental (Wine 11.0), Ryzen 5 5600X, 16 GB RAM, NVIDIA GeForce RTX 4070 12 GB (driver 620.73.04), clang-cl 23.1.5 with an xwin SDK, Ninja, ccache, bash 5, systemd user session. On
main6293c1c4fwith this child:gta6rt.exeandgta6rt_tls_host.dll).boot.sh dry-runandboot.sh init: exit 0, traces and summary written.run-boot.shwith a 60 s limit: onmainthe title stops within seconds with an exception of its own, after creating its device, command queue, a descriptor heap and its first resources. The digest saysEXITED WITH ERROR, unit resultexit-code, andrun-boot.shexits 1. This was run several times while the scripts changed. The earlier runs stopped about 6 s in at a breakpoint exception (0x80000003). The run on the final tree stopped after 2 s with an access violation, but that run was made after the Proton installation had been damaged as described above, so it says nothing aboutmain. Wheremainstops is not established here; what is checked is that the scripts report it.run-boot.shwith a 3 s limit (before the damage and again on the final tree): the loader is stopped at the limit, the digest saysOK (ran its full time limit),run-boot.shexits 0. One line per boot is appended toboots.tsv.gta6rt_tls_host.dll, a missing shader library, a name with a space, an unknown mode): each is refused with exit 2 and creates nothing.tests/test_linux_boot_scripts.py(new): 3 tests pass. It checks that the five scripts parse (bash -n), are executable, have LF line endings, and refuse wrong input before they create a folder or start anything. With one check removed fromboot.shthe test fails. It needs no Wine, no systemd unit and no game files, and skips itself outside Linux.tests/the wayci.ymlruns them: 521 files, 520 pass.tests/test_imhex_patterns.pyfails, as it does on the base commit.python3 -I scripts/check_no_game_data.py: passes.Not run: any other distribution, plain Wine instead of Proton, an AMD or Intel GPU (the sampler's VRAM columns come from
nvidia-smiand hold?without it), a boot that reaches a picture (maindoes not get there on this machine), and a clean run of theKILLED BY OOMverdict (it appeared once, when the debugger incident above exhausted memory during a boot, but that path was not tested on purpose), and a boot on a repaired Proton installation after the final change (the final-tree boots ran in the damaged one).shellcheckis not installed on this machine; the scripts were checked withbash -nonly. The translator suite was not run: no tool or runtime file changes.GPUs tested: NVIDIA GeForce RTX 4070 (the scripts only start the loader; nothing here is GPU code).
AI-assisted: yes (Claude Code).
Checklist
main(6293c1c4f). One topic: scripts, their page and their test. No runtime or translator code.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.