run: support systems without a systemd user manager #337
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!337
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-337"
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?
@loyodea on GitHub · 2026-12-03 17:08 UTC · original
loyodea:fix/251-init-system-support→main· +267 −14 · 8 files · 2 commits · openBuild and game launch now work with dinit, OpenRC, runit, or an unavailable systemd user manager. A shared user-scope probe retains the existing systemd memory limits when available; otherwise the launchers run directly with a warning that the cgroup memory cap is unavailable. Setup no longer requires
systemd-run, and restart skipssystemctlwhen no scope was used. Optional sleep inhibition and the Wine namespace remain.Integrated upstream’s new GPU memory guard: when explicitly enabled for a detected AMD GPU, it requires a working systemd user scope and
systemctl; otherwise startup refuses with instructions instead of starting an ineffective guard. Normal launches without the guard keep the init-independent fallback.Validation: eighteen game-free launcher checks pass in Git Bash, covering missing and unusable systemd, retained memory properties, arguments with spaces, environment, stdin, exit status, no retry after scope launch failure, Proton/Wine paths, optional inhibition, restart, duplicate-run rejection, and synthetic GPU guard cases (both guard names, explicit disabling, unusable scope, and missing
systemctl). The original launchers fail the same harness with missingsystemd-run(exit 127). Individualbash -nchecks andgit diff --checkpass.Actual Linux service managers and game runtime were not tested in this Windows environment.
Fixes #251.
github-bot referenced this pull request2026-12-04 01:44:02 +00:00
github-bot referenced this pull request2026-12-04 01:44:04 +00:00
@Luxuride on GitHub · 2026-12-04 12:02 UTC · original
This is the smallest, best-tested PR in this batch and the one I would take today: 267 lines,
bash tests/launchers.shcovers ~20 fixture checks without a game, and the guard fails closed with a message that tells the user what to do.One regression to fix before it lands: the single-run guard is lost with the scope.
run.sh:40-46detects an already-running session only by listingum-*.scopeunits, so on dinit/OpenRC/runit two runs can start at once — exactly the "Access denied (os error 5)" failure documented two lines above, where the second run's exit kills the first's wineserver. A pidfile/lockfile under$state/runbelongs in this PR; it is the only regression a non-systemd user will actually hit.Two smaller ones:
scopeis a bare global array (env.sh:61-70) consumed as"${scope[@]}"inbuild.sh:46, whichset -urejects on bash < 4.4 when it is empty — use${scope[@]+"${scope[@]}"}. And it is worth saying in the body that the guard now hard-exits rather than running unguarded, so an APU user withVICTORY_GPU_GUARD=1gets "not started" until they disable it.On the competing implementation: this is the better base — clean merge, real harness — so the hand-attached cgroup approach would only be a follow-up if someone insists on keeping the cap without systemd.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.