Power Consumption, Voltage & Current Sensor Telemetry #19
Notifications
Due Date
No due date set.
Depends on
#2 SMC Interface Engine (AppleSMC IOKit Client)
gronod/MacMonitor
Reference: gronod/MacMonitor#19
Reference in New Issue
Block a user
Purpose
Provide granular power, voltage, and electrical current telemetry on Intel Macs, detailing overall system wattage, CPU package power (Intel RAPL equivalent), GPU power, and rail voltages.
Priority
Medium (Valuable for power draw optimization, thermal management, and power supply monitoring)
Dependencies
Scope
PSTR,PDTR)PCPR,PCTR)PG0R,PGTR)PMSR)VC0C) and current (IC0C)Implementation Suggestions
P*), voltage keys (V*), and current keys (I*).sp78(signed fixed-point),fpe2, and standard 32-bit floats (flt).Technical Implementation Plan & Code Solution
1. Intel Electrical Telemetry Architecture
Intel Macs report electrical domain metrics across voltage rails, current sense resistors, and power meters via AppleSMC:
PSTRorPDTR(Watts)PCPR(Intel RAPL energy accumulator exposed via SMC)PG0RPMSRVC0C(Volts) andIC0C(Amperes)2. Objective-C Provider (
MMElectricalProvider.m)3. Swift UI Integration
4. Intel RAPL Alignment
PCPRreflects the Intel Running Average Power Limit (RAPL) package power domain, matching measurements from Intel Power Gadget.Completed in
feat/19-power-voltageand merged intodevelop.MMPowerTelemetryProviderquerying SMC power keys (PSTR,PDTR,PCPR,PG0R,PMSR), voltage keys (VC0C,VD0R), and current keys (IC0C,ID0R).MMSMCParserto support generalizedspXYandfpXYfixed point representations andioftfloats.MMPowerTests.swift.