---
name: project-sauna-status
description: "sauna project current state — firmware wedge bug SOLVED (0.4.4 shipped); next = commit CMake fix + resume sauna host-side work"
metadata: 
  node_type: memory
  type: project
  originSessionId: c606d528-3691-41f2-b79a-1a40bc4e6359
---

sauna = standalone DirectMode compositor turning Bigscreen Beyond into self-tracked 3DOF wearable spatial display. No lighthouses, no SteamVR. Goal: daily-driver virtual-monitor product (double-click, curved multi-monitor desktop, don to wake, doff to sleep, SteamVR coexistence, zero config).

**Why:** Brandon is a Bigscreen Beyond developer — full firmware stack is accessible (build/flash/debug).

**Current head:** `0c3c77d` (main, 2026-06-15, local only — not pushed) — three VRAM fixes + suspend/resume coexistence code.

**M1-M3:** Complete.

**M4/M5 VRAM work DONE (b017148):**
1. Single-buffer scanout during doze — free scanout buffer 1 (~100MB) on doze enter, recreate on wake. Buffer 0 held (link never drops).
2. Free capture ring on SteamVR coexistence — stop() capture sources on release (not just pause). VERIFIED: 629→69 MB, clean reclaim.
3. VRAM counter dGPU fix — pick max-dedicated-VRAM adapter instead of hardcoded adapter 0 (iGPU on hybrid box = 0 MB / CAP LOST bug).

**FIRMWARE BUG — SOLVED (2026-06-15):**
Root cause: **`-mlong-calls`** flag in `beyond_synaptics/CMakeLists.txt`. Official Studio build never had it. Under FreeRTOS + SteamVR addon multitask load, corrupts MCU call dispatch → hard wedge (USB alive, app hung, bootloader unreachable). 5/5 controlled bisection across: 0.3.18 control, nonano, matchofficial, nofastmath, nomlong.

Disproven in order: HID dispatch collision → newlib-nano → `-ffast-math` → **`-mlong-calls` confirmed**.

**Fix shipped:** `beyond_synaptics/CMakeLists.txt` — removed `-mlong-calls`, removed `-ffast-math`, corrected G19→J19. Released as fw 0.4.4. Committed `f805163` on `beyond_synaptics` branch `doze-warm-sleep`, pushed to `origin`. Worktrees cleaned. HMD HFENDULEAM validated on 0.4.4 alive through full session.

**Sauna suspend/resume code (0c3c77d):** committed to main locally, NOT pushed. Brandon's call: keep as defensive SteamVR-coexistence (was not wedge fix; firmware -mlong-calls was). Revert later if unneeded.

**NEXT SESSION:**
1. `beyond_synaptics` PR/merge — doze-warm-sleep branch pushed, PR not opened. Decide: open PR + merge 0.4.4 to beyond_synaptics main. Note: branch carries full M5 doze feature, not just 0.4.4 fix — scope merge accordingly.
2. Sauna `0c3c77d` push-or-hold — committed locally, decide push vs revert.
3. Triage untracked files: `dist_doze_optic_strip.png`, `dist_doze_ramp_compare.png`, `.screen-timelapse/` — gitignore or remove.
4. Resume M5/M6 sauna roadmap (firmware detour is done).
5. (Optional) Propagate 0.4.4 to other rigs (enlyzeam etc.) if they hit wedge.
6. (Lower) Confirm VRAM fix #2 kills enlyzeam growing leak — run SteamVR cycle, watch [VRAM] logs.

**UNCOMMITTED sauna code (decision pending):**
McuProx suspend()/resume() + resumeProx() in spatial_light.cpp. Rationale (BeyondProximity collision avoidance) was disproven. Either (a) rebrand as SteamVR-coexistence hygiene + reword comments, or (b) revert. Brandon said "keep+commit" before firmware finding; lean (b) unless hygiene value confirmed.

**HARDWARE / ENV STATE (HFENDULEAM):**
- HMD WEDGED (right optic) — needs power-cycle before any testing.
- fw 0.4.3 (flashed this session from 0.4.1). MCU app = 35BD:0101, bootloader = 35BD:4004. Hard-wedge signature = VID_0000/PID_0002.
- BeyondProximity + BeyondProximityUI deregistered via vrpathreg (were bey-closer-t1 prototype leftovers). BeyondEyetracking + BeyondSteamVR still registered.
- SteamVR reverted from beta to public release.

**TEST TRICKS:**
- Prox-independent: run sauna `--capture` without prox/force-worn → reclaimNow=!haveProx, capture runs continuously.
- Clean SteamVR quit = vrmonitor CloseMainWindow() (NEVER force-kill).
- Don't overlap two spatial_light instances (DirectMode conflict 0xffffff2b).

**OPEN BACKLOG (lower priority):**
- HMD stuck-dim/wedge on monitor topology change (WM_DISPLAYCHANGE or firmware shared root).
- sauna doesn't detect monitor attach/detach dynamically (needs restart).
- Display X/Y layout doesn't match Windows virtual-desktop layout → cursor offset.
- Confirm fix #2 on enlyzeam growing leak.
- 75-vs-90 layout gap, stereo comfort at large azimuths on 3+ monitor rigs.

**How to apply:** Firmware is an available layer. Next session is firmware investigation, not sauna host-side work. MCU HID command trace + doze-latch diff is the starting point.
