Both 3090s normally run capped at 230W (quiet/cool), enforced at boot by
the enabled nvidia-power-cap.service oneshot. The cap suppresses benchmark
TPS — a documented artifact (e.g. an ik_llama "+18-20%" result that was
really just 230W vs 370W) — so maintainers need a quick way to uncap for a
true-TPS bench, then re-cap.
Adds `gpu-mode power-cap <on|off|status>` (alias: `powercap`):
- on: restart nvidia-power-cap.service (reusing the service as the single
source of truth for 230W). restart, NOT start: the unit is already
active from boot, and `start` on a RemainAfterExit oneshot is a no-op
that would silently fail to re-apply. Falls back to direct
`nvidia-smi -pl 230` if the service is missing.
- off: read each card's Default Power Limit from nvidia-smi and apply it.
Defaults differ per card here (GPU0 370W, GPU1 420W), so the value is
read, never hardcoded; nvidia-smi has no reset flag. Session-scoped:
a reboot or driver reload re-caps via the service (never disabled).
- status: print per-GPU enforced/default/min/max limits.
Also surfaces a one-line per-card cap state in `gpu-mode status` and echoes
the resulting enforced limit after on/off. Errors loudly (no nvidia-smi, no
sudo) in the script's existing style.
Live-tested on the rig: status -> off (370/420) -> status -> on (230/230),
verified each transition with `nvidia-smi -q -d POWER`; left at 230W.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>