Skip to content
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

No sensors for M4 #2249

Open
basercagan opened this issue Dec 1, 2024 · 46 comments
Open

No sensors for M4 #2249

basercagan opened this issue Dec 1, 2024 · 46 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@basercagan
Copy link

cpu and gpu temperature sensors are not showing

  • Device: [Macbook Pro 2024 M4]
  • macOS: [15.1.1]
  • Application version: [2.11.19]
@therealFoxster
Copy link

Same here on M4 MBP. Might be something with the latest update

@fran-6co
Copy link
Contributor

fran-6co commented Dec 2, 2024

Same on Mac mini M4.

I have lost many sensors, others are working.
image

@exelban exelban added the Need to be fixed Need to be fixed label Dec 2, 2024
@exelban exelban added this to Stats Dec 2, 2024
@exelban exelban added enhancement New feature or request and removed Need to be fixed Need to be fixed labels Dec 2, 2024
@exelban exelban moved this to In Progress in Stats Dec 2, 2024
@exelban
Copy link
Owner

exelban commented Dec 2, 2024

right now there is no sensors list for m4. I'm interested in what sensors have you seen before. Today I will prepare a few builds that allow detect what m4 is most similar to.

@exelban exelban changed the title Sensors Are Doesnt Work No sensors for M4 Dec 2, 2024
@fran-6co
Copy link
Contributor

fran-6co commented Dec 2, 2024

This was showed on previous build 2.11.18. Note I marked some duplicated names. Also missing some, i.e.: CPU efficiency core 2 & 3, CPU performance core 4, 5 & 6.

image

@exelban
Copy link
Owner

exelban commented Dec 2, 2024

please share the sensors of this build:
Stats.dmg.zip

@fran-6co
Copy link
Contributor

fran-6co commented Dec 2, 2024

image

@PatDal81
Copy link

PatDal81 commented Dec 3, 2024

Weird, I do have temps on 2.11.19 (M4 Max, 16 cores). But I don't have Average CPU/GPU.

image

@reedog117
Copy link

reedog117 commented Dec 3, 2024

Probably related, but my temperature sensor is stuck at 212 F / 100 C for my CPU. This is for a base M4 inside a Macbook Pro 14". This is with 2.11.19.
image

@exelban
Copy link
Owner

exelban commented Dec 3, 2024

yes, basically it looks like Apple has changed the sensor keys again. If there is someone who wants to help I would recommend taking a look here how it could be done.

Since I do not have an m4 mac I cannot help with that process.

@exelban exelban added the help wanted Extra attention is needed label Dec 3, 2024
@PatDal81
Copy link

PatDal81 commented Dec 3, 2024

Willing to help, but I don't know where to start exactly. Seem like the script you're refering to is for M3 only. Any other hint I should be looking at?

@exelban
Copy link
Owner

exelban commented Dec 3, 2024

it was a generic script for any CPU

PS: sorry, was wrong issue. Now it's a correct one

@markop90
Copy link

markop90 commented Dec 3, 2024

I don't know if I ran the script correctly, but this is the result. In the middle of the script, I ran a benchmark tool to stress the cpu, then I stop it.

Run on a Mac Mini with M4 chip.

m4.txt

@EriksRemess
Copy link

If it helps, IOHIDService reports these temperature sensors with PrimaryUsagePage 0xff00, PrimaryUsage 5:

NAND CH0 temp
PMU tcal
PMU tdev{1..8}
PMU tdie{1..14}
PMU2 tcal
PMU2 tdev{1..5}
PMU2 tdie{1..10}

I have Mac Mini M4 base model (4 perf, 6 eff cores, 10 GPU).

@exelban
Copy link
Owner

exelban commented Dec 5, 2024

HID sensors valid only for some revisions of M1

@EriksRemess
Copy link

Still temperatures reported by those HID sensors correlate with CPU load and feel to the touch. None of them are unrealistic like showing negative temperature and only tcal ones are static but those are probably for some calibration.

@EriksRemess
Copy link

for SMC sensors - candidates I think would be TPD{0..F} ones. Attached smc tool outputs for under load and without load. Those temperatures are also same that PMU and PMU2 hid sensors report.
load.txt
unload.txt

@exelban
Copy link
Owner

exelban commented Dec 5, 2024

Yes, TPD looks fine. But for me TpXX is more like CPU. Cause it goes much hotter than TPD. Also TpXX was in m2. I think more test cases are needed. And maybe with a different kind of load. Maybe GPU also, to gain info on what sensors are for GPU.

@mo-corner-404
Copy link

I ran the script from this link for 3 different scenarios:

  1. idle.txt, doing nothing just ran the script for ~ 1 minute
  2. load.txt, spawning multiple yes > /dev/null & yes > /dev/null & yes > /dev/null & yes > /dev/null & to try stress load the CPU
  3. gpu.txt, stress load the GPU using Basemark GPU free with the custom test running @ 1920*1080 non fullscreen window

Running a MacBook Pro M4 10-Core (4 Perf + 6 Eff)
Hope it helps with the sensor mapping 😄

yes, basically it looks like Apple has changed the sensor keys again. If there is someone who wants to help I would recommend taking a look here how it could be done.

Since I do not have an m4 mac I cannot help with that process.

@EriksRemess
Copy link

While TpXX goes higher, variance seem to be bit too much (without load 12-20C between sensors) and unrealistic to be 100+ celsius at load - that's throttling territory.

@exelban
Copy link
Owner

exelban commented Dec 9, 2024

@mo-corner-404 thx, but unfortunately you collect only power sensors without any temperature sensors

@Kencho5
Copy link

Kencho5 commented Dec 10, 2024

will this be fixed? i don't have percentages on m4 pro

@exelban
Copy link
Owner

exelban commented Dec 10, 2024

@Kencho5 you help to fix that? I don't have sensors keys in the app

@nirbhaymalik
Copy link

nirbhaymalik commented Dec 10, 2024

Hello @exelban,
thank you for working on this application, I am sure hundreds of people use it.

Unfortunately, I do not have enough knowledge on the application to provide any assistance, but I would like to share a behaviour which seems different than what others are facing. From what I read above, the app is unable to read Sensors' and Power consumption information.

In my case, all readings are available except the GPU temperatures. It may be possible that I am not aware about other stats that were working in previous versions. Please refer to the attached screenshot of the Sensor settings.
image
image

I used to have an option to add GPU temperatures to the menubar, but it has been removed from the app. I am not sure if this was an intentional change or if it is a bug.

I can confirm that GPU consumption seems to be working, as it changes the reading after putting load on the machine.

I hope this information is useful, please reach out if you would like to know further details about it.

Looking forward to your fix for this issue.

Cheers

@exelban
Copy link
Owner

exelban commented Dec 10, 2024

@nirbhaymalik sorry, but do you read the issue?

The problem is know. And right now I need some help from the users that have m4 to figured out what sensors what means in the new apple silicon.

@nirbhaymalik
Copy link

nirbhaymalik commented Dec 10, 2024

@exelban I did, and is why I shared whatever information I could, as you requested from your users. My apologies if my shared information is of no use. More than happy to share anything else you may need, but I may require some instructions if you want me to run stats straight from the terminal.

Edit: I understand. Hmm, after enabling the 'Show unknown sensors' I did notice items like 'tpa23', I believe that is exactly what you want to learn? I will look more into it, and comment here.

Thanks again.

@exelban
Copy link
Owner

exelban commented Dec 10, 2024

the best you can do is to use the script and make a test with/without load. The script could be found in the issue I mention earlier.

PS: I will adjust the script to be easier to work with and will share a link here.

@fran-6co
Copy link
Contributor

I will also be happy to help. I did run the script after running the Makefile but I think it will be easy if it creates a output.txt with the output. I tried to, but couldn't, sorry.

I'm on a base M4 Mac mini.

@exelban
Copy link
Owner

exelban commented Dec 10, 2024

I will prepare a python script as soon as possible to help with getting the data and share it here

@Kencho5
Copy link

Kencho5 commented Dec 10, 2024

can you tag me when you prepare it? i will run it

@trinquity
Copy link

I tried to monitor sensors however even with slight change with the script I wasn't able to print any temperature sensors at all. Need to re-write the part where it prints the sensors.
I will be posting the results if you share the proper script @exelban

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

First of all they can just by the new Mac and detect a new keys basically in first day of release a new silicon.
Or maybe they have some method to obtain that information from macOS that are not known publicly.

PS: take a look at TG Pro release notes and it looks like they released m4 version after the new Mac release so most probably they just find a keys by obtaining a new Mac.

@DigiH
Copy link
Contributor

DigiH commented Dec 11, 2024

Stop rushing him 😛 it's not like your M4 Mac is going up in flames if there is no full sensors temperatures display in Stats for a while.

I think @exelban is doing what he can to get these sensors in correctly eventually, without him having an M4, like preparing a script for us with M4s to run.

For anyone else with an immediate need for these - this is open source software, so you can feel free to get the qualification to implement this yourselves and just submit a PR.

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

Ok, so basically this script helps a lot with finding a sensors. It shows a changes on sensors over the time. I wanted to add similar functionality to the app but have no time for that.

Link

You can use it by downloading and running:
(while true; do /Applications/Stats.app/Contents/Resources/smc list -p; sleep 1; done) | python3 watch-smc.py

@Dorkington
Copy link

Dorkington commented Dec 11, 2024

I have an M4 Max and am willing to send you whatever results from the script, but I'm also kind of a code dummy.

I ran pip install colorama to install colorama, then ran your above code but get the error

Traceback (most recent call last):
  File "/Users/Dorkington/watch-smc.py", line 6, in <module>
    from colorama import Fore, Back, Style
ModuleNotFoundError: No module named 'colorama'

As far as I can see, colorama is installed though, so I'm a bit lost sorry

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

most probably you need to install colorama with pip3 not pip

@Dorkington
Copy link

Ended up having to do pip3 install colorama --break-system-packages after pip3 shot out a bunch of errors... hopefully I didn't ruin anything

Does this script run until manually stopped, or does it have a stop point?

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

manually

@trinquity
Copy link

m4-p-smc.txt
I only got this from the script @exelban cpu was on stress by geekbench but i think they are still the wattage sensors

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

oh, sorry. Use this command:
(while true; do /Applications/Stats.app/Contents/Resources/smc list -t; sleep 1; done) | python3 watch-smc.py

@trinquity
Copy link

trinquity commented Dec 11, 2024

thank you @exelban , got captured some sensor data, tested with Geekbench 6. Run GPU and CPU tests.
Hope this helps

m4-idle-cpu.txt
m4-idle-gpu.txt

@exelban
Copy link
Owner

exelban commented Dec 11, 2024

I have removed some other keys from the script. Please try again. For now lets find a CPU, omit the GPU for now.

@trinquity
Copy link

Ok, I've run the CPU test fully.
m4-idle-cpu2.txt

@fran-6co
Copy link
Contributor

I also run the script.
One file is idle, no load on any app.

The other is running a ffmpeg conversion with libx265 which uses only CPU. Fan on my mac mini was at 20% (all time is at that speed), but after 70 seconds of running the script I forced it to 100% to see if any decrease of temperature.

Hope it helps.

@nirbhaymalik
Copy link

nirbhaymalik commented Dec 13, 2024

Hey @exelban, I ran the script on M4 Pro chip (8PC+4EC Cores CPU & 16 Cores GPU) on idle condition.
Check out the text files below, I have also included a file with no colour codes for readability.

m4_pro_idle_no_colour.txt
m4_pro_idle.txt

@Kencho5
Copy link

Kencho5 commented Dec 18, 2024

any updates on this?

@DevLiuSir
Copy link

Is there any new progress? There is no CPU temperature sensor list for m4max and pro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests