From 85b5151e1a7c940c2858997adad7d6f6a55f5642 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Wed, 23 Sep 2026 14:57:56 -0400 Subject: [PATCH] Session: clear a killed session's leftovers, offer NIS in Deck mode, mangoapp hook Before the client starts, remove .crash, steam.pid and the web helper's htmlcache Singleton* locks when no client is running - Android ends sessions without warning and those files leave the next start on the update spinner or a blank Gamepad UI (SteamOS-ARM-SM8550's RUNSTEAM.sh does the same). Deck mode exports STEAM_GAMESCOPE_NIS_SUPPORTED=1 so the QAM's scaling filter lists NIS, and passes gamescope --mangoapp when mangoapp is present (BL_MANGOAPP=0 turns it off). --- .../overlay/usr/local/bin/bannerlator-session | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/linuxfs/overlay/usr/local/bin/bannerlator-session b/tools/linuxfs/overlay/usr/local/bin/bannerlator-session index 3dcc246aa6..6d0b5f3c1c 100755 --- a/tools/linuxfs/overlay/usr/local/bin/bannerlator-session +++ b/tools/linuxfs/overlay/usr/local/bin/bannerlator-session @@ -113,6 +113,19 @@ if [ -z "${BL_INSIDE:-}" ]; then # HDR10: the app opened its compositor's colour-management gate for this session (BL_HDR=1); # gamescope then offers HDR to its clients through the same wp_color_manager_v1 it binds on ours. [ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled) + # Deck mode's performance overlay (Quick Access Menu → Performance → Overlay Level) is drawn by + # mangoapp, which gamescope starts beside the client; the client sets the level by rewriting + # MANGOHUD_CONFIGFILE. The apk stages Valve's aarch64 build (tools/mangoapp) - without it the menu + # still offers the levels and nothing appears. Starts hidden until the client writes a level. + # BL_MANGOAPP=0 turns it off (one community build found Valve's mangoapp crashing on Turnip). + if [ "$mode" = steam ] && [ "${BL_STEAMDECK:-0}" = 1 ] && [ "${BL_MANGOAPP:-1}" = 1 ] \ + && [ "${BL_STEAM_UI:-}" != desktop ] && command -v mangoapp >/dev/null 2>&1; then + MANGOHUD_CONFIGFILE=$(mktemp /tmp/mangohud.XXXXXXXX) + echo no_display > "$MANGOHUD_CONFIGFILE" + export MANGOHUD_CONFIGFILE STEAM_USE_MANGOAPP=1 STEAM_MANGOAPP_PRESETS_SUPPORTED=1 STEAM_MANGOAPP_HORIZONTAL_SUPPORTED=1 + args+=(--mangoapp) + echo "== gamescope: mangoapp on ($(command -v mangoapp), config $MANGOHUD_CONFIGFILE)" + fi export BL_INSIDE=1 exec gamescope "${args[@]}" -- "$0" "$mode" "$@" fi @@ -349,8 +362,24 @@ BUSCONF # the client calls in this mode are staged as no-op stubs under /usr/bin. if [ "${BL_STEAMDECK:-0}" = 1 ] && [ "${BL_STEAM_UI:-}" != desktop ]; then _bl_ui+=(-steamdeck) + # The QAM's Scaling Filter lists NVIDIA Image Scaling only when told gamescope has it (it does). + export STEAM_GAMESCOPE_NIS_SUPPORTED=1 echo "== steam: Deck mode on (-steamdeck)" fi + # What a killed session leaves behind. Android ends sessions without warning (backgrounding, the + # low-memory killer), and the client then finds .crash - opening its update UI on the spinner - + # and the web helper's Singleton* locks in htmlcache, owned by a process that is gone, which can + # leave the Gamepad UI blank. No client or helper is running at this point in a session. + if ! pgrep -f 'steamwebhelper|steamrtarm64/steam' >/dev/null 2>&1; then + _stale="" + for _f in "$steam_root/.crash" "$steam_root/steam.pid" \ + "$steam_root/config/htmlcache/SingletonLock" "$steam_root/config/htmlcache/SingletonCookie" \ + "$steam_root/config/htmlcache/SingletonSocket"; do + if [ -e "$_f" ] || [ -L "$_f" ]; then rm -f "$_f" && _stale="$_stale ${_f##*/}"; fi + done + [ -n "$_stale" ] && echo "== steam: cleared what an earlier session left:$_stale" + unset _stale _f + fi # The client branch. publicbeta is what every session has run on; steamdeck_publicbeta is the # channel Armada bootstraps its ARM64 client from. Whatever wrote package/beta, the branch on # disk has to agree with the one forced here - a disagreement is the restart loop above, and