feat: support M5#46
Merged
Merged
Conversation
Contributor
Author
|
@narugit Thanks for the great OSS! I've opened this PR to add Apple M5 support — would really appreciate your review when you have time. M5 対応の PR を出してみたので、お時間あるときにレビューいただけるとうれしいです。よろしくお願いします。 |
narugit
reviewed
Apr 21, 2026
narugit
left a comment
Owner
There was a problem hiding this comment.
対応ありがとうございます!
細かいですが下記対応をお願いいたします。
Co-authored-by: narugit <narusens@gmail.com>
Co-authored-by: narugit <narusens@gmail.com>
Contributor
Author
|
@narugit レビューありがとうございます!suggest changesをリンク先確認したうえでコミットさせていただきました! |
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
Add Apple M5 support so that
smctemp -c/smctemp -greturns valid temperatures on M5 Macs. Without this change, M5 Macs fall throughgetCPUModel()and always return0.0.SMC sensor keys for M5 are taken from exelban/stats
Platform.m5Genand verified against a real M5 MacBook Air (Mac17,3, macOS 26.3.2) viasmctemp -l.Verification
Tested on Apple M5 MacBook Air (Mac17,3, macOS 26.3.2):
smctemp -creturns ~35℃ at idle, ~46℃ underyes > /dev/nullloadsmctemp -greturns ~35℃ at idle, ~40℃ under CPU loadmake(no new warnings)Sensor keys added
Tp00,Tp04,Tp08,Tp0C,Tp0G,Tp0K(super cores),Tp0O,Tp0R,Tp0U,Tp0X,Tp0a,Tp0d,Tp0g,Tp0j,Tp0m,Tp0p,Tp0u,Tp0y(performance cores)Tg0U,Tg0X,Tg0d,Tg0g,Tg0j,Tg1Y,Tg1c,Tg1gSome keys are absent on base M5 silicon, but
CalculateAverageTemperaturefilters out-of-range (10-120℃) readings automatically, so no extra logic is needed.