mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #516] desktop (KDE/Wayland): compositor VRAM exhaustion when expert-cache auto fills a 24 GB card - pin framebuffer -12, KWin graphics reset #242
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#242
Loading…
Add table
Add a link
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?
Originally created by @xyzzing on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/516
Desktop compositor crashes when the serve engine's expert cache fills VRAM (24 GB cards)
Observed on: RX 7900 XTX 24 GB, Fedora/KDE (Wayland), engine 0.1.35 + our HIP line,
--expert-cache auto(the serve config we run).Symptom: KWin (the Wayland compositor) fails repeatedly once the engine's cache fills the card:
plasmashell SIGABRT'd twice. rocm-smi at the time: the engine held 23.33 GiB of 24 GiB.
Cause:
--expert-cache autosizes the cache from free VRAM minus a small internal reserve (~700 MiB plus draft headroom), which leaves a desktop compositor almost nothing. A cache sized seconds before a browser/video window appears can also age into the same state — the compositor's allocations then fail with ENOMEM instead of the engine yielding.Mitigation that fixed it for us:
--vram-reserve-mib 4000on the serve config (engine VRAM 23.3 → 21.8 GiB, zero compositor failures since; the cache loses ~1k slots ≈ a few percent of hit rate). The knob exists and works — the gap is thatauto's default reserve is sized for headless/dedicated setups, and nothing warns or adapts when a desktop compositor is present.Suggestion: one of (a) raise the effective desktop reserve under
autowhen a DRM render node has an active compositor (detectable via which processes hold the other KFD/DRI devices), (b) document--vram-reserve-mibas required on desktop 24 GB setups in docs/AMD_HIP.md, or (c) at minimum warn at startup when free VRAM after the cache is below a threshold. Happy to send a patch for whichever shape you prefer.Data: full kernel/KWin log excerpts and before/after rocm-smi available on request. (Filed from the xyzzing HIP integration line; same report cross-posted to our rollout records.)
@XeonG commented on GitHub (Oct 2, 2026):
seems like I hit the same problem with windows on a 16gb vram aswel, this didn't seem like an issue days ago when I had last tried it.
@Niko1221 commented on GitHub (Oct 3, 2026):
Thanks, this is the same problem as #560: with the default 700 MiB reserve the expert cache fills the card, and the compositor's next allocation fails or makes amdgpu move the cache to RAM.
Fixed in 0.1.38, along the lines of your (b) and (c): setup on a Linux desktop with the AMD backend recommends
--vram-reserve-mib 3072. The server prints the same tip after the start when less than 2 GB of VRAM is left. docs/AMD_HIP.md and INSTALL.md document it, including the "Failed to pin framebuffer with error -12" symptom. We kept it a recommendation rather than an automatic reserve, since detecting a compositor on the same card isn't reliable across setups.@XeonG Windows is a different path: since 0.1.37 the engine counts the desktop's VRAM there (the WDDM budget). Could you open a new issue with your card, engine version and the
strata-<model>.loglines withexpert cache autoandMiB of VRAM free? MeanwhileSTART-HERE.bat --vram-reserve-mib 2048should keep the desktop stable.@xyzzing commented on GitHub (Oct 3, 2026):
Confirming from our side (the reporter's setup twin: 7900 XTX 24 GB, KDE/Wayland): our serve config has run for a day with an explicit
--vram-reserve-mib 4000(engine VRAM 23.3 → 21.8 GiB) — zero compositor failures since, vs. repeated KWin "Cannot allocate memory" / framebuffer-pin -12 / graphics resets before. Cost: ~1k expert-cache slots, no decode change we could measure.Happy to validate 0.1.38's fix on this box (the exact hardware, 96 GB desktop Ryzen 9 + the card) once we refresh our integration line to it — will report the compositor behavior with the reserve removed.
@xyzzing commented on GitHub (Oct 3, 2026):
Validated on this hardware (7900 XTX 24 GB, KDE/Wayland, Ryzen 9 7900X, our HIP line on the 0.1.38 engine):
--vram-reserve-mib 3072(setup's DESKTOP_RESERVE_MIB) holds: engine VRAM 22.79 GiB of 24 (≈2.3 GiB free to the desktop), expert-cache auto re-sized around it, and the compositor has been clean since the restart — no "Cannot allocate memory", no pin failures, no graphics resets, through serving traffic. Decode through the serve path unchanged (56.0 tok/s on the standard smoke).We're leaving the serve config on 3072 (the shipped recommendation) and will report if anything glitches at that value; bumping to 4000 remains the tested fallback.