lavoiesl / osx-cpu-temp

Outputs current CPU temperature for OSX
GNU General Public License v2.0
925 stars 156 forks source link

Issue #31 & #32: Change temperatures to PECI #33

Open BourgonLaurent opened 4 years ago

BourgonLaurent commented 4 years ago

Issues related

31 GPU Temperature is Broken

32 CPU Temperature is taken from the Proximity Sensor

How it was fixed

Used the PECI values TCXC and TCGC, instead of CPU Proximity Sensor TC0P and GPU Proximity Sensor TG0P (broken when tested on MacBookPro16,2 running macOS Catalina 10.15.6).

How it changes the software

It seems like the PECI values are much more similar to the values of each core, without actually targeting one (the microcontroller takes care of this). After a bit of research, it seems like Intel Power Gadget and macOS are using this value to change their thermals.

Compatibility

Since PECI is available on all CPUs after the Intel Core 2 Duo, this will only work on devices whose processor was made after. Looking at the MacBook line-up, this means all MacBooks made after the MacBook2,1 Late 2006 should work.

DrPsychick commented 4 years ago

Tried several keys. (TC0P, TC0D, TG0P, TG0D, TCXC, TCGC).

For my MacBook Pro (17-inch, Late 2011), the TCXC did not return any result (0.0), so I went with TC0D to get the CPU die temperature.

For GPU, the TCGC worked fine and returned the highest temperature compared to TG0P and TG0D.

references:

TurtleWilly commented 1 year ago

I went with:

#define SMC_KEY_CPU_TEMP "TCXC"  
#define SMC_KEY_GPU_TEMP "TCGC"
#define SMC_KEY_AMBIENT_TEMP "TA0P"

"TC0D" didn't do much here.

Also the orig. ambient temperature (via TA0V) was way off. No idea what it measured. Showed some 20.something°C. Even my room is hotter right now with around 30°C. 😬 So I went with "TA0P".