Terminated ./run.sh play #95

Closed
opened 2026-12-01 18:46:23 +00:00 by github-bot · 8 comments
Owner

@⁠MrRage18 on GitHub · 2026-12-01 18:44 UTC · original

Runs the program window pops up black then closes and outputs zsh: terminated ./run.sh play

**@⁠MrRage18** on GitHub · 2026-12-01 18:44 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95) Runs the program window pops up black then closes and outputs zsh: terminated ./run.sh play
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 18:46:24 +00:00
Author
Owner

@⁠MrRage18 on GitHub · 2026-12-01 18:48 UTC · original

I did compile shaders

**@⁠MrRage18** on GitHub · 2026-12-01 18:48 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7321595604) I did compile shaders
Author
Owner

@⁠MrRage18 on GitHub · 2026-12-01 19:03 UTC · original

Screenshot_2026-12-01_19-02-10
**@⁠MrRage18** on GitHub · 2026-12-01 19:03 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7322096685) <img width="1721" height="963" alt="Screenshot_2026-12-01_19-02-10" src="https://github.com/user-attachments/assets/466fe190-2596-4dfe-94c5-60269a30bf35" />
Author
Owner

@⁠MrRage18 on GitHub · 2026-12-01 19:17 UTC · original

i am running RX 6600 ryzen 5 5500 with 16 gb ram could just be not enough ram :(

**@⁠MrRage18** on GitHub · 2026-12-01 19:17 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7322542093) i am running RX 6600 ryzen 5 5500 with 16 gb ram could just be not enough ram :(
Author
Owner

@⁠samdesbois on GitHub · 2026-12-01 19:32 UTC · original

you can follow you'r ram status using 'htop'* linux command and sees if you're computer is using swap. On another port, using my swap wouldn't make the game crash. I haven't tested this repo yet but soon.

*: You may need to install it manually from your distro repos.

**@⁠samdesbois** on GitHub · 2026-12-01 19:32 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7322979192) you can follow you'r ram status using 'htop'* linux command and sees if you're computer is using swap. On another port, using my swap wouldn't make the game crash. I haven't tested this repo yet but soon. *: You may need to install it manually from your distro repos.
Author
Owner

@⁠EdouardSence on GitHub · 2026-12-01 21:36 UTC · original

On a 16 GB machine this is very likely run.sh's memory cap and not a crash in the game. zsh: terminated is what you get when the systemd scope that run.sh starts the game in goes over its MemoryMax.

run.sh sets the cap to MemAvailable - KEEP_FREE (8192 MiB by default) and never goes below 2048 MiB:

cap=$((avail-${KEEP_FREE:-8192}))      # run.sh:51
...
systemd-run --user --scope ... -p "MemoryMax=${cap}M" -p MemorySwapMax=2G

With 16 GB and a desktop running, MemAvailable is usually 10-12 GB, so the cap lands around 2-4 GB. For comparison, on my 32 GB machine (RX 9070 XT, Series X, defaults) system RAM in use went from 6.0 to 19.8 GB while playing: the game used about 13.8 GB. A 2-4 GB cap gets the scope killed as soon as the world loads, which matches "window pops up black then closes".

Things to try, in order:

  1. Check that this is the cause: journalctl --user -b | grep -i -E 'um-play|oom|memory' right after it closes should show the scope being killed.
  2. KEEP_FREE=1024 ./run.sh play keeps only 1 GiB free instead of 8. Close the browser and Discord first.
  3. CONSOLE=series-s (Series S profile) needs less memory than Series X.
  4. Have a swap file or zram. The scope may use 2 GiB of swap (MemorySwapMax=2G).

Even so, 16 GB is tight for this. PR #93 adds a warning to run.sh when the cap comes out under 12 GiB, which would at least make this visible instead of a bare terminated.

**@⁠EdouardSence** on GitHub · 2026-12-01 21:36 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7326522783) On a 16 GB machine this is very likely `run.sh`'s memory cap and not a crash in the game. `zsh: terminated` is what you get when the systemd scope that `run.sh` starts the game in goes over its `MemoryMax`. `run.sh` sets the cap to `MemAvailable - KEEP_FREE` (8192 MiB by default) and never goes below 2048 MiB: ```sh cap=$((avail-${KEEP_FREE:-8192})) # run.sh:51 ... systemd-run --user --scope ... -p "MemoryMax=${cap}M" -p MemorySwapMax=2G ``` With 16 GB and a desktop running, `MemAvailable` is usually 10-12 GB, so the cap lands around 2-4 GB. For comparison, on my 32 GB machine (RX 9070 XT, Series X, defaults) system RAM in use went from 6.0 to 19.8 GB while playing: the game used about 13.8 GB. A 2-4 GB cap gets the scope killed as soon as the world loads, which matches "window pops up black then closes". Things to try, in order: 1. Check that this is the cause: `journalctl --user -b | grep -i -E 'um-play|oom|memory'` right after it closes should show the scope being killed. 2. `KEEP_FREE=1024 ./run.sh play` keeps only 1 GiB free instead of 8. Close the browser and Discord first. 3. `CONSOLE=series-s` (Series S profile) needs less memory than Series X. 4. Have a swap file or zram. The scope may use 2 GiB of swap (`MemorySwapMax=2G`). Even so, 16 GB is tight for this. PR #93 adds a warning to `run.sh` when the cap comes out under 12 GiB, which would at least make this visible instead of a bare `terminated`.
Author
Owner

@⁠MrRage18 on GitHub · 2026-12-01 22:39 UTC · original · edited 2026-12-02 00:15 UTC

getting same issue just different error now also tried the KEEP_FREE=1024

Screenshot_2026-12-01_19-47-19
**@⁠MrRage18** on GitHub · 2026-12-01 22:39 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7328158877) · edited 2026-12-02 00:15 UTC getting same issue just different error now also tried the KEEP_FREE=1024 <img width="1909" height="950" alt="Screenshot_2026-12-01_19-47-19" src="https://github.com/user-attachments/assets/edd5c019-ee44-4055-921e-1fdfa47681cb" />
Author
Owner

@⁠MrRage18 on GitHub · 2026-12-01 22:41 UTC · original

Screenshot_2026-12-01_19-49-44
**@⁠MrRage18** on GitHub · 2026-12-01 22:41 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7328201543) <img width="1906" height="313" alt="Screenshot_2026-12-01_19-49-44" src="https://github.com/user-attachments/assets/b251c4c4-ce4a-4f44-aa2d-dfc786808460" />
Author
Owner

@⁠EdouardSence on GitHub · 2026-12-02 07:49 UTC · original

Correction to my comment above: I tested the memory-cap theory and it does not hold up.

I forced the smallest cap run.sh allows (KEEP_FREE=100000 ./run.sh play gives MemoryMax=2048M and MemorySwapMax=2G) on my machine (RX 9070 XT, 32 GB, 37bb30f, Proton-CachyOS). The game was not killed. It loaded the save and ran in the world for 5 minutes at 28-32 fps with 6,000-9,000 draws, until my timeout stopped it. The journal shows the scope starting and ending normally, with no OOM entry.

So most of the game's memory is not charged to that scope's limit, or is reclaimed without a kill. A 2-4 GB cap on a 16 GB machine does not by itself explain zsh: terminated. Please ignore the KEEP_FREE advice as the fix. The journalctl --user -b | grep -i -E 'um-play|oom' check is still a cheap way to rule it in or out, and dmesg | grep -i oom would show the kernel's own OOM killer if the whole machine ran out.

Sorry for the noise.

**@⁠EdouardSence** on GitHub · 2026-12-02 07:49 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/95#issuecomment-7338648709) Correction to my comment above: I tested the memory-cap theory and it does not hold up. I forced the smallest cap `run.sh` allows (`KEEP_FREE=100000 ./run.sh play` gives `MemoryMax=2048M` and `MemorySwapMax=2G`) on my machine (RX 9070 XT, 32 GB, `37bb30f`, Proton-CachyOS). The game was **not** killed. It loaded the save and ran in the world for 5 minutes at 28-32 fps with 6,000-9,000 draws, until my `timeout` stopped it. The journal shows the scope starting and ending normally, with no OOM entry. So most of the game's memory is not charged to that scope's limit, or is reclaimed without a kill. A 2-4 GB cap on a 16 GB machine does **not** by itself explain `zsh: terminated`. Please ignore the `KEEP_FREE` advice as the fix. The `journalctl --user -b | grep -i -E 'um-play|oom'` check is still a cheap way to rule it in or out, and `dmesg | grep -i oom` would show the kernel's own OOM killer if the whole machine ran out. Sorry for the noise.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#95
No description provided.