diff --git a/Cargo.lock b/Cargo.lock index abd1418..2e8d9e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -408,7 +408,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "framework_lib" -version = "0.6.5" +version = "0.6.6" dependencies = [ "built", "clap", @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "framework_tool" -version = "0.6.5" +version = "0.6.6" dependencies = [ "embed-resource", "framework_lib", @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "framework_uefi" -version = "0.6.5" +version = "0.6.6" dependencies = [ "framework_lib", "log", diff --git a/EXAMPLES.md b/EXAMPLES.md index 5e24685..d8bba6b 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -491,9 +491,7 @@ The sensor names are reported by the EC firmware: ddr_f75303@4d: 35 C peci-temp: 42 C APU Fan: 0 RPM - AP Throttle Status - Soft: false - Hard: false + EC PROCHOT#: deasserted ``` ## Check thermal thresholds @@ -519,35 +517,6 @@ sensor warn high halt fan_off fan_max name (all temps in degrees Celsius) ``` -## Set thermal thresholds - -Adjust the thresholds shown by `--thermalget`. The arguments are -` [high [halt [fan_off [fan_max]]]]` in degrees Celsius, -in the same order as the `--thermalget` columns. Use `-1` to keep a -threshold and `0` to disable it. The tool prints the resulting -configuration: - -``` -# Lower the battery (sensor 2) high/halt thresholds to 45/55 degrees -> sudo framework_tool --thermalset 2 -1 45 55 -sensor warn high halt fan_off fan_max name - 0 - 88 98 40 75 local_f75397@4c - 1 - 88 98 40 78 cpu_f75303@4d - 2 - 45 55 40 50 battery_temp@b - 3 - 87 97 40 50 ddr_f75303@4d - 4 - 120 127 103 105 peci-temp -(all temps in degrees Celsius) - -# Make the CPU sensor (sensor 1) spin the fan up at 45 and reach 100% at 70 degrees -> sudo framework_tool --thermalset 1 -1 -1 -1 45 70 -``` - -**Note:** There is no command to restore the default thresholds. They are -compiled into the EC firmware and only re-applied when the EC itself -reboots (e.g. after the system was powered off and disconnected from -power for a while). Check the current values with `--thermalget` before -changing them, so you can restore them manually. - ## Check sensors ### Ambient Light (Laptop 13, Laptop 16) diff --git a/EXAMPLES_ADVANCED.md b/EXAMPLES_ADVANCED.md index c52b296..238d904 100644 --- a/EXAMPLES_ADVANCED.md +++ b/EXAMPLES_ADVANCED.md @@ -470,3 +470,31 @@ r12: sp :00000000 lr : pc : cfsr = 0, shcsr = 0, hfsr = 0, dfsr = 0 ``` +## Set thermal thresholds + +**Note:** There is no command to restore the default thresholds. They are +compiled into the EC firmware and only re-applied when the EC itself +reboots (e.g. after the system was powered off and disconnected from +power for a while). Check the current values with `--thermalget` before +changing them, so you can restore them manually. + +Adjust the thresholds shown by `--thermalget`. The arguments are +` [high [halt [fan_off [fan_max]]]]` in degrees Celsius, +in the same order as the `--thermalget` columns. Use `-1` to keep a +threshold and `0` to disable it. The tool prints the resulting +configuration: + +``` +# Lower the battery (sensor 2) high/halt thresholds to 45/55 degrees +> sudo framework_tool --thermalset 2 -1 45 55 +sensor warn high halt fan_off fan_max name + 0 - 88 98 40 75 local_f75397@4c + 1 - 88 98 40 78 cpu_f75303@4d + 2 - 45 55 40 50 battery_temp@b + 3 - 87 97 40 50 ddr_f75303@4d + 4 - 120 127 103 105 peci-temp +(all temps in degrees Celsius) + +# Make the CPU sensor (sensor 1) spin the fan up at 45 and reach 100% at 70 degrees +> sudo framework_tool --thermalset 1 -1 -1 -1 45 70 +``` diff --git a/README.md b/README.md index 202463f..4bf7973 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ To add it to your project add it to your `Cargo.toml`: ```toml [dependencies] -framework_lib = "0.6.5" +framework_lib = "0.6.6" ``` ## Features diff --git a/flake.nix b/flake.nix index 98aa00c..fe8d073 100644 --- a/flake.nix +++ b/flake.nix @@ -91,7 +91,7 @@ in rustPlatform.buildRustPackage { pname = "framework_tool"; - version = "0.6.5"; + version = "0.6.6"; src = buildSrc; @@ -144,7 +144,7 @@ in rustPlatformWindows.buildRustPackage { pname = "framework_tool"; - version = "0.6.5"; + version = "0.6.6"; src = buildSrc; @@ -194,7 +194,7 @@ in rustPlatform.buildRustPackage { pname = "framework_uefi"; - version = "0.6.5"; + version = "0.6.6"; src = buildSrc; diff --git a/framework_lib/Cargo.toml b/framework_lib/Cargo.toml index 512d7b3..8f01aad 100644 --- a/framework_lib/Cargo.toml +++ b/framework_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_lib" -version = "0.6.5" +version = "0.6.6" description = "Library to control Framework Computer systems" homepage = "https://github.com/FrameworkComputer/framework-system" repository = "https://github.com/FrameworkComputer/framework-system" diff --git a/framework_lib/src/power.rs b/framework_lib/src/power.rs index 0453165..39eadfb 100644 --- a/framework_lib/src/power.rs +++ b/framework_lib/src/power.rs @@ -523,11 +523,16 @@ pub fn print_thermal(ec: &CrosEc) { } } - println!(" AP Throttle Status"); if let Ok(throttle) = ec.get_ap_throttle_status() { - println!(" Soft: {:?}", throttle.soft_ap_throttle == 1); - println!(" Hard: {:?}", throttle.hard_ap_throttle == 1); + if log_enabled!(Level::Info) { + println!(" AP Throttle Status"); + println!(" Soft: {:?}", throttle.soft_ap_throttle == 1); + println!(" Hard: {:?}", throttle.hard_ap_throttle == 1); + } else { + println!(" EC PROCHOT#: {}", if throttle.hard_ap_throttle == 1 { "asserted" } else {"deasserted"}); + } } else { + println!(" AP Throttle Status"); println!(" Unknown"); } } diff --git a/framework_tool/Cargo.toml b/framework_tool/Cargo.toml index a7f4f91..9ff9f10 100644 --- a/framework_tool/Cargo.toml +++ b/framework_tool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_tool" -version = "0.6.5" +version = "0.6.6" description = "Tool to control Framework Computer systems" homepage = "https://github.com/FrameworkComputer/framework-system" repository = "https://github.com/FrameworkComputer/framework-system" @@ -20,7 +20,7 @@ nvidia = [ "framework_lib/nvidia" ] [dependencies.framework_lib] path = "../framework_lib" -version = "0.6.5" +version = "0.6.6" [build-dependencies] static_vcruntime = "3.0" diff --git a/framework_tool/framework_tool.1 b/framework_tool/framework_tool.1 index aaf135d..0a3c847 100644 --- a/framework_tool/framework_tool.1 +++ b/framework_tool/framework_tool.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH framework_tool 1 "framework_tool 0.6.5" +.TH framework_tool 1 "framework_tool 0.6.6" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .SH NAME diff --git a/framework_uefi/Cargo.toml b/framework_uefi/Cargo.toml index d638c59..2d63848 100644 --- a/framework_uefi/Cargo.toml +++ b/framework_uefi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "framework_uefi" -version = "0.6.5" +version = "0.6.6" description = "UEFI Tool to control Framework Computer systems" homepage = "https://github.com/FrameworkComputer/framework-system" repository = "https://github.com/FrameworkComputer/framework-system" @@ -24,6 +24,6 @@ log = { version = "0.4", default-features = true } [dependencies.framework_lib] path = "../framework_lib" -version = "0.6.5" +version = "0.6.6" features = ["uefi"] default-features = false