From e4b9a52aed4b768badd66cb99c93e22b02ddb0df Mon Sep 17 00:00:00 2001 From: igneum-josh <337424239+igneum-josh@users.noreply.github.com> Date: Tue, 6 Oct 2026 16:11:37 +0100 Subject: [PATCH] ember: a registered Igneum Power Helper task counts as permission for the tune (an unelevated measurement engine, Power control forced off, still sets NVIDIA limits through the task with no prompt) Co-Authored-By: Claude Fable 5.1 --- app/igneum-app/src/engine.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/igneum-app/src/engine.rs b/app/igneum-app/src/engine.rs index bd690bdfa..d3bf7a823 100644 --- a/app/igneum-app/src/engine.rs +++ b/app/igneum-app/src/engine.rs @@ -2295,7 +2295,9 @@ impl Engine { }; // NVIDIA control: this process is elevated (direct), or Power control is on so the one-prompt helper may run. // The --sweep job alone never counts: it must not raise a prompt on a PC with nobody there (5 October 2026). - let power_control = probe.direct || self.shared.settings.lock().unwrap().power_control; + // a registered Igneum Power Helper task (src/powertask.rs) is permission too: it sets limits with no prompt, + // so an unelevated measurement engine (Power control forced off) still controls NVIDIA through it + let power_control = probe.direct || self.shared.settings.lock().unwrap().power_control || (cfg!(windows) && self.power_task_registered()); // AMD's power limit is a percent offset from the default (ADLX): the plan's watts scale becomes a percent // scale (default 100, floor 100 + plimit_min, ceiling 100 + plimit_max), tune_apply sends pct - 100 let limits = if c.vendor == "amd" && probe.direct && probe.plimit_max >= probe.plimit_min && probe.plimit_min > -100.0 { @@ -2388,7 +2390,8 @@ impl Engine { /// The elevated helper (src/sweep.rs helper_script_*): one administrator prompt; it polls /sweep/cmd.txt. fn sweep_helper_start(&mut self, c: &CardState) -> Result<(), String> { - if !self.shared.settings.lock().unwrap().power_control { + let task = cfg!(windows) && self.power_task_registered(); + if !task && !self.shared.settings.lock().unwrap().power_control { return Err("Power control is off in Settings".into()); } let dir = self.sweep_dir();