From 068da456f5e748898d8863a7a8227843b96b32d1 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 22 Jul 2026 10:07:19 +0200 Subject: [PATCH] =?UTF-8?q?fix(steamdeck):=20survive=20SteamOS=20A/B=20upd?= =?UTF-8?q?ates=20=E2=80=94=20register=20system=20tuning=20on=20the=20atom?= =?UTF-8?q?ic-update=20keep=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified live on a SteamOS 3.8.14→3.8.16 update: the A/B partset switch rebuilds /etc and drops everything not on Valve's keep list — the udev rule (uhid access: virtual pads silently degrade to Xbox 360), the vhci-hcd autoload (native Deck pad transport), and the UDP buffer sysctl (back to 208 KB → stutter). Valve's sanctioned extension point is a drop-in under /etc/atomic-update.conf.d/ — itself on the stock keep list, so it self-preserves. install.sh §4 and update.sh now register scripts/punktfunk-atomic-keep.conf there. Co-Authored-By: Claude Fable 5 --- scripts/punktfunk-atomic-keep.conf | 17 +++++++++++++++++ scripts/steamdeck/install.sh | 8 ++++++++ scripts/steamdeck/update.sh | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 scripts/punktfunk-atomic-keep.conf diff --git a/scripts/punktfunk-atomic-keep.conf b/scripts/punktfunk-atomic-keep.conf new file mode 100644 index 00000000..5d132c21 --- /dev/null +++ b/scripts/punktfunk-atomic-keep.conf @@ -0,0 +1,17 @@ +# punktfunk — SteamOS atomic-update preserve list (drop-in for /etc/atomic-update.conf.d/). +# +# SteamOS's A/B updates rebuild /etc from scratch and carry over ONLY the files matched by +# /usr/lib/rauc/atomic-update-keep.conf plus these operator drop-ins (the drop-in dir itself is +# on Valve's keep list, so this file is self-preserving). Without it, every OS update silently +# strips the host's system integration: /dev/uhid access (virtual pads degrade to Xbox 360), +# the vhci-hcd autoload (no native Steam Deck pad), and the UDP buffer sizing (stream stutter). +# Same wildcard rules as the stock list: '*' matches within a path segment, '**' across. + +## Virtual-gamepad device access (uinput/uhid/vhci for the input group) +/etc/udev/rules.d/60-punktfunk.rules + +## vhci-hcd autoload (usbip transport for the native Steam Deck pad) +/etc/modules-load.d/punktfunk.conf + +## UDP socket buffer sizing (32 MB, matches the deb's sysctl drop-in) +/etc/sysctl.d/99-punktfunk-net.conf diff --git a/scripts/steamdeck/install.sh b/scripts/steamdeck/install.sh index b870f24d..6e4b71c4 100755 --- a/scripts/steamdeck/install.sh +++ b/scripts/steamdeck/install.sh @@ -274,6 +274,14 @@ if [ "$SUDO_OK" = 1 ]; then NEED_RELOGIN=1 warn "added $USER to the 'input' group (applies on next login)" fi + # SteamOS A/B updates rebuild /etc and DROP everything not on Valve's keep list — verified + # live: an OS update stripped the udev rule + vhci autoload + UDP sysctl (gamepads silently + # degrade to Xbox 360, buffers back to 208 KB). The sanctioned fix is a preserve drop-in in + # /etc/atomic-update.conf.d/ (itself on the stock keep list, so it self-preserves). + if [ -f "$SRC/scripts/punktfunk-atomic-keep.conf" ]; then + sudo install -Dm644 "$SRC/scripts/punktfunk-atomic-keep.conf" /etc/atomic-update.conf.d/punktfunk.conf + ok "system tuning registered to survive SteamOS updates (atomic-update.conf.d)" + fi else warn "no usable sudo — SKIPPED system tuning. Gamepad passthrough + clean streaming need root (udev" warn "rule, 'input' group, vhci-hcd, UDP buffers) — there is no user-space way to do these." diff --git a/scripts/steamdeck/update.sh b/scripts/steamdeck/update.sh index 4c5350b4..09772f99 100755 --- a/scripts/steamdeck/update.sh +++ b/scripts/steamdeck/update.sh @@ -99,6 +99,13 @@ if [ "$SUDO_OK" = 1 ]; then sudo usermod -aG input "$USER" warn "added $USER to the 'input' group — REBOOT (or log out/in) for it to apply" fi + # Register the tuning on Valve's atomic-update preserve list (see install.sh §4): without + # this, every SteamOS A/B update strips the three files above again (verified live — + # gamepads silently degrade to Xbox 360, UDP buffers back to 208 KB). + if [ -f "$SRC/scripts/punktfunk-atomic-keep.conf" ]; then + sudo install -Dm644 "$SRC/scripts/punktfunk-atomic-keep.conf" /etc/atomic-update.conf.d/punktfunk.conf + ok "system tuning registered to survive SteamOS updates (atomic-update.conf.d)" + fi else warn "no usable sudo — SKIPPED gamepad/udev/vhci/UDP tuning (all root-only; no user-space alternative)." warn "A stock SteamOS 'deck' account has NO password — set one with 'passwd', then re-run. Gamepads stay"