fix: fan settings persistence, profile indicator, and point removal #6

Merged
Pakobbix merged 1 commits from fix/fan-settings into main 2026-09-02 15:26:15 +00:00
Collaborator

Fixes three fan-settings issues.

1. No indicator that fan settings are saved in a profile
ProfilePanel.tsx now shows a cyan fan icon next to a profile's name when it has a saved fan curve (tooltip: "Custom fan curve saved"), alongside the existing pts / W / MHz mem badges.

2. Fan curve not applied after server restart
Root cause: the active fan curve was in-memory only, so it was lost on every restart. Fan control is volatile (driver reverts to auto on reboot), so the curve now persists and is restored:

  • config.py: new fan_curves field (per-GPU, keyed by the same stable GPU ID as auto-load profiles).
  • cli.py: loads fan_curves from /etc/nvcurve/config.json at startup.
  • server.py: new _activate_fan_curve / _deactivate_fan_curve helpers set state, (re)start the poller, and persist/clear the curve. All fan-curve changes route through them, so persistence stays in sync (apply, reset, profile apply). On startup the lifespan re-applies each GPU's persisted curve (validated first), after the auto-load-profile path.

After a restart the fan-curve window shows the applied curve (Active) instead of Defaults.

3. No way to remove a point
FanCurveEditor.tsx — removal existed but was nearly invisible. The chart remove button is now always faintly visible with an X glyph (red on hover); the table remove button is larger with a tooltip; added a hint line explaining add/remove.

Also includes a formatting pass over the two edited frontend files.

Verified: frontend builds cleanly (tsc + vite); backend imports cleanly; behavior confirmed on hardware.

Fixes three fan-settings issues. **1. No indicator that fan settings are saved in a profile** `ProfilePanel.tsx` now shows a cyan fan icon next to a profile's name when it has a saved fan curve (tooltip: "Custom fan curve saved"), alongside the existing pts / W / MHz mem badges. **2. Fan curve not applied after server restart** Root cause: the active fan curve was in-memory only, so it was lost on every restart. Fan control is volatile (driver reverts to auto on reboot), so the curve now persists and is restored: - `config.py`: new `fan_curves` field (per-GPU, keyed by the same stable GPU ID as auto-load profiles). - `cli.py`: loads `fan_curves` from `/etc/nvcurve/config.json` at startup. - `server.py`: new `_activate_fan_curve` / `_deactivate_fan_curve` helpers set state, (re)start the poller, and persist/clear the curve. All fan-curve changes route through them, so persistence stays in sync (apply, reset, profile apply). On startup the lifespan re-applies each GPU's persisted curve (validated first), after the auto-load-profile path. After a restart the fan-curve window shows the applied curve (Active) instead of Defaults. **3. No way to remove a point** `FanCurveEditor.tsx` — removal existed but was nearly invisible. The chart remove button is now always faintly visible with an X glyph (red on hover); the table remove button is larger with a tooltip; added a hint line explaining add/remove. Also includes a formatting pass over the two edited frontend files. Verified: frontend builds cleanly (tsc + vite); backend imports cleanly; behavior confirmed on hardware.
ARIA added 1 commit 2026-09-02 15:25:28 +00:00
Address three fan-settings issues:

1. Profile view: show a fan icon next to a profile's name when it has a
   saved fan curve, so it's clear which profiles carry custom fans.

2. Fan curve persistence: the active fan curve was in-memory only and lost
   on every server restart. It is now persisted per-GPU in
   /etc/nvcurve/config.json (fan_curves) and re-applied at server startup,
   so an applied curve survives restarts. All fan-curve state changes route
   through _activate_fan_curve/_deactivate_fan_curve helpers that keep the
   persisted state in sync (apply, reset, and profile apply).

3. Point removal: the fan-curve remove button was nearly invisible. The
   chart remove control is now always faintly visible with an X glyph, the
   table remove button is larger with a tooltip, and a hint line explains
   how to add/remove points.

Also includes a formatting pass over the two edited frontend files.
Collaborator

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
Pakobbix merged commit 06db52e8ac into main 2026-09-02 15:26:15 +00:00
Pakobbix deleted branch fix/fan-settings 2026-09-02 15:26:15 +00:00
Sign in to join this conversation.