Make CPU reset workaround skip resume from sleep
This commit is contained in:
parent
b1d53ab038
commit
5f6370e778
4 changed files with 24 additions and 20 deletions
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
|
@ -1052,7 +1052,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "powertools"
|
||||
version = "1.4.0-beta2"
|
||||
version = "1.4.0-beta3"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"libryzenadj",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "powertools"
|
||||
version = "1.4.0-beta2"
|
||||
version = "1.4.0-beta3"
|
||||
edition = "2021"
|
||||
authors = ["NGnius (Graham) <ngniusness@gmail.com>"]
|
||||
description = "Backend (superuser) functionality for PowerTools"
|
||||
|
|
|
@ -375,6 +375,7 @@ impl Cpu {
|
|||
|
||||
// https://github.com/NGnius/PowerTools/issues/107
|
||||
fn clock_unset_workaround(&self) -> Result<(), Vec<SettingError>> {
|
||||
if !self.state.is_resuming {
|
||||
let mut errors = Vec::new();
|
||||
POWER_DPM_FORCE_PERFORMANCE_LEVEL_MGMT.set_cpu(true, self.index);
|
||||
// always set clock speeds, since it doesn't reset correctly (kernel/hardware bug)
|
||||
|
@ -395,6 +396,9 @@ impl Cpu {
|
|||
} else {
|
||||
Err(errors)
|
||||
}
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn set_confirm(&self) -> Result<(), SettingError> {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "PowerTools",
|
||||
"version": "1.4.0-beta2",
|
||||
"version": "1.4.0-beta3",
|
||||
"description": "Power tweaks for power users",
|
||||
"scripts": {
|
||||
"build": "shx rm -rf dist && rollup -c",
|
||||
|
|
Loading…
Reference in a new issue