-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for Apple M2 #14
Conversation
@joshuataylor |
@enen92 |
Alright so Also thinking the same for M1? But the else should catch it. Maybe in future some sort of case statement to check the first 8 characters or so? Maybe it's best to check that it starts with "Apple M2"? Not sure of how to do this properly in C++, but changing it to the following fixed it sometimes for me:
It'll return like "36.1" sometimes, then 4.2.. is it picking a value at random? |
I reworked it a bit on the last commit, it should now be detected. Note that those models have a lot more cpu cores (8 performance cores + 4 efficiency cores) so there are some sensors that are not picked up in the calculation. |
I got this from the stats app: https://github.com/exelban/stats/blob/135eacec905a8d1d43259660f1c4a85a1838d376/Modules/Sensors/values.swift#L253-L262 Also checked against TG pro that the values are pretty similar so I guess the match is right |
Awesome thanks, I'll check it and and double check the sensor values. I'll share here once I know more. |
Also from my observations it looks really all over the place. TG Pro must have figured out which sensors to use... 😕 |
Anyway, thanks for the link. I removed those definitions from the comments to avoid confusion (I also don't know if they are an exact match). As this tool only computes the average temperature I'd say it's fine. |
3e5547d
to
173d11f
Compare
@enen92 |
@joshuataylor |
Works randomly, but looks like these bytes randomly return the wrong value. Maybe merge this, then figure out the correct sensors for the Max?
|
[stats]https://github.com/exelban/stats) has the same issue, they disable the Max by default it seems. |
Yeah in sensors (last version) they seem to discard the values if lower than 10: exelban/stats@14e29c4#diff-ce3fe5eb966ca7c489e6b4db8d0d3a2441f0f8425779776f243611f9630cdafcR124 However the use-case for this app is different than smctemp. Sensors store state and display it to the user. Or maybe we should consider a threshold on smctemp and only consider the values on those CPU sensors valid if above that limit. Worst case scenario it will return 0 and you can take appropriate measures on the client side |
c8007a4
to
c716e10
Compare
Please wait a bit while I rework this. Maybe we can add some option to poll for values until one is valid. |
@enen92 I'd like to suggest using the option |
What if in the future the tool supports more classes than just the CPU temperature? For example, the GPU? (which I have in the queue) |
How about something like this? (t is type of t)
|
Ah,, I've just realized now that you're suggesting whether it's possible to allow setting the polling frequency independently for each sensor when multiple sensors are specified. |
@enen92 Since the polling frequency represents the maximum number of attempts, as long as we can retrieve a valid value within that specified number of attempts, there shouldn't be any issues. For instance, if one wishes to configure the CPU temperature to poll 5 times and the GPU temperature 2 times, simply setting I would appreciate hearing your opinion. |
Hum, I think I misunderstood the request first (thought you meant to use |
@enen92 Line 23 in da1fe79
And as you've correctly stated, the expectation behavior after the merging of this PR is to use the command |
29457db
to
a084945
Compare
Should be done in the last push. |
Thank you for the great idea. Sounds great! |
57d19a6
to
e092a19
Compare
Thank you for your quick modification! |
@joshuataylor |
Ping @joshuataylor |
Apologies for the delay, I missed the @ and the follow up here! 🤦 |
@joshuataylor @enen92 |
Hey @narugit thanks for resurrecting the old smctemp project.
This PR adds support for Apple M2 (my laptop) (8 cores - 4 performance + 4 efficiency). Also adds support for other models based on the sensors app open-source code.
Closes #11
Also adds an option to poll for the temperature values for n times until a given value is returned (special case for some apple m2 models)
Mac Model:
TG Pro details:
smctemp: