-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMC sensor keys for Apple M3 and M3 Pro/Max #1703
Comments
Hi. If you are sure the keys you have in the script is the correct I can add them to the Stats. |
The ones I have in the script are currently just guesses. I am somewhat confident the P-core/E-core temperature ones are right, but I'll keep tinkering with this to build some more confidence. I'm pretty sure the GPU-related ones are wrong, I'm still working on hunting those down. |
Thanks. I will add CPU cores to the Stats. Please let me know if you will find more sensors. |
PS: you have duplicated |
Indeed I did, whoops. The E-core sensors are hard to figure out because of how challenging it is to get a heavy enough user workload to stay running on those (even with "background" QoS class, low niceness, etc). Maybe I'll try triggering a Spotlight rebuild or something, that should put some load on them. And I know that is pretty sticky to E-cores. |
Okay, I updated the script and ran some more workloads to try and figure out the E-core/P-core/GPU temperature sensors. The P-core ones I'm pretty certain are right. The E-core ones are probably correct, but it's hard to tell. Even under load (Spotlight reindexing and Time Machine backup), they only get as high as about 54C and idle at 48C. I didn't see any other sensors that were obviously correct though. As for the GPU ones, they're very definitely correlated (rising and dropping based on the GPU workload), but there sure are a lot of them. I mean, yes, there are 40 GPU cores in this thing, but 14 sensors for that seems like too many. EDIT: Pared the GPU sensors down to just eight -- six of them were duplicating values from other keys. As for power sensors, I think I might have a lead on the GPU power value. Comparing with output of
The above is when |
@tycho it's a pretty nice script) Will try to find an m2 platform to get sensors for that soc. Because m2 has a pretty big gap in the sensors. I want to add this functionality to the app now😅 |
I've got an M2 MacBook Air I could tinker with getting some more sensor info from. I'll have to see what I can find. |
On my M3 (not Pro or Max) my guesses using smc (and comparison with watch-smc and values.swift) are: P-Cores: There are no Tf keys - so completely different. I think the 4 cores are: E-Cores: I am happy with Te05 and Te0L (as in your list). I think Te0P is wrong and Te0S does not exist. |
Interesting! Could you share the output of "/Applications/Stats.app/Contents/Resources/smc list"? It would be interesting to know which keys the M3 and M3 Max have in common -- any added keys in the M3 Max might be the additional cores and could give hints as to the naming scheme. |
Here you are: Uploading smc20231129-1527.txt… |
Try again? It didn't finish uploading before you hit submit. :) |
Try again: |
Wow, that's a lot more differences than I was expecting. |
Very different. Maybe the M3 is just a souped up M1 design and its sensors are more like an M1. This is my only AS Mac so can't compare. My interest is that, for my own amusement, I use Cacti (SNMP network monitoring) to capture a few Mac sensors and have always based that on running smcutil/smc under an SNMP script. |
I updated the For example, here's what happens with the Power-related SMC keys during a GPU-based (MetalRT on) Blender render on my M3 Max:
During this run, |
I've added some notes on here: https://gist.github.com/tycho/73fb64e7ba0b259923a92a4bacea9e78 To summarize, my current line of thought on the breakdown for the PCxx values is:
I'm not completely sure what PC40 is, but a Blender render (with or without MetalRT) will light that one up. PC32 is a bit confusing too, because it ticks up at unpredictable times. I think it might be something to do with memory bus load. Unfortunately all the PCxx keys are not present on the M3 base model, only on M3 Max. It's entirely possible that M3, M3 Pro, and M3 Max all have different SMC keys. |
This looks promising: https://github.com/freedomtan/test-ioreport If you use that, one of the bits in the report it spews out is this (truncated because there's a lot):
It reports energy in milli-Joule counters. So you can take two snapshots, subtract to get deltas between the two snapshots, divide by time between reading samples, and ta-daa, you have watts for each metric. That seems to be the interface that the @exelban Think you could try out integrating an IOReport method for gathering power metrics? I recommend trying the project I mentioned with the command line |
Hi, I have added CPU and GPU sensors in today release. If you will have more keys to add just ping me. |
@exelban The sensor list is still a bit wonky. |
oh, I forgot to detect m3 platform( |
Could you please check this build: |
thx, I have updated the latest release with this fix. |
the cpu sensor temps are not ok. they show like 10 degree less than powermetrics / istat / tg pro . on my 16" m3 max 14 core. |
PDBR i suspect it's Display. i see it goes from 1W to 11W based on backlight. |
Agreed, already had that one here: |
Can you post your "smc list" output as well? That might help narrow down the core temp sensor possibilities. |
@djcristi Updated with your 14-core M3 Max keys: https://gist.github.com/tycho/73fb64e7ba0b259923a92a4bacea9e78 I added a quick way to see the difference between the 14 and 16 core versions:
Some of the keys not in the 14-core are present in both M3 base spec and M3 Max 16-core, which is strange. Here's the list of ones present only in the 16-core version:
And these are 14-core only keys (not in M3 base or M3 Max 16-core models):
|
did you notice the cpu power consumption diff? so in my 13" pro m1 , the powermetrics power is the same with the one reported by the one from smc. In this 16 m3 max 14c (Sonoma 14.1.2 & 14.2), under full p-cores load (https://cpux.net/cpu-stress-test-online , 10 thread at 100%) auto/high-power mode: smc reports ~60W (62 phpc/ 58 phps, 10 display pdbr, 86W total DC IN), AC power meter 92W and powermetrics only 48W cpu/pkg on low power mode: smc reports 30-32W (32 phpc/ 30 phps, 10 display pdbr, 53W total DC IN), AC power meter 57W and powermetrics only 21W cpu/pkg. Considering total power consumption, powermetrics is wrong. l.e. same for GPU @tycho can you test on your 16 core to see how this looks? |
Hi @exelban |
@joujek no problem. Just give keys that need to be used instead of actual. |
UPDATE: HI @exelban below the keys found by decompiling one of alternative sw: Px - x performance core / Ex - x efficiency core M2 8C: Tp0b E1 M2 PRO 10C Tp01 P1 Tp0f E1 M2 PRO 14C Tp01 P1 Tp1h E1
Thank you in advance |
In addition I'm attaching dump for M3/Pro/Max Platform: Mac15,3, Mac15,6, Mac15,8, Mac15,10, Mac15,7, Mac15,9, Mac15,11 ++ GPU: Hope it helps |
@joujek Your E-cores, I am not so sure about. When P-cores are loaded and the E-cores not, your values for the E-cores are roughly the same as the P-cores - I would expect them to be lower. My best guess is Te05 and Te0L for two E-cores, but I am stuck for the other two! All the other Te values are higher than those. Looking at other products: TGPro shows e-cores lower than p-cores and agree with using Te05 and Te0L. iStat shows e-cores always about the same as p-cores - suggesting it uses Tp0B, etc for E-cores. |
HI @gilby101 - The dump I shared is from latest iStat ;) Personally I have M2 Pro 12/19 and compared iStats vs Macs Fan Control vs Stats (unknown sensors list). |
Hi @joujek My feeling is that TG Pro is ahead of iStats for the M3 (not pro/max). I will leave you do any serious reverse engineering. |
@tycho : macbook pro 14" m3 max 14c tg pro vs istat: |
sorry , i don't want to add posts with power consumption results here since it's different than this topic. i moved them here : https://forums.macrumors.com/threads/m3-max-14c-powermetrics-wattage-wrong-14-vs-16.2414321/ |
@exelban any feedback on this ? |
@exelban do you have on plan to fix temp sensors for m3 max, it does not show correct temp , i guess you've messed the sensor names. also the PDBR (mini-led backlight power) i think can be put as known sensor, it's common along Macbook xdr display (14/16 mbp) |
@djcristi all sensors from that issue have already been included in the build for a few weeks. |
Just updated to version Version 2.9.20: Seems like the values from commit df1a0a8 are not working for M3 pro 11C CPU. |
Describe the bug
I am sure this will be a fun one to figure out, but it would be nice if Stats could recognize and handle the SMC sensors for the Apple M3 (and Pro/Max) chips. The keys are definitely different from M1 and M2. Here's what Stats currently sees (during a CPU-intensive build, so the sensors look a bit alarming):
It's pretty clear it's not reading the right keys, particularly for CPU P-core/E-core temperature sensors and the GPU.
I've written a little script to try and identify the right sensors, but there is a lot of data making it difficult to correlate. Some of the SMC values are likely not instantaneous values but rather aggregates over certain time windows (e.g. moving averages or similar).
Here's the work-in-progress script. I've added some comments to it to explain the design. I also have a few guesses in there for what some of the keys correlate to.
https://gist.github.com/tycho/73fb64e7ba0b259923a92a4bacea9e78
If you have any tips on identifying the right sensors for temperature, power, etc, I'd appreciate suggestions.
Details:
The text was updated successfully, but these errors were encountered: