From 5c5ed57abea7d5585b62c1adb63291766baf069d Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sat, 20 Jun 2026 14:59:07 +0200 Subject: [PATCH] docs(live-power): document C3 wake-safety invariant; tidy rcorder block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clawdie_live_power is a one-shot boot script that applies the power_profile C-state policy once (FreeBSD's power_profile is nostart and otherwise only runs on a devd AC-line transition). Comment-only clarification — no behavior change: - Move the PROVIDE/REQUIRE/BEFORE/KEYWORD rcorder block to the top (convention; rcorder scans the whole file, so behavior is identical). - Document scope explicitly: this selects a CPU C-state/freq profile ONLY — never suspend/sleep/blank/DPMS (screen-blank is the separate no-blank stack). - Record the wake-safety invariant: both AC (0x01) and battery (0x00) branches are safe because rc.conf pins performance_cx_lowest AND economy_cx_lowest to C3, so neither can select a deeper C-state that breaks USB resume. Guard-rail for future editors: do not deepen on the live USB. sh -n clean; rcorder tags intact. Co-Authored-By: Claude Opus 4.8 --- live/operator-session/clawdie-live-power | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/live/operator-session/clawdie-live-power b/live/operator-session/clawdie-live-power index 78c7fef..6ecc1dc 100644 --- a/live/operator-session/clawdie-live-power +++ b/live/operator-session/clawdie-live-power @@ -1,14 +1,22 @@ #!/bin/sh +# PROVIDE: clawdie_live_power +# REQUIRE: FILESYSTEMS syslogd +# BEFORE: LOGIN +# KEYWORD: nojail +# # Clawdie operator USB live power baseline. # Applies the rc.conf power_profile C-state policy once at boot. FreeBSD's # power_profile service is marked nostart and normally runs only when devd sees # an AC-line transition, so a live USB can otherwise sit at the firmware/default # C-state until AC is unplugged/replugged. - -# PROVIDE: clawdie_live_power -# REQUIRE: FILESYSTEMS syslogd -# BEFORE: LOGIN -# KEYWORD: nojail +# +# Scope: this selects a CPU C-state/frequency profile ONLY. It never suspends, +# sleeps, blanks the screen, or enables DPMS (screen-blank is handled separately +# by the no-blank stack: xorg.conf.d/40-clawdie-noblank.conf + the power-manager +# skel + clawdie-noblank-guard.sh). Both branches are wake-safe: rc.conf pins +# performance_cx_lowest AND economy_cx_lowest to C3, so neither the AC (0x01) nor +# battery (0x00) profile can drop into a deeper C-state that breaks the +# USB-backed resume path. Keep both at C3 on the live USB — do not deepen. . /etc/rc.subr