10

Is there any way to programmatically disable Turbo Boost on a Core i7 mac running Mac OS X ? I need to be able to do this for benchmarking purposes during code optimisation etc. Failing that, any kind of utility which can disable/enable Turbo Boost, even if it requires a reboot, would be useful.

There is a related question (not Mac-specific) on SO: How to turn off Turbo Boost temporarily? but even for PCs it seems that there may be no way to do this programatically/on-the-fly ?

Community
  • 1
  • 1
Paul R
  • 208,748
  • 37
  • 389
  • 560
  • I suppose you've already checked for an option in the Developer Tools? I'm pretty sure you can turn off HyperThreading there, but I don't know if there's anything similar for Turbo Boost. Not having an open EFI makes things like this difficult on a Mac. You might be able to get around that with [projects like this one](http://refit.sourceforge.net/), but no guarantees. – Cody Gray - on strike Mar 03 '11 at 09:12
  • @Cody Gray: yes, already tried the usual suspects - developer tools, extensive Google searches, etc. rEFIt *might* be a possible avenue to explore, but I was hoping for something less labour-intensive, like flipping a bit in a CPU control register, or an existing utility. – Paul R Mar 03 '11 at 09:22
  • I believe the uneasy nature of being easy to modify on the fly, because these options are available only for the user to modify such system parameters. Or else everyone could turn someones high-end processor to a turtle, capable of crunching only calculator related problems. – Nocturnal Mar 04 '11 at 10:53
  • In Apple's case, they like the ability to publicize this stamina feature. So disabling is something they don't like... – Nocturnal Mar 04 '11 at 10:55
  • @Nocturnal: no, I don't think this has anything do with with Apple marketing or politics - it's just that Turbo Boost can only be enabled/disabled at boot time, it seems, and there is no equivalent of the PC BIOS on Macs to enable you to make this kind of change. – Paul R Mar 04 '11 at 12:10
  • @Paul R: have you attempted to contact Apple, when all options failed? – Nocturnal Mar 04 '11 at 12:19
  • @Nocturnal: yes, I've talked to an Apple engineer who works on performance/optimisation and apparently his group are having the same kind of problem internally, so it seems that it's a general problem with no simple/obvious solution. – Paul R Mar 04 '11 at 13:07

5 Answers5

19

I wrote kernel extension that let's you disable TB, have fun: https://github.com/nanoant/DisableTurboBoost.kext

If you want to disable TB on Linux here another recipe: http://luisjdominguezp.tumblr.com/post/19610447111/disabling-turbo-boost-in-linux

Adaś
  • 322
  • 2
  • 4
  • This kext helped to to still be able to work with my macbook, although the battery is nearly dead. Thanks a lot! – toabi Mar 30 '13 at 14:45
6

I've just coded an app that allows to load / unload the kernel extension mentioned before, helping to track the system behaviour displaying CPU Temp & current fan speed.

You can check it out here https://github.com/rugarciap/Turbo-Boost-Switcher

Here is an screenshot of how it looks like https://i.stack.imgur.com/tsKaG.png

rugarciap
  • 61
  • 1
  • 2
  • Sure, indeed that's the reason why I created it. I've just bought a new i7 MacBook Air and It was running so hot I started looking for solutions. Found this and made this little app to make things easier :). – rugarciap Jul 24 '13 at 07:59
  • Cool - thanks. Out of interest have you noticed how long typically Turbo can remain at max (e.g. 3.3 GHz) before the temperature gets too high and the clock speed drops ? Is it of the order of seconds, or minutes, or what ? – Paul R Jul 24 '13 at 08:01
  • Welcome! For my last observations, with Turbo Boost enabled and doing some high demanding process (like gaming :), mine gets to 98 celsius in a couple of minutes, with the fans at max speed (6500 rpm). With Turbo Boost disabled and a quiet 4000 rpm fan speed, it never goes above 85 degrees. – rugarciap Jul 24 '13 at 08:05
  • Is it possible to use a similar approach to disable hyperthreading, lower the maximum frequency or even lower the CPU voltages to achieve even lower temperatures and a more silent fan? – xpereta Aug 21 '13 at 09:57
4

You can't. Certain stuff needs to be configured from the BIOS, such as TurboBoost or Vt.

In particular, this is done with the IA32_FEATURE_CONTROL MSR. On a PC, at boot time the MSR is unlocked and the BIOS sets the correct bits to enable or disable features. Once configuration is complete, the BIOS locks the MSR for the changes to take effect and prevent future modification.

I don't know if it's possible to unlock the MSR again before the PC is brought into protected mode, and I don't know how this works on a MacBook where EFI is used instead of BIOS. You'll probably be able to pull it off with an EFI extension of sorts.

Mahmoud Al-Qudsi
  • 28,357
  • 12
  • 85
  • 125
  • It's easy enough, you just need to set the right IA32_FEATURE_CONTROL MSR bits, however, I *don't* think you can do it yourself since the BIOS locks the MSR when its done with configuration. At least, on a PC w/ a BIOS, it *may* be possible with an EFI extension on a Mac. Updated the post. – Mahmoud Al-Qudsi Mar 04 '11 at 13:27
  • Thanks - the additional information is useful - it sounds like I need to look at rEFIt then and see if that might provide a way to do this kind of thing at boot time. – Paul R Mar 05 '11 at 07:41
4

CPUID.com's Tmonitor utility can disable/enable Turbo Boost on-the-fly from within Windows, not at boot! There must be a way to do the same thing from within OSX.

  • Excellent - thanks - I see there is a screen shot here: http://www.cpuid.com/softwares/tmonitor.html which shows the menu option for Turbo Boost enable/disable - assuming it actually works then as you say there must be a way of doing this on Mac OS X and/or Linux. – Paul R Apr 05 '11 at 19:55
2

Finally there seems to be a good solution for this problem which I have tested with Mac OS X Lion on a Core i7 MacBook Pro today and it appears to work well. Adam Strzelecki, a researcher in parallel computing at Jagiellonian University in Krakow, Poland has written DisableTurboBoost.kext - this is a small kext which can be loaded and unloaded at will (via the command line) to disable/enable TurbBoost.

Paul R
  • 208,748
  • 37
  • 389
  • 560