Skip to content

Commit b0aba09

Browse files
authored
Merge pull request #33 from kyleyannelli/m2-12core-sensors
fix: add missing sensors for M2 12 Core chip
2 parents dc5a607 + 9bdc7ae commit b0aba09

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

smctemp.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,12 @@ double SmcTemp::GetCpuTemp() {
449449
// CPU core 8
450450
sensors.emplace_back(static_cast<std::string>(kSensorTp0r));
451451
} else if (cpumodel.find("m2") != std::string::npos) { // Apple M2
452+
// CPU efficient cores 1 through 4 on M2 Max 12 Core Chip
453+
sensors.emplace_back(static_cast<std::string>(kSensorTp1h));
454+
sensors.emplace_back(static_cast<std::string>(kSensorTp1t));
455+
sensors.emplace_back(static_cast<std::string>(kSensorTp1p));
456+
sensors.emplace_back(static_cast<std::string>(kSensorTp1l));
457+
452458
// CPU core 1
453459
sensors.emplace_back(static_cast<std::string>(kSensorTp01));
454460
// CPU core 2

smctemp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ constexpr UInt32Char_t kSensorTp0f = "Tp0f";
7676
constexpr UInt32Char_t kSensorTp0j = "Tp0j";
7777
constexpr UInt32Char_t kSensorTp0n = "Tp0n";
7878
constexpr UInt32Char_t kSensorTp0r = "Tp0r";
79+
constexpr UInt32Char_t kSensorTp1h = "Tp1h";
80+
constexpr UInt32Char_t kSensorTp1t = "Tp1t";
81+
constexpr UInt32Char_t kSensorTp1p = "Tp1p";
82+
constexpr UInt32Char_t kSensorTp1l = "Tp1l";
7983
// GPU
8084
constexpr UInt32Char_t kSensorTg05 = "Tg05";
8185
constexpr UInt32Char_t kSensorTg0D = "Tg0D";

0 commit comments

Comments
 (0)