Improve macOS GPU monitoring and telemetry - #496
Open
spofdamon wants to merge 11 commits into
Open
Conversation
Apple IOReport samples scale correctly from roughly 1.2 W at idle to more than 60 W under a controlled Metal load. However, integer milliwatt-to-watt conversion flattened the entire 1.0-1.9 W range to 1 W and made the telemetry appear stuck. Retain one decimal place when no power limit is available and in snapshot output so low-power variation remains visible.
Apple Silicon exposes its GPU thermal domain through undocumented lowercase Tg keys in AppleSMC rather than Metal. Discover that sorted key range with a binary lookup, cache valid float sensors, and report their average without scanning the full SMC table. Throttle sensor reads to once per second and fail closed when the private protocol, key ordering, types, or permissions differ.
Apple Silicon exposes current fan speeds through undocumented F?Ac AppleSMC keys. Discover and cache valid float sensors alongside the existing GPU temperature keys, throttle samples independently, and report the highest active system fan through nvtop's singular RPM field. Keep temperature and fan discovery independent so either metric remains available when the other key family is missing or changes. Prefer measured RPM over the integrated-GPU CPU-FAN placeholder, and reject malformed sensor samples.
Author
|
I can remove 629ab90 if you're not interested in mac CI. |
spofdamon
force-pushed
the
macos-support
branch
from
August 5, 2026 19:43
71d5cab to
49cfee7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Apple-specific telemetry fails gracefully when private IOReport, IOKit, or SMC data is unavailable.
Testing