Forward-merges origin/main cleanly into d3d12/README.md, documents the measured Series X 58.8 GB commit footprint and fixed 32 GB page-file sizing on 48 GB RAM hosts from #3109 alongside residency.rs commit-reserve behavior, and switches the 8 GB starting command to direct PowerShell invocation so [hashtable]$More binds without stringification. Co-authored-by: mattiolocoding <mattiolocoding@users.noreply.github.com>
9.0 KiB
Windows memory troubleshooting
If the menu works and the game closes during the first scene load, check Windows' Committed counter in Task Manager under Performance > Memory. It shows current system commit and the limit. Free physical RAM can remain while committed memory is near its limit. A Windows page file raises that limit. See Microsoft's page file guidance.
Check the failure
In Event Viewer, check Windows Logs > System for Resource-Exhaustion-Detector,
event 2004 near the exit. In the Leonida log (and crashes.log), look for
memory allocation of, Windows commit limit reached, or left to commit. An
application error with 0xc0000409 needs context: the allocation failure and the
system event can identify a Rust out-of-memory abort. For GPU pressure, check
Dedicated GPU memory and Shared GPU memory under Performance > GPU,
and compare them with the application's log.
If commit is near the limit and paging is disabled, open sysdm.cpl and go to
Advanced > Performance Settings > Advanced > Virtual memory > Change.
Enable Automatically manage paging file size for all drives, restart Windows,
and check that the file is active:
Get-CimInstance Win32_PageFileUsage | Select-Object Name, AllocatedBaseSize
Repeat the same load after restarting. Keep the first and second run's commit and GPU memory readings so the effect can be checked.
Fixed page file sizing for the Series X profile (48 GB RAM)
On a PC with less physical memory than the game commits (about 59 GB at the
Series X profile), Windows' automatic page file can leave the system commit
limit below what the run needs. Set a fixed page file large enough to cover the
difference plus headroom: 32 GB (32768 MB initial and maximum size in
sysdm.cpl) on a 48 GB PC.
In an open-world Series X run measured in
#3109 (48 GB RAM /
47.8 GB usable, RTX 5070 Ti 16 GB, driver 621.40, runtime built from a917c54):
- The game maps about 35 GB of title memory and the runtime's host copies add about 4.4 GB, bringing total system committed memory to 58.8 GB.
- Windows' automatic page file on that 48 GB machine was about 5 GB, capping the system commit limit at 52.8 GB — less than the game commits.
- Raising the page file to a fixed 32 GB (
32768MB initial and maximum) raised the commit limit to 79.8 GB. Over the run, the lowest remaining commit seen was 20,040 MB, with 0 one-second samples under pressure. - Why this matters for the host-memory throttle:
d3d12/crates/leonida-gpu/src/residency.rsbegins throttling speculative texture prefetch at 4 GiB left to commit, treats < 1.5 GiB as critical, and holds 1,024 MiB (512 MiB for reused pool uploads, 256 MiB for bakes) in reserve before refusing texture passes or staging growth. BecauseXMemMapPhysicalPages,XMemVirtualAlloc, andXMemAllocDefaultcommit host memory directly,residency.rscan only back off while the OS commit limit sits above what the title itself asks for; with the 5 GB automatic page file, Windows refuses allocations before the throttle can keep the run within budget.
These figures come from one measured machine, so treat 32 GB on a 48 GB PC as a
starting point and check the left to commit log lines on your own hardware.
A starting profile for 8 GB GPUs
Start with the Series S profile and frame generation disabled to keep the
initial test small. From a PowerShell session in the repository root, the
following command uses the title's upscaler at 540p and a 30 FPS cap. Pass
-DryRun first (or check the launcher's startup summary line and
d3d12\leonida-settings.txt), since saved F1 preferences can override untyped
launcher defaults (such as the Series S console profile) that are not passed on
the command line or pinned in -More.
.\d3d12\scripts\play-nvidia.ps1 -Exe <path of your copy's executable> -Resolution 540 -NoFrameGen -NoSmoothMotion -More @{LEONIDA_FPS_CAP='30'}
To cap pipeline compilation threads or lower the VRAM reserve kept for future
render targets (default 3072 MiB), add LEONIDA_PIPELINE_WORKERS='2' or
LEONIDA_CARD_ROOM_FOR_TARGETS_MB='1536' in -More @{...}. On PCs with under
48 GB of RAM and at least 6 GB of VRAM, the launcher also sets
LEONIDA_WINDOWS_BAR_MB=3072 by default (-WindowsBarMB 0 or
LEONIDA_WINDOWS_BAR_MB='0' in -More turns it off).
Reproduction on 32 GB RAM and an 8 GB RTX 3060 Ti
On Windows 11 with NVIDIA driver 617.14, the Series S configuration above
reached the menu, then exited while loading the first scene. Windows logged
event 2004 before the exit. The system commit limit was 32,686 MiB, with no
active page file. A retry with two pipeline workers (LEONIDA_PIPELINE_WORKERS=2)
reached 32,647 MiB of system commit while 7,620 MiB of physical RAM was still
available. Its next reported failure was a 2,228,240-byte allocation. Turning
off LEONIDA_THIN and setting LEONIDA_JOIN_PARTS=1 also reached the commit
limit and exited. The last in-process report before the original exit showed
approximately 1,380 MiB of local GPU memory used against a 7,256 MiB budget.
After enabling automatic paging and restarting, Windows reported an active 2,048 MiB page file and a system commit limit of 34,734 MiB. With two pipeline workers, the same build loaded past the previous crash point and reached the opening cutscene with audio and subtitles. The highest sampled commit was 30,716 MiB, leaving 4,018 MiB available. The restart also reduced background commit, so the run measures the combined effect of the restart and paging.
The 3D picture remained black during the observed cutscene. The log reported over 1,200 pipelines pending and a texture queue blocked by its VRAM budget. In one sample, 1,815 MiB was reserved for future render targets, while the driver reported about 4,844 MiB used out of a 4,923 MiB local budget. The run ended when the window was closed. This result verifies progress past the allocation failure. Rendering in the cutscene still needs testing.
Follow-up on the invisible scene
The same checkpoint, with two pipeline workers and frame generation off, gave these results during the opening cutscene:
| Configuration | Observed result |
|---|---|
| Original Series S path after warming 1,561 recorded pipelines | Black picture with subtitles |
| DLSS Balanced, with its own cache | Black picture with subtitles despite successful DLSS dispatches |
Internal upscaler, default 3,072 MiB target reserve (LEONIDA_CARD_ROOM_FOR_TARGETS_MB=3072) |
Black picture with subtitles |
Internal upscaler, 1,536 MiB target reserve (LEONIDA_CARD_ROOM_FOR_TARGETS_MB=1536) |
Black picture even after the unused target reserve went to zero |
Internal upscaler, 1,536 MiB target reserve, LEONIDA_THIN=0, LEONIDA_JOIN_PARTS=1 |
3D street scene visible, with dark areas and the texture queue still waiting for room |
DLSS Balanced, 1,536 MiB target reserve, LEONIDA_THIN=0, LEONIDA_JOIN_PARTS=1 |
Black picture returned. DLSS dispatches continued to succeed |
The internal-upscaler runs with the smaller reserve used the same build and save, with a cache that warmed between runs. Synchronous recording is a candidate for reproducing visible output; the test does not isolate it from that cache history. The Windows commit peak in the visible run was about 32 GiB. The texture queue still reported pressure and later gameplay remains unverified.
Related work
- fxceless reports a similar allocation abort during a scene transition with 32 GB RAM and a 16 GB GPU. An open proposal throttles pipeline workers and pauses speculative prewarming as commit headroom falls. Report #771, proposal #777
- A VIctory-NVIDIA report on a 16 GB RAM machine found pressure on shared GPU memory. The author used CPU-mapped VRAM for some buffers. The launcher work was later made opt-in and predates the current foxhound base. Report #6, follow-up #8
- DexNom reports a repeatable game breakpoint after reaching the world on a different 8 GB GPU. Matching the failure signature helps separate that issue from Windows commit exhaustion. Report #104
- Two open proposals on VIctory-NVIDIA address the Series S upscaler and the VRAM kept for future render targets. Both can be evaluated separately from Windows paging. Upscaler #68, render target reserve #76
- Another tester saw missing character geometry that returned with
LEONIDA_THINandLEONIDA_JOIN_PARTSdisabled on a different GPU. Recording mode #66