-
Notifications
You must be signed in to change notification settings - Fork 304
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
smc: support writing FP values like fan speed (tested on MBP 16,1) #108
base: master
Are you sure you want to change the base?
Conversation
Needed to help with hholtmann#77.
(For some minimal testing code for this, see Blaisorblade#1). |
Wow, it works! I'm amazed. Thank you very much! Does the mode have to be set back to automatic to stop the fan control? |
@jlehrer1 I'm not sure as I've only studied the parsing code, but it seems so, as before. I did disable force mode via
|
@Blaisorblade Interesting. Resetting the values back to Edit: Yes its Macs Fan Control. Closing the app / deleting the smc write resets the fans to auto. Thanks again for this commit, I'm excited to get working. |
@jlehrer1 which MBP13''? Do you have production year or model number? |
@Blaisorblade heh yeah I won't, although I'm not too worried. Neither program can override the fans hardware speed limits. It's from 2020. |
@Blaisorblade The only thing I'm not sure of is why setting the fan in forced mode is a different key than the fan key? Per your example, |
That's from #77 (comment) and #77 (comment). The harder part was
No clue, that's what other contributors figured out :-) |
@Blaisorblade would this work with setting minimum values too? My friend with a 2020 Intel MacBook Air tried it out and it seems the minimum value didn't change. |
@quackduck Unfortunately I forgot the details, I've been using other (paid) tools, and I lack the time to try to help further; this patch fixes just one piece and wasn't tested on other laptops. |
Alright, but would this work on |
@quackduck But IIRC the output of |
okay, I tried a moment... but the minimum speed doesn't seem settable. Indeed, even the README implies the minimum is read-only. Concrete test:
|
That's strange because the min speed is settable on older macs. The smcFanControl GUI works by setting min fan speeds. |
IIRC the smc readme already acknowledges this interface change, from minimum to target... |
Hmm, is there a way for me to set a speed that can still be overridden by smc (as per default thermal management)? Say, for example, I set the fan speed to 1200 when the CPU is at 105 C. Of course, the smc would by default set the fan speed to something higher, so I want it such that if the speed I set it to is less than the default, the fans will run at the default speed. |
Also, doesn't the GUI smcFanControl work by setting min speeds? Right, @hholtmann? |
The interface from the "custom smc" bin that I use from here: hholtmann/smcFanControl#108 Which allows this program to run on newer versions of OSX, has changed. The "homebrew" version of this program from smcFanControl is out of date, but can be used for older versions, and when I custom build this version, I need a different set of flags passed. This change allows supporting both.
I've just tested this on an M1 13" macbook pro and it works brilliantly, thanks @Blaisorblade ! |
Why its not merged yet? |
Needed to help with #77 — to set fan speeds by hand.
TODO:
I've only tested this on my machine and I haven't programmed in C for a long while, but I've tried to be careful.
Example usage: