RTX 4060 Ti 16 GB, runs 18–23: memory.c budget-lock fix (no Xid 13 since), swap lets runs reach 51 min, Xid 109 is rarer but not gone, preload works on Linux #7

Open
opened 2026-12-03 19:42:30 +00:00 by github-bot · 0 comments
Owner

@⁠leonpersi on GitHub · 2026-12-03 19:38 UTC · original

Follow-up to my earlier RTX 4060 Ti report (runs 1–17). Same PC: RTX 4060 Ti 16 GB (PCIe 4.0 x8), NVIDIA 620.73.04 open module, Ryzen 7 7700, 30 GiB RAM + 30 GiB zram, CachyOS 7.3.6, KDE Wayland. Same code: kc/trustno1 @ 6131ceb, Proton Experimental 11.0-20261123b with your views-rbtree wineserver, linux-foxhound profile, DLSS performance (Streamline 2.10.3 / NGX 310.5.2), VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains, texture room 85/85, --mem-max 24G --watchdog.

1. vkd3d-proton 020fc944 + the memory.c budget-lock fix (#3542)

Applied the one-line change (if (vr != VK_SUCCESS || !rebar_budget || !respect_budget) before the budget_lock lock). The card is full in every long run here, so this path is hit.

  • No Xid 13 since: runs 18, 21, 22 and 23 (~105 min of play together) at the exact setup where runs 15 and 16 hit Xid 13 at ESR addr 0xf812b60. Not proof, but a clear change.
  • No fps cost: run 18 = run 16 (12.4 fps average after the first 5 min).
  • Build note: rebuilding in my existing build.64 failed at link (undefined reference to std::__1::…: objects built against llvm-mingw's libc++ mixed with GNU ld because llvm-mingw was on PATH). A fresh build folder with llvm-mingw kept out of PATH fixed it:
env PATH=<PATH without llvm-mingw> meson setup --cross-file build-win64.txt --buildtype release build.64-fix
env PATH=<PATH without llvm-mingw> ninja -C build.64-fix

2. Correction: Xid 109 still happens on the tree of views

Run 20261202T212820Z hit Xid 109 ~50 s in (CTX SWITCH TIMEOUT, channel 0x1c, Info 0xbc030) on the views-rbtree wineserver. That's 1 in 10 runs on that server so far, against 3 in 4 comparable stock-server runs. So it's rarer there, not gone. Please treat my earlier "none on the tree of views" accordingly.

3. What ends the long runs: the cgroup cap, and the crawl before it

  • Runs 17, 18 and 21 ended at the 24 GiB scope cap after 22–25 min (kernel Memory cgroup out of memory: Killed process … (main); kc-run's meta.txt said oom_kill 0 for one of them, so that reading seems to come too early).
  • Before the kill, the last ~6 min ran at 0.4–1.6 fps with 0 pipelines being made in every 5 s line (run 21). The driver logged NV_ERR_NO_MEMORY … system_mem.c 4 min before the kill. So it's memory pressure, not shader compiling.

4. Letting the scope swap: 51-minute run

I changed kc-run.sh's -p MemorySwapMax=0 to -p MemorySwapMax=${KC_SWAP_MAX:-0} and ran with KC_SWAP_MAX=8G (zram). Default behaviour is unchanged.

  • Run 22 (20261202T220503Z): ~51 min, ended only because I closed the window. No Xid, no kill, memory peak 23,643 MiB, card 14.8/14.8 GB, ~8.5 GB "PC's shared with the card".
  • Suggestion: maybe expose swap as a kc-run option. The driver-pinned spill can't be swapped, but the anonymous and shmem part of the title's memory can (the kill above showed anon-rss 9.4 GB, shmem-rss 17.5 GB).

5. victory preload on Linux through kc-run.sh

The docs only show Windows, but this works. It's the normal launch environment, plus --dry, VICTORY_SUBCOMMAND=preload, and the title folder as a Z: path after the title:

VICTORY_SUBCOMMAND=preload bash scripts/kc-run.sh --profile linux-foxhound --dry --mem-max 24G \
  --vkd3d <vkd3d folder> <title.exe> 'Z:\path\to\title\folder'

Going through kc-run.sh keeps the same program path (victory/bin/<vkd3d folder name>/victory.exe), which NVIDIA's cache is keyed on, and the same profile settings.

  • First preload: 25,789 shaders in 69 s (196 don't translate: 195 "a container without a vertex, pixel, compute or mesh program", 1 "lane mask"). Then 88,872 pipelines known, 4,433 to make (used ones), 10 processes, 0 bad, ~5 min in total. Later preloads take 6 s.
  • Run 23 after it: 0 pipelines being made from the first frame on (run 18, the first run after the vkd3d change, made ~3,900 in its first minute). NVIDIA cache 1.7 → 2.1 GB.
  • One thing I'm watching: run 23 reached the 24 GiB peak within 8 min (swap absorbed it), with 28.5 GB "in memory" at the end against 24.1 GB at the end of 51-min run 22. Possibly the preloaded pipeline library? I'll check in a longer run.

6. Numbers so far on this card

Setup | fps avg / median / worst 10 % (after 5 min) | Typical length -- | -- | -- No DLSS, 1080p scene (run 13) | 10.9 / 10.2 / 7.9 | 27.5 min (cap) DLSS performance (run 16) | 12.4 / 12.2 / 10.4 | 25 min (Xid 13 / cap) + memory.c fix + 8 GB swap (run 22) | 13.4 average | 51 min (closed by me)

Missions are CPU/translation-bound at ~12 fps. Open-world driving is card-bound again (130–170 ms of card time per frame) at ~5 fps.

Logs for any of these runs on request.

**@⁠leonpersi** on GitHub · 2026-12-03 19:38 UTC · [original](https://github.com/kc01-8/LINUX-NVIDIA-VI/issues/7) <p dir="ltr">Follow-up to my earlier RTX 4060 Ti report (runs 1–17). Same PC: RTX 4060 Ti 16 GB (PCIe 4.0 x8), NVIDIA 620.73.04 open module, Ryzen 7 7700, 30 GiB RAM + 30 GiB zram, CachyOS 7.3.6, KDE Wayland. Same code: <code dir="ltr">kc/trustno1</code> @ 6131ceb, Proton Experimental 11.0-20261123b with your views-rbtree wineserver, <code dir="ltr">linux-foxhound</code> profile, DLSS performance (Streamline 2.10.3 / NGX 310.5.2), <code dir="ltr">VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains</code>, texture room 85/85, <code dir="ltr">--mem-max 24G --watchdog</code>.</p> <h3 dir="ltr">1. vkd3d-proton 020fc944 + the memory.c budget-lock fix (#3542)</h3> <p dir="ltr">Applied the one-line change (<code dir="ltr">if (vr != VK_SUCCESS || !rebar_budget || !respect_budget)</code> before the <code dir="ltr">budget_lock</code> lock). The card is full in every long run here, so this path is hit.</p> <ul dir="ltr"> <li><strong>No Xid 13 since</strong>: runs 18, 21, 22 and 23 (~105 min of play together) at the exact setup where runs 15 and 16 hit Xid 13 at ESR addr 0xf812b60. Not proof, but a clear change.</li> <li>No fps cost: run 18 = run 16 (12.4 fps average after the first 5 min).</li> <li>Build note: rebuilding in my existing <code dir="ltr">build.64</code> failed at link (<code dir="ltr">undefined reference to std::__1::…</code>: objects built against llvm-mingw's libc++ mixed with GNU ld because llvm-mingw was on PATH). A fresh build folder with llvm-mingw kept out of PATH fixed it:</li> </ul> <div role="group" aria-label="Code" tabindex="0" dir="ltr" style=""><div><div></div></div><div><pre><code style="white-space: pre-wrap;">env PATH=&lt;PATH without llvm-mingw&gt; meson setup --cross-file build-win64.txt --buildtype release build.64-fix env PATH=&lt;PATH without llvm-mingw&gt; ninja -C build.64-fix</code></pre></div></div> <h3 dir="ltr" style="">2. Correction: Xid 109 still happens on the tree of views</h3> <p dir="ltr" style="">Run <code dir="ltr">20261202T212820Z</code> hit <strong>Xid 109</strong> ~50 s in (<code dir="ltr">CTX SWITCH TIMEOUT</code>, channel 0x1c, Info 0xbc030) on the views-rbtree wineserver. That's 1 in 10 runs on that server so far, against 3 in 4 comparable stock-server runs. So it's rarer there, not gone. Please treat my earlier "none on the tree of views" accordingly.</p> <h3 dir="ltr" style="">3. What ends the long runs: the cgroup cap, and the crawl before it</h3> <ul dir="ltr" style=""> <li>Runs 17, 18 and 21 ended at the 24 GiB scope cap after 22–25 min (kernel <code dir="ltr">Memory cgroup out of memory: Killed process … (main)</code>; kc-run's meta.txt said <code dir="ltr">oom_kill 0</code> for one of them, so that reading seems to come too early).</li> <li>Before the kill, the <strong>last ~6 min ran at 0.4–1.6 fps with 0 pipelines being made</strong> in every 5 s line (run 21). The driver logged <code dir="ltr">NV_ERR_NO_MEMORY … system_mem.c</code> 4 min before the kill. So it's memory pressure, not shader compiling.</li> </ul> <h3 dir="ltr" style="">4. Letting the scope swap: 51-minute run</h3> <p dir="ltr" style="">I changed kc-run.sh's <code dir="ltr">-p MemorySwapMax=0</code> to <code dir="ltr">-p MemorySwapMax=${KC_SWAP_MAX:-0}</code> and ran with <code dir="ltr">KC_SWAP_MAX=8G</code> (zram). Default behaviour is unchanged.</p> <ul dir="ltr" style=""> <li>Run 22 (<code dir="ltr">20261202T220503Z</code>): <strong>~51 min, ended only because I closed the window</strong>. No Xid, no kill, memory peak 23,643 MiB, card 14.8/14.8 GB, ~8.5 GB "PC's shared with the card".</li> <li>Suggestion: maybe expose swap as a kc-run option. The driver-pinned spill can't be swapped, but the anonymous and shmem part of the title's memory can (the kill above showed anon-rss 9.4 GB, shmem-rss 17.5 GB).</li> </ul> <h3 dir="ltr" style="">5. <code dir="ltr">victory preload</code> on Linux through kc-run.sh</h3> <p dir="ltr" style="">The docs only show Windows, but this works. It's the normal launch environment, plus <code dir="ltr">--dry</code>, <code dir="ltr">VICTORY_SUBCOMMAND=preload</code>, and the title folder as a Z: path after the title:</p> <div role="group" aria-label="Code" tabindex="0" dir="ltr" style=""><div><div></div></div><div><pre><code style="white-space: pre-wrap;">VICTORY_SUBCOMMAND=preload bash scripts/kc-run.sh --profile linux-foxhound --dry --mem-max 24G \ --vkd3d &lt;vkd3d folder&gt; &lt;title.exe&gt; 'Z:\path\to\title\folder'</code></pre></div></div> <p dir="ltr" style="">Going through kc-run.sh keeps the same program path (<code dir="ltr">victory/bin/&lt;vkd3d folder name&gt;/victory.exe</code>), which NVIDIA's cache is keyed on, and the same profile settings.</p> <ul dir="ltr" style=""> <li>First preload: 25,789 shaders in 69 s (196 don't translate: 195 "a container without a vertex, pixel, compute or mesh program", 1 "lane mask"). Then 88,872 pipelines known, 4,433 to make (used ones), 10 processes, 0 bad, ~5 min in total. Later preloads take 6 s.</li> <li>Run 23 after it: <strong>0 pipelines being made from the first frame on</strong> (run 18, the first run after the vkd3d change, made ~3,900 in its first minute). NVIDIA cache 1.7 → 2.1 GB.</li> <li>One thing I'm watching: run 23 reached the 24 GiB peak within 8 min (swap absorbed it), with 28.5 GB "in memory" at the end against 24.1 GB at the end of 51-min run 22. Possibly the preloaded pipeline library? I'll check in a longer run.</li> </ul> <h3 dir="ltr" style="">6. Numbers so far on this card</h3> <div dir="ltr" style=""> Setup | fps avg / median / worst 10 % (after 5 min) | Typical length -- | -- | -- No DLSS, 1080p scene (run 13) | 10.9 / 10.2 / 7.9 | 27.5 min (cap) DLSS performance (run 16) | 12.4 / 12.2 / 10.4 | 25 min (Xid 13 / cap) + memory.c fix + 8 GB swap (run 22) | 13.4 average | 51 min (closed by me) </div> <p dir="ltr" style="">Missions are CPU/translation-bound at ~12 fps. Open-world driving is card-bound again (130–170 ms of card time per frame) at ~5 fps.</p> <p dir="ltr" style="">Logs for any of these runs on request.</p>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 19:42:30 +00:00
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/kc01-8--LINUX-NVIDIA-VI#7
No description provided.