docs: VM handoff — CLAUDE.md, Ubuntu bootstrap, headless-Sway setup for M0
Prepares the move to the NVIDIA-GPU Ubuntu VM where M0/M2 run (macOS can't drive the Wayland/GPU stack). The repo carries the context, since Claude Code sessions are machine-local and don't transfer. - CLAUDE.md: project state + design invariants + don't-regress security notes. Auto-loads every session, so a fresh session on the VM continues from here. - scripts/bootstrap-ubuntu.sh: verifies the (already-installed) NVIDIA/NVENC stack, installs rustup + PipeWire/portal/wlroots/Sway + DRM/EGL/GBM/VA dev deps; GATES the FFmpeg -dev headers so apt can't clobber a custom NVENC build; checks nvidia-drm.modeset. - scripts/headless/: headless-Sway + xdg-desktop-portal-wlr config templates, the NVIDIA-wlroots env workarounds, run-headless-sway.sh, and a wf-recorder->hevc_nvenc capture smoke test (proves capture->NVENC with no Rust). - docs/linux-setup.md: M0 walkthrough + verified gotchas (modeset, headless backend, vGPU NVENC licensing, dmabuf->NVENC CPU-copy fallback, FFmpeg-dev gate, crate versions). Ubuntu 24.04 package names/versions verified against the live archive; scripts pass shellcheck and `bash -n`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prove the capture->NVENC chain end to end WITHOUT writing any Rust, using wf-recorder
|
||||
# (wlr-screencopy) piped into hevc_nvenc. Run from a shell where headless Sway is up and
|
||||
# WAYLAND_DISPLAY + XDG_RUNTIME_DIR are exported (see run-headless-sway.sh output).
|
||||
#
|
||||
# Usage: scripts/headless/capture-smoke-test.sh [output.mkv] [WxH-unused]
|
||||
# Ctrl-C to stop; then play/inspect the file (e.g. ffprobe out.mkv).
|
||||
set -euo pipefail
|
||||
|
||||
OUT="${1:-/tmp/lumen-headless-test.mkv}"
|
||||
: "${WAYLAND_DISPLAY:?set WAYLAND_DISPLAY (e.g. wayland-1) — is headless Sway running?}"
|
||||
: "${XDG_RUNTIME_DIR:?set XDG_RUNTIME_DIR=/run/user/\$(id -u)}"
|
||||
|
||||
command -v wf-recorder >/dev/null || { echo "wf-recorder missing — run scripts/bootstrap-ubuntu.sh"; exit 1; }
|
||||
|
||||
echo "recording HEADLESS-1 -> $OUT (wlr-screencopy -> hevc_nvenc, low-latency). Ctrl-C to stop."
|
||||
# Low-latency NVENC params verified for FFmpeg 6.x/7.x: preset p1, tune ull, no B-frames.
|
||||
exec wf-recorder -o HEADLESS-1 -c hevc_nvenc \
|
||||
-p preset=p1 -p tune=ull -p rc=cbr -p bf=0 -p delay=0 \
|
||||
-f "$OUT"
|
||||
Reference in New Issue
Block a user