Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): drop 'keep the display asleep' from the SIGABRT hint

[._.]/ Adam Eivyfd7bd73cd397
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index a40b178570..41a898e09c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -75,7 +75,7 @@
## Video generation
- **[issue-3100] New Control mode for local video generation** — feed a control clip (a depth pass, a pose track, edges) alongside your prompt and the render follows its structure and motion instead of inventing them. The reference can be a fresh upload or any prior render from your history, and a strength slider dials how tightly the output tracks it. A half-res preview toggle skips the refinement pass so you can check whether a control clip fits before committing to a full render. Requires an LTX-2 model; the ~654 MB Control weight downloads with progress from the mode panel and is covered by the existing model verify/repair buttons.
-- **[issue-3101] A local render that dies on a signal now says what actually killed it.** The most common way an Apple Silicon render aborts is the macOS Metal command-buffer watchdog killing an over-long GPU command buffer, and it used to surface as a bare `Killed by signal SIGABRT` — no cause, no next step, and easy to mistake for a bug in the model or in PortOS. That failure now names the watchdog and tells you to lower the resolution and/or frame count and keep the display asleep; `SIGBUS`/`SIGSEGV` are reported as a native crash in the MLX/Metal layer with a runtime-reinstall pointer, and out-of-memory `SIGKILL` reads as before. Every signal failure also quotes the runtime fingerprint it died on (runtime, mlx/mlx-metal versions, chip, macOS build), so the report stands on its own. A signal PortOS doesn't have a diagnosis for is still reported verbatim rather than mis-attributed.
+- **[issue-3101] A local render that dies on a signal now says what actually killed it.** The most common way an Apple Silicon render aborts is the macOS Metal command-buffer watchdog killing an over-long GPU command buffer, and it used to surface as a bare `Killed by signal SIGABRT` — no cause, no next step, and easy to mistake for a bug in the model or in PortOS. That failure now names the watchdog and tells you to lower the resolution and/or frame count and stop competing for the GPU; `SIGBUS`/`SIGSEGV` are reported as a native crash in the MLX/Metal layer with a runtime-reinstall pointer, and out-of-memory `SIGKILL` reads as before. Every signal failure also quotes the runtime fingerprint it died on (runtime, mlx/mlx-metal versions, chip, macOS build), so the report stands on its own. A signal PortOS doesn't have a diagnosis for is still reported verbatim rather than mis-attributed.
## Layered Intelligence
diff --git a/server/services/videoGen/generateVideoHelpers.js b/server/services/videoGen/generateVideoHelpers.js
index 737a7fcae4..3856a1d17f 100644
--- a/server/services/videoGen/generateVideoHelpers.js
+++ b/server/services/videoGen/generateVideoHelpers.js
@@ -250,11 +250,19 @@ export function formatRuntimeFingerprint(fp) {
//
// Keys are the signal NAMES Node reports on `close` (spawnDetached decodes the
// supervisor's 128+signum status back into the same names).
+//
+// NOTE on the SIGABRT advice: the LoRA-trainer mitigation for this same watchdog
+// is "let the display sleep" (docs/TROUBLESHOOTING.md), but that is NOT offered
+// here — generateVideo holds a `caffeinate -dis` assertion for the child's whole
+// lifetime, so display sleep is impossible during a render by construction.
+// Telling the user to do something the render itself prevents would be worse
+// than saying nothing. Running the machine headless still works (caffeinate
+// can't wake a display that isn't attached), so that's what we point at.
const nativeCrashCause = (signal) => `Render crashed (${signal}) — a native fault inside the MLX/Metal layer, not a PortOS-level error. Retry with a lower resolution/frame count; if it repeats on the same model, reinstall that runtime from Settings → Video (a mismatched mlx / mlx-metal pair in the venv is the usual cause).`;
const SIGNAL_DEATH_CAUSES = Object.freeze({
SIGKILL: 'Process killed (likely out of memory — try a smaller model or resolution)',
- SIGABRT: 'Render aborted (SIGABRT) — on Apple Silicon this is almost always the macOS Metal command-buffer watchdog killing an over-long GPU command buffer (kIOGPUCommandBufferCallbackErrorImpactingInteractivity), not a bug in the model or PortOS. Lower the resolution and/or frame count so each command buffer does less work, and keep the display asleep (or drive the machine headless) so the render is not competing with WindowServer compositing.',
+ SIGABRT: 'Render aborted (SIGABRT) — on Apple Silicon this is almost always the macOS Metal command-buffer watchdog killing an over-long GPU command buffer (kIOGPUCommandBufferCallbackErrorImpactingInteractivity), not a bug in the model or PortOS. Lower the resolution and/or frame count so each command buffer does less work, and quit other GPU-heavy apps so the render is not competing for the GPU with WindowServer compositing (driving this machine headless over SSH avoids that contention entirely).',
SIGBUS: nativeCrashCause('SIGBUS'),
SIGSEGV: nativeCrashCause('SIGSEGV'),
});