mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
engine: maintain previous state when CPU data is missing
This commit is contained in:
parent
c570a327ab
commit
72c2842227
1 changed files with 19 additions and 9 deletions
|
@ -369,15 +369,25 @@ fn manage_auto_turbo(report: &SystemReport, config: &ProfileConfig) -> Result<()
|
||||||
}
|
}
|
||||||
// In indeterminate states or unknown previous state, use the configured initial state
|
// In indeterminate states or unknown previous state, use the configured initial state
|
||||||
_ => {
|
_ => {
|
||||||
info!(
|
// If we have a previous state, maintain it for hysteresis even if load data is missing
|
||||||
"Auto Turbo: Using configured initial state ({})",
|
if let Some(prev_state) = previous_turbo_enabled {
|
||||||
if turbo_settings.initial_turbo_state {
|
info!(
|
||||||
"enabled"
|
"Auto Turbo: Maintaining previous state ({}) due to missing CPU data",
|
||||||
} else {
|
if prev_state { "enabled" } else { "disabled" }
|
||||||
"disabled"
|
);
|
||||||
}
|
prev_state
|
||||||
);
|
} else {
|
||||||
turbo_settings.initial_turbo_state
|
// No previous state exists, fall back to configured initial state
|
||||||
|
info!(
|
||||||
|
"Auto Turbo: Using configured initial state ({})",
|
||||||
|
if turbo_settings.initial_turbo_state {
|
||||||
|
"enabled"
|
||||||
|
} else {
|
||||||
|
"disabled"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
turbo_settings.initial_turbo_state
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue