Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 1 addition & 32 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
`<sensor> <warn> [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)
Expand Down
28 changes: 28 additions & 0 deletions EXAMPLES_ADVANCED.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`<sensor> <warn> [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
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
in
rustPlatform.buildRustPackage {
pname = "framework_tool";
version = "0.6.5";
version = "0.6.6";

src = buildSrc;

Expand Down Expand Up @@ -144,7 +144,7 @@
in
rustPlatformWindows.buildRustPackage {
pname = "framework_tool";
version = "0.6.5";
version = "0.6.6";

src = buildSrc;

Expand Down Expand Up @@ -194,7 +194,7 @@
in
rustPlatform.buildRustPackage {
pname = "framework_uefi";
version = "0.6.5";
version = "0.6.6";

src = buildSrc;

Expand Down
2 changes: 1 addition & 1 deletion framework_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
11 changes: 8 additions & 3 deletions framework_lib/src/power.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down
4 changes: 2 additions & 2 deletions framework_tool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion framework_tool/framework_tool.1
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions framework_uefi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Loading