feat: add fan curve control via temperature-based fan speed curves

- Backend HAL (hal/fans.py): NVML v2 fan read/set/reset with min/max queries
- Server endpoints: GET/POST /api/fans, POST /api/fans/reset, POST /api/fans/speed
- Background fan poller: reads GPU temp every 2s, interpolates fan speed from curve
- Profile integration: fan_curve field saved/applied, auto-restore on shutdown
- Frontend: FanCurveEditor (SVG chart with drag/add/delete points), FanMonitor sidebar
- App.tsx: three-tab layout (Curve, Performance, Fans)
- GaugeCard: optional history sparkline, Fan Mode card without sparkline
- fan_mode field populated as 'curve' or 'auto' in GET /api/fans
This commit is contained in:
ARIA committed 2026-08-01 15:59:39 +02:00
1 parent 7605d21e27
commit 477c4becae
11 files changed
+1288 -10

No files matched your search

+15
View File
@@ -66,10 +66,25 @@ export interface LimitsState {
max_mem_offset_mhz: number | null;
}
export interface FanPoint {
temp_c: number;
fan_pct: number;
}
export interface FanState {
fan_pct: number | null;
fan_mode: number | null;
min_fan_pct: number | null;
max_fan_pct: number | null;
curve: FanPoint[] | null;
curve_active: boolean;
}
export interface ProfileData {
name: string;
gpu_name: string;
curve_deltas: Record<string, number>;
mem_offset_mhz: number | null;
power_limit_w: number | null;
fan_curve: FanPoint[] | null;
}