Windows launcher picks the wrong memory budgets when display VRAM is stored as REG_BINARY #2600
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?
Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-29T01:35:32Z.
On Windows, the launcher misclassifies a 4 GiB card when its driver stores
HardwareInformation.qwMemorySizeas eight binary bytes. On main35159222a46c03dfd8965ddaec8d83d3fcd19376, a dry run with that value and 32 GiB of system RAM setsLEONIDA_CARD_BUFFERS_MB=1536andLEONIDA_WINDOWS_BAR_MB=3072. The equivalent integer value correctly leaves both settings unset. A malformed or unreadable entry can also prevent subsequent adapters from being considered. Original review on #2583The attached patch reads the eight-byte value as a little-endian byte count and continues past individual bad keys. The existing 6 GiB threshold still applies. Selecting the appropriate card when several adapters report valid sizes is a separate open question. Multi-adapter dry run
Reproduction and verification
The included test runs the actual launcher with
-DryRun, a placeholder executable and simulated display-registry values. Runpython -I tests/test_play_nvidia_vram.pyon Windows. I tested Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.9.Both shells failed the binary 4 GiB case on the unmodified revision. With the patch all eleven dry runs passed in each shell. The two existing Windows launcher tests and the changed-file game-data check also passed. An unmocked dry run on the RTX 4090 host printed the same budgets before and after the change in both shells. This is host-side verification. No game or GPU workload ran.
The updated patch applies to main
b6bf3aa0be76d3b90eef9a12e1698f5c1b3b7816and reconstructs tested tree900aaf038650c69238043973262bad47181d9241. Coordination claim. AI-assisted with OpenAI Codex (GPT-6).Localization follow-up. The test now sets UTF-8 in the PowerShell subprocess and decodes its output explicitly. With the untouched launcher and a simulated CP936 parent locale, both PowerShell versions now report the expected budget mismatch and preserve the non-ASCII diagnostic. The earlier test raised decoding errors in this check. With the patch, all eleven dry runs in each shell, the existing Windows launcher suite and the changed-file game-data check passed. Independent Windows verification
Updated two-file patch for git am
Copy the following block to
launcher-vram.patchand rungit am launcher-vram.patch.Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-29T03:18:50Z.
Independent Windows verification on
c8bf0e7b6using the attached fixture and patch. The stock launcher gave the large-card budgets for the synthetic binary 4 GiB value under Windows PowerShell. On this Chinese Windows locale the baseline pwsh subtest also hit a subprocess decoding error while reporting the failure. With the patch all eleven dry runs passed in each of Windows PowerShell and pwsh 7.6.9. No game launch, registry writes or GPU workload. AI-assisted with OpenAI Codex (GPT-6).Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T01:42:06Z.
Rechecked the attached two-file patch on current main
d15e048a. It applies to the current Git blobs without changing the patch. In Linux PowerShell 7.4.21, the unmodified launcher still gave the large-card budgets for the binary 4 GiB fixture. All eleven of your cases passed with the patch. For this run I selected Linux pwsh in the test fixture.The same patch also fixes the two frame-generation mismatches in the #3272 follow-up. On the combined #3272 tree (
a0a3189f, based ond15e048a), an 8 GiB binary value disables FG on Series X with RT. An integer 8 GiB value followed by a binary 24 GiB value keeps explicit 2×. The five integer/F1/Advanced controls still agree. These tests run the actual launcher with simulated registry entries and no game files. AI-assisted with OpenAI Codex.Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-12-03T03:04:54Z.
Fixed by #3279. I reran all eleven original launcher budget cases against merge commit
2791b7756. Windows PowerShell 5.1 and PowerShell 7 both passed 11/11, including the two registry-error cases. The tests used simulated registry entries and ran without game files or a GPU workload. AI-assisted with OpenAI Codex.