Description
Summary
On Framework Laptop 13 (AMD Ryzen 7040), framework_tool --thermal always prints AP Throttle Status: Unknown. The EC firmware on this platform does not implement EC_CMD_GET_AP_THROTTLE_STATUS (0x3E22, added in #354), and the error is silently discarded via .ok() in get_thermal().
Environment
- Platform: Framework Laptop 13 (AMD Ryzen 7040 Series)
- BIOS: 03.18
- framework_tool: 0.6.6 (NixOS)
- OS: Linux 7.3.0,
/dev/cros_ec(cros_ec_lpcs)
Reproduction
$ sudo framework_tool --thermal -vv
local_f75303@4d: 38 C
cpu_f75303@4d: 37 C
ddr_f75303@4d: 35 C
cpu@4c: 49 C
APU Fan: 0 RPM
[INFO ] Fan 1: Not present
[INFO ] Fan 2: Not present
[INFO ] Fan 3: Not present
AP Throttle Status
Unknown
Sending the command directly confirms the EC does not support it:
$ sudo framework_tool --host-command 15906 0
EC command failed: Response(InvalidCommand)
The public EC source for this platform (fwk-lotus-azalea-19573 branch of FrameworkComputer/EmbeddedController) defines 0x3E21 and 0x3E24 but no 0x3E22.
Expected
On platforms whose EC returns InvalidCommand, either hide the AP Throttle Status section (like fans that are Not present are only logged at info level), or print something explicit such as Not supported by EC firmware instead of Unknown. Other errors could still be reported as Unknown, ideally with the error logged at debug level.
Relevant code
framework_lib/src/power.rs:
let throttle = ec
.get_ap_throttle_status()
.ok()
...
println!(" AP Throttle Status");
if let Some(throttle) = info.throttle { ... } else { println!(" Unknown"); }
Activity
--thermal: Hide AP throttle status when unsupported by EC