feat(performance): switch to turn off idle game memory compression (#2346)

* feat(performance): add idle zram compression toggle

* Gate the idle compression toggle on memory cap support and refresh counters first

* fix(zram): retain launcher reclaim when idle compression is off

* test(memory): verify launcher-only reclaim signals

* fix(performance): keep game reclaim when focus is unknown

* fix(performance): say when to turn idle compression off and that it applies on the next session

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
This commit is contained in:
MaxsTechReviewandKurt Himebauch authored and GitHub committed 2026-11-15 10:09:38 -05:00
1 parent a62933d023
commit 2e64ae7575
41 files changed
+141 -4

No files matched your search

@@ -972,6 +972,7 @@ case $mode in
bl_session_pressure() {
bl_memory_read
[ "$_bl_game" = 1 ] && bl_memory_critical || return 0
[ "${BL_ZRAM_IDLE:-1}" = 1 ] && bl_game_focused 0 || return 0
local _wait=$_bl_tier_backoff _before _pids _targets
[ "$_bl_available" -ge $((_bl_headroom / 2)) ] || [ "$_bl_tier_pushed" -lt 0 ] || _wait=30
[ "$_bl_tier_at" -lt 0 ] || [ $((SECONDS - _bl_tier_at)) -ge "$_wait" ] || return 0
@@ -1103,7 +1104,7 @@ case $mode in
local id
id=$(sed -n 's/.*"focusedApp"[[:space:]]*:[[:space:]]*\([0-9][0-9]*\).*/\1/p' \
"$BL_LAUNCH_DIR/agent/focus.json" 2>/dev/null | head -1)
[ -n "$id" ] || return 1
[ -n "$id" ] || return "${1:-1}"
case " ${_bl_apps-} " in
*" $id "*) return 0 ;;
esac