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

add options, allow passing SMC key #36

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

DrPsychick
Copy link

  • keep default behaviour
  • allow optional passing SMC keys
  • add options to dump all or individual SMC keys

Reasoning:
There is another PR which proposes to change the default keys read for CPU and GPU. This might not fit everybody (does not for me). So I wanted an option to pass the key that works for me.

TCXC as mentioned in #33 does not work on my older MacBook Pro 2011, but TC0P or TC0D or TC0C work. On a newer MBP 13", the TC0D does not work. On my work MBP, the TC0D and TC0C as well as the TG0P and TG0D don't work.

To find out what works on a given machine, I added the option to dump all keys.

@lavoiesl : I'm happy to discuss any changes.

@DrPsychick
Copy link
Author

for reference see also https://logi.wiki/index.php/SMC_Sensor_Codes

@lavoiesl
Copy link
Owner

Sorry for not replying. I love this idea. I changed master a bit, which I think can help making this easier to do. Wanna try updating it?

@DrPsychick
Copy link
Author

DrPsychick commented Jun 28, 2023

Took a while to get it back to work, but also fixed some issues. Ready for review.

Unfortunately, on my M1 Macs this does not produce any useful output anymore :(

@TurtleWilly
Copy link

TurtleWilly commented Aug 21, 2023

Can we add something like:

#if (MAC_OS_X_VERSION_MAX_ALLOWED < 120000) /* older than Monterey? */
#ifndef kIOMainPortDefault
#define kIOMainPortDefault kIOMasterPortDefault
#endif
#endif

at the top or in the .h ? Else it will no longer compile on older systems.

/edit

I just realized this must have been a breaking API change for political correctness? Yikes… 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants