mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 11:01:07 +00:00
* feat: adjustable RAM and VRAM caps for the container Performance > Memory gets two sliders: - RAM cap (soft, Steam sessions): when the session is resident above the cap, the session watcher compresses the Steam client into zRAM, waits for its page-out acknowledgment, then compresses the rest of the session (processes that loaded libblsession) if still over. Nothing is closed. Measured at most every 30 s; the client is read back once usage drops below the cap. Invalid values leave the cap off. Needs zRAM swap. - VRAM cap: sets dxgi.maxDeviceMemory ahead of the game's own DXVK_CONFIG, so Direct3D games budget for less video memory. A game profile still wins. Applies from the next session. * fix: back off the RAM cap when paging out cannot get under it A cap below the game's working set was never met, so the watcher paged out the client and the whole session every 30 s for the rest of the session. Usage is still measured every 30 s, but after a page-out that leaves the session over the cap the next one waits twice as long (60 s up to 10 min), resetting once usage is under the cap. The client step is skipped while the client is already under 512 MB resident. * fix: RAM cap covers desktop Steam, signals each group once, no idle churn - Steam opened from the desktop runs the same session watcher, so the cap is exported whenever the Steam client runs, not only in Steam mode. - The second page-out goes to the rest of the session only; Steam was signalled again even when its own step had been skipped as already small. - A cap page-out while no game runs stays paged out. Reading the client back right away pushed it over the cap again and repeated every minute; only a game closing while over the cap still defers a read-back. * fix: RAM cap marks the client packed only when it compressed it When the cap skipped the client as already small during a game, it still recorded the client as packed, so the regular in-game client page-out waited up to 300 s for a page-out that never happened. --------- Co-authored-by: jazzyjames <182448902+jazzyjamesgames@users.noreply.github.com>