From 23e04b1859e1da45d325cc6e256ec811c02a8564 Mon Sep 17 00:00:00 2001 From: ssmithx Date: Wed, 1 Jul 2026 17:02:43 +0000 Subject: [PATCH] fix(kiosk): restore in-process-gpu + CPUQuota=200% to stop choppy HDMI audio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both had regressed back to the pre-2026-06-28-incident state: GPU_FLAGS used --enable-gpu-rasterization on any node with a GPU, and CPUQuota was 75%. On archy-x250-exp (Intel HD 5500 under X11) this spins a dedicated GPU process at 55-92% CPU (falls back to software compositing anyway), and the 75% cgroup quota throttled the kiosk unit ~81% of the time (nr_throttled 4856/6005) — the exact CPU-starvation signature documented as the choppy- audio root cause. Restores the validated fix: --in-process-gpu, --num-raster-threads=1, GpuRasterization disabled via --disable-features, CPUQuota=200%. Verified on archy-x250-exp: no separate gpu-process, throttling dropped to ~3% (nr_throttled 14/503). Co-Authored-By: Claude Sonnet 5 --- image-recipe/configs/archipelago-kiosk-launcher.sh | 14 ++++++++------ image-recipe/configs/archipelago-kiosk.service | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/image-recipe/configs/archipelago-kiosk-launcher.sh b/image-recipe/configs/archipelago-kiosk-launcher.sh index 562d607c..1e227760 100644 --- a/image-recipe/configs/archipelago-kiosk-launcher.sh +++ b/image-recipe/configs/archipelago-kiosk-launcher.sh @@ -83,12 +83,14 @@ xset s noblank 2>/dev/null || true pkill -u archipelago -f 'chromium.*localhost' 2>/dev/null || true sleep 1 -# GPU vs headless (#36). On a real kiosk display with a GPU, GPU rasterization is -# fast. On a GPU-less / headless server (no /dev/dri), --enable-gpu-rasterization -# forces GPU paths that fall back to software compositing and SPIN a full core at -# ~92% CPU, saturating the node. Detect the GPU and pick safe flags accordingly. +# GPU vs headless (#36, choppy-audio incident 2026-06-28). --enable-gpu-rasterization +# spins a dedicated GPU process at 55-92% CPU even on real GPU hardware (Intel HD 5500) +# because under X11 it falls back to software compositing anyway — that CPU +# starvation is what caused choppy HDMI audio. --in-process-gpu avoids the +# separate process; GpuRasterization is also disabled via --disable-features below. +# On a GPU-less / headless server (no /dev/dri), disable GPU entirely instead. if [ -e /dev/dri/card0 ] || [ -e /dev/dri/renderD128 ]; then - GPU_FLAGS="--enable-gpu-rasterization --num-raster-threads=2" + GPU_FLAGS="--in-process-gpu --num-raster-threads=1" else GPU_FLAGS="--disable-gpu --num-raster-threads=1" fi @@ -107,7 +109,7 @@ while true; do --disable-translate \ --no-first-run \ --check-for-update-interval=31536000 \ - --disable-features=TranslateUI,MetricsReporting,AutofillServerCommunication,PasswordManagerEnabled \ + --disable-features=TranslateUI,MetricsReporting,AutofillServerCommunication,PasswordManagerEnabled,GpuRasterization \ --disable-session-crashed-bubble \ --disable-save-password-bubble \ --disable-suggestions-service \ diff --git a/image-recipe/configs/archipelago-kiosk.service b/image-recipe/configs/archipelago-kiosk.service index 5db41f3c..d05e425f 100644 --- a/image-recipe/configs/archipelago-kiosk.service +++ b/image-recipe/configs/archipelago-kiosk.service @@ -25,8 +25,11 @@ RestartSec=5 # backend (it caused the .198 receive timeout + deploy storms). Cap CPU + memory # so a runaway kiosk can never take the whole machine down; Delegate so the cap # also binds the chromium/Xorg children in this unit's cgroup. +# CPUQuota=75% (0.75 cores) was too tight even for normal playback — the kiosk +# was throttled ~40% of the time, which is what caused choppy HDMI audio on +# archy-x250-exp (2026-06-28 incident). 200% (2 cores) gives enough headroom. Delegate=yes -CPUQuota=75% +CPUQuota=200% MemoryMax=1500M MemoryHigh=1200M