12 GB card (RX 6700 XT, gfx1031): card_mb_for_title=1024 → device removed 0x887A0005 at image publication; 6 GiB kept-for-host boots #119
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#119
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?
@Polland25 on GitHub · 2026-12-01 22:10 UTC · original
Environment
gfx1031proton-cachyos-slramdgpu.gttsize=11264 ttm.pages_limit=314572837bb30f, plus the one constant below (nothing else changed)What happens
Startup dies ~20 s in, at the first presented image, before any frame renders:
16 title-memory chunks of 3840 MB are mapped, but only 1024 MB of VRAM is budgeted to the title, so the working set lands in GTT instead of the card.
Where the 1024 MB comes from
crates/victory-gpu/src/um.rs:room = card − CARD_KEPT_FOR_HOST, floored atCARD_FOR_TITLE_AT_LEAST. On a 12272 MB card12272 − 12288saturates to 0 and the floor gives the title 1024 MB — i.e. the constant assumes a ~16 GB card with 4 GB left over. On a 12 GB card the whole working set is pushed into system RAM.Measured with a 5 Hz sampler over
/sys/.../mem_info_{vram,gtt}_usedon the stock build (the run log is overwritten each launch, so only the peaks survive):That signature — GTT pinned at its ceiling and VRAM mostly idle — is the proof the card budget, not system RAM, is the lever.
What fixes it locally
One constant:
Rebuilt (
./build.sh, 1m14s), same session, same save:card_mb_for_title1024 → 6128 MB, and in that run: 0 occurrences ofNot enough memory for command submission, 0 of0x887A0005, 0 ofvr -4.On
CONSOLE=series-xwith the same patched build: the title booted and ran 11m34s (21:56:15 → 22:07:49, 4722 pipelines bound, steady 20.9–23.4 fps at 2560x1440) until the window was closed by hand — 0 occurrences of0x887A0005, ofNot enough memory for command submission, ofvr -4, and no unhandled exception in the whole run. Same build, same card: the only change between dying at image publication and playing isCARD_KEPT_FOR_HOST.Suggesting the upstream shape
Hardcoding 6 GiB is as wrong in the other direction: an 8 GB card would hand the title 2 GB and risk evicting the compositor, a 24 GB card would waste 18 GB. Something adaptive reads better than any single constant:
A 12 GB card then budgets ~9 GB (or 8 GB) to the title instead of 1 GB, a 16 GB card keeps its present 4 GB, and the 1 GiB floor still protects small cards. An env override for the budget would also cover cards this heuristic guesses wrong on — that is what #15 proposed for the same cap, and it is still closed unmerged.
What this is not
card_mb_for_titledata)CONSOLE=series-s: onseries-sthe title still hits its own allocator assert atvictory-image+0x56a2afdafterxmem allocation hooks found=true, which the 6 GiB change does not affect — that one stays open as reported thereVerification available
Happy to run whatever instrumented build you want (
VICTORY_D3D12_DEBUG=1, a print ofCARD_KEPT_FOR_HOST/roomper pool, or an env override) on this card and post the logs — 12 GB RDNA2 is a common size and currently the worst case for this constant.@skalel on GitHub · 2026-12-02 12:24 UTC · original
A data point from another 12 GB gfx1031 card, on the speed side of this constant.
Setup: RX 6750 XT 12 GB (gfx1031), Ryzen 7 5700X, 32 GB DDR4, B550 (link 16 GT/s x16 at every hop, resizable BAR 16 GB), CachyOS,
d044248, Series X, 1920x1080 output withVICTORY_FSR_4K=quality(1280x720 render), RT off. With 32 GB of RAM the stock 1024 MB room does not crash here: no0x887A0005,vr -4orNot enough memory for command submissionin any run. So this is only about frame time and memory.Stock build: the card is never idle (the card clock line says 98-100 % busy,
gpu_busy_percentmedian 95 %, ~2.57 GHz) but it draws ~94 W of its 200 W cap. That fits #14:unified memory: 10965 MB in RAM, 1023 MB in VRAM, and the 2.2 GB block is left in RAM whole (write-combined title memory starts in RAM ... mb=2199 card_mb_for_title=1024). Forcingpower_dpm_force_performance_level=highchanged nothing (16.9 vs 17.0 fps). No game thread is saturated (the two busiest average 55-69 % of a core).The room set by hand: I read it from an env var, so each value did not need its own build (
VICTORY_UM_VRAM_MB, MiB, at least 1024, capped at what the CPU reaches of the card; unset = as now). Same route walked by hand, one run per value, medians of thestats: framelines (one every ~5 s) with at least 500 draws:CARD_KEPT_FOR_HOSTat 6 GiB, as suggested above, would be in the 6144 row.So on 12 GB cards this looks less like a constant that is too large and more like title memory and textures competing for the same ~10 GB. A bigger room on its own trades texture quality for a few percent. Happy to run other builds or switches on this card.
The switch used (not a proposal for the default)
github-bot referenced this issue2026-12-02 19:27:50 +00:00
@Polland25 on GitHub · 2026-12-04 19:14 UTC · original
Data point from the other side: 16 GB of RAM, 12 GB card (room 1024 vs 3584 vs 6144)
RX 6700 XT (gfx1031, 12272 MB), 16 GB DDR4, CachyOS, kernel 7.3.7-2,
proton-cachyos-slr, main @b99f876, with yourVICTORY_UM_VRAM_MBswitch applied (um::tests::title_room_of_the_cardpasses), nothing else changed.amdgpu.gttsize=11264 ttm.pages_limit=3145728on the cmdline, GTT total confirmed 11264 MiB.Same settings for every run:
CONSOLE=series-x,VICTORY_OUTPUT=1920x1080,VICTORY_TILE_HEAP_MB=3977, ray tracing off, FSR 4 off, frame generation off,VICTORY_WARM=0. Same route, ~2 min in-world each; 5 Hz sampler onmem_info_{vram,gtt}_usedandMemAvailable; n=2 for the two raised values.On 16 GB the failure is the kernel's OOM killer, not radv:
oom-kill: constraint=CONSTRAINT_NONE, global_oom, task_memcg=.../um-play-*.scope, task=main, thenFailed with result 'oom-kill'on the scope.run.shsetsMemoryMax=9879M; the kill was global, so the cap was not what stopped it. Same cause as #119, different first casualty.This confirms your reading, with one addition: 3584 was stable twice, 6144 was not, and 6144's VRAM peak was lower than 3584's (9184–9308 vs 9481–9626 MB) while its GTT peak sat on the 11264 MB ceiling. The extra 2.5 GB of room did not become title memory in VRAM — it became GTT, which is still system RAM, so on a 16 GB host it is a straight loss.
So on 12 GB cards the fix is not "more room": ~3.4 GB looks like where residency stops improving, and anything above it is paid in RAM. What neither the constant nor a single number has is the host's RAM: your 32 GB machine makes 6144 the faster row, my 16 GB machine makes it an OOM. Room scaled by the RAM the host can spare, with
VICTORY_UM_VRAM_MBkept as the escape hatch, covers both — and the switch made all six runs possible without a rebuild, which is the strongest argument for merging it.Caveats: one card, one route, n=2 per raised value. My fps is not comparable to your table (1080p output vs your 720p render), so I claim nothing about an fps delta — only the survival, GTT/VRAM and MemAvailable columns.
@El-Biiscuit on GitHub · 2026-12-04 20:45 UTC · original
A controlled A/B on a third 12 GB gfx1031 card, mainly about how much room is enough.
Setup: RX 6700 XT 12 GB (12272 MB), Ryzen 7 5800X, 62 GB RAM (no OOM pressure here), Fedora 45, GE-Proton11-16, Mesa 26.3.1 patched. Build: main
6064c04+ #369 (06d5386), whoseVICTORY_CARD_KEPT_MBis the inverse of theVICTORY_UM_VRAM_MBswitch above: room = 12272 − kept. Series X, low preset, 1920x1080 output, diagnostics build, ray tracing off. UnattendedVICTORY_BENCH: same city save, camera turning in place through scripted keys. 4 min per run, the last 3 measured with MangoHud. Interleaved order, pipelines warmed for each build, DPMauto, GPU clock ~2.55 GHz in every run.Same binary, room only (two series, 36 runs in total, 36/36 valid, 0 kernel GPU faults):
card_mb_for_title)The 6128 room was in both series (41.1 and 41.2 ms), so they line up. main
6064c04alone, in the same series as the 1024 row: 44.3 ms [44.2–44.4].write-combined title memory starts in RAM, the card's room for title memory is taken mb=2199 card_mb_for_title=1024, once. At 4080 and above, that line never appears.a texture already on the card is brought up to date although the card has no room for new onesends runs at 0.5k–40k with room 1024, and at 0.76M–0.86M with any room from 4080 to 7152. I did not check the picture by eye.Combined with a lighter load: room 6128 + 1280x720 output gives 36.0 ms [35.4–36.8], about 27.8 fps, ranges disjoint from 6128 at 1080p, so the two gains add up. Series S with host FSR adds nothing on top of the 6128 room (41.3 ms), which suggests its own gain on this card goes through the same memory lever.
Reading together with Polland25's 16 GB RAM data (6144 OOM-killed, 3584 survived): the speed gain seems to be reached at about 3.5–4 GB. Going higher only adds texture pressure and, on 16 GB hosts, OOM risk. That argues for a room near 4 GB on 12 GB cards, rather than "card − 25 %" (about 9 GB) or a fixed kept of 6 GiB.
Not measured yet: a long session at 4 GB, heavier presets or 1440p/4K where the host side needs more VRAM, and driving. A long session is planned on this card; I will add its result here.
@El-Biiscuit on GitHub · 2026-12-05 01:13 UTC · original
Follow-up: the long session I mentioned, at the ~4 GB room.
Same card (RX 6700 XT 12 GB, 62 GB RAM), same build (main
6064c04+ #369),VICTORY_CARD_KEPT_MB=8192, socard_mb_for_title=4080. This time it was played by hand: 84 min of normal play, walking and driving, Series X, 1280x720 output with FSR quality (rendering at 853x480).device removed, 0Not enough memory for command submission, and 0card's room for title memory is taken.stats: framelines come every ~5 s for the whole session, with no gap longer than 15 s. The game was closed normally.One limit on the earlier numbers: on a 4K monitor, the 1280x720 output that gave 27.8 fps looks too blurry to play, and parts of the interface do not fit. That row shows the effect of a lighter load, not a setting to recommend.