hholtmann / smcFanControl

Control the fans of every Intel Mac to make it run cooler
GNU General Public License v2.0
2.41k stars 303 forks source link

MacBookPro Late 2016 : Cannot set fan speed #58

Open robske110 opened 7 years ago

robske110 commented 7 years ago

It actually can set the fan speed if the system has the fans running already. However, if the system decides to not need the fans and smc displays 0rpm, you can't tell it through min rpm to start. I think this is the first Mac for some time to actually have a fan that can be shut off, and I'm not sure if this can be fixed.

jsmestad commented 7 years ago

I have this same issue with the nTB MBP

Mamoritai commented 7 years ago

I'm also having this issue on macOS Sierra version 10.12.5.

Computer is early 2015 edition, 13-inch, MacBook Pro (retina display). Also running 2.7GHz (i5) with 8gb ram

Radzievskyi commented 7 years ago

Macbook Pro, Retina 15, Late 2013 with macOS Sierra 10.12.6 also not any changed speed of fan.

As I see problem with macOS Sierra.

koalalorenzo commented 6 years ago

Same issue on Late 2016 13 MBP with High Sierra.

everdrone commented 6 years ago

2017 MBP 13 High Sierra 10.13.2, experiencing the same issue here

steveatinfincia commented 6 years ago

I'm convinced that Apple is either trying to make the machine near silent even when it's too hot to justify leaving the fan off, or trying to prolong the life of the fan. The behavior is the same whether the machine is using battery power or plugged in.

It appears that there is a timer in the SMC firmware on 2015+ Macbook Pro models, if the temperature is below a specific point and the fan has been on for longer than a few minutes, they turn off and can't be turned back on until the temperature goes up again.

This makes sense if the goal is to avoid having the fans constantly turning on and off every 30 seconds, although all they've accomplished is to make the interval longer, they still cycle on and off over and over.

Once they turn off, they generally don't come back on until the CPU is 140F+, and I've seen them still failing to spin until the CPU is near 180F. Even then, the fan speed is unreasonably conservative unless I set it higher manually.

The end result is that the system will throttle itself and slow down severely when it gets hot instead of turning the fan on and getting rid of the heat.

Unless there's an undocumented setting for forcing the SMC to keep the fan on, there's nothing software like smcFanControl can do about it. It's worth complaining to Apple though, because it's ridiculous.

robske110 commented 6 years ago

While I agree with all the points made by you (hence this issue), I have noticed that on my (MBP 13-inch, Late 2016, Touchbar, absolutely lowest specs) the right fan now is even noticable/can be heard at 2000rpm already. It probably has built up a lot of dust now and I can only guess that was what apple wanted to prevent. I will probably end up opening the panel and vacuuming the dust out of the fan.

perfaram commented 6 years ago

@steveatinfincia : on older MBP there was something called the fan force bit, whose SMC key was FS!, that allowed the OS to reclaim full control of the fans and set their speeds irrespective of the SMC policy. I don't know whether it is still available on newer MBPs, could you try to dump your SMC keys using SMCExplorer ?

If so, it's something that smcFanControl could use to control the fans even in the case you were talking about.

steveatinfincia commented 6 years ago

@perfaram great tool, thanks :)

Yes FS! shows up with value 0 here.

perfaram commented 6 years ago

Nice ! @hholtmann what do you think about using the fan force bit ?

robske110 commented 6 years ago

The fan force bit (at least in my understanding) will just let us force the fan to a specific speed though (as far as I know). That might be really dangerous, as the SMC won't ramp it up in conjunction with system temps anymore. (Basically you would need to set the direct target rpm and not the min rpm, which is much safer) But it is good to know that it is possible, it just requires us to be really cautious (application crashes, now what?) and have our own curves.

perfaram commented 6 years ago

@robske110 you're right, AFAIK at least, and that's why I brought @hholtmann into the loop in my previous message.

Although I'd be really surprised to discover that the SMC doesn't have an embedded failsafe that spins everything to max if some threshold temp is exceeded.

Regardless of this eventual failsafe, and since we can't really be sure it's there, a solution would be to use a privileged helper to perform the SMC connection, and have the main app (displaying the menubar item) and the helper watch on each other. As soon as the app stops receiving temperature status updates from the helper, it relaunches it, resets the fan force bit, and disables use of it by smcFanControl. At any rate, using it would be an explicit choice / "opt-in" by the user (ie the user would have to explicitly activate it, not without having been prompted with a !WARNING MESSAGE! obviously).

hholtmann commented 6 years ago

Thanks for the information about the force bit. To put the force bit into a release I would need to test it in detail. At the moment I don't have a test device available, where the fans shut of completely. I am still running a Macbook Pro 2014, because the new generation Macbook Pro's are not suitable for the work I do (no SD card slot, no USB-A, too many adaptor and those suboptimal keyboards). Some more thoughts: 1) If possible I would like to keep just setting minimum rpm as that is the most fail safe option (and the only way unexperienced users not reading warnings won't damage their machines). 2) Using the force bit and manually setting the rpm (according to temperature) is also problematic. Macs have a lot of temperature sensors (up to 15 in some Macs) and finding out the thresholds for each sensors and then deciding when to ramp up the fan means basically reimplementing the smc controller for each mac on the market individually.

kleuter commented 6 years ago

@perfaram @robske110 did you try this tool on this macbook? (it's free, but one can buy=donate)

hholtmann commented 6 years ago

@kleuter I think i saw something in their release notes regarding support for Macbook Pro 2016. However, as the app is not open source it's hard to say, in what way it's implemented. Maybe someone with such a machine can test?

robske110 commented 6 years ago

I tested it on my machine and got the following "insight": -It most likely uses the fan force bit -It can turn the fans on if they are completely off I placed a dummy load on my cpu, and let the temp rise until the system turned the fans on, and then waited even further until the system increased the fans, and then manually set one to the min rpm and it did it without even a warning. -It can set the fan speed below what the system thinks it should be, which is on apple system always way too less already anyway. -In its auto mode SMC fan control's min mode is used, so auto is probably just using the SMC normally.

So, yes it is exactly the behaviour which is really frightening. I would personally not use this, because it doesn't even seem to have a failsafe itself if the sensors go really high.

I did not test for a SMC failsafe, because I quite like my macbook. But I do think that if something would get too hot it would defiantly shut off.

perfaram commented 6 years ago

It does seem to lack any kind of failsafe, but anyway, the CPU will underclock itself to reduce the heat to be dissipated if a given temp is exceeded. And if the TjMax (the CPU’s nominal maximum operation temp) is reached, it will signal prochot and immediately shutdown, in order to protect itself.

Obviously, these are cases we don’t wanna reach, but it may be reassuring to know they’re here in case we* mess up, esp. during testing, should we implement use of the fan force bit.

Also, thanks for the testing, @robske110 !

*: not that I personally plan on working on this, but who knows

EDIT : Okay, downloaded macsFanControl, dumped its __TEXT segment – it does contain the telltale FS! string (matching the fan force bit's SMC key). Just to be really damn sure, I fired up the app, checked the F.F bit's value in SMCExplorer (0), forced the first fan's speed to a given value in macsFanControl, checked again the bit's value (became 1), then stopped macsFanControl and checked again (fell back to 0). Thus, we're sure of it. MacsFanControl uses the fan force bit.