Jump to content

Kext to disable Intel Turbo Boost on Battery Power


qwerty12

Recommended Posts

Hey,

 

I didn't envision that scenario, admittedly... I just tried doing the same on my laptop and Turbo Boost remains on:

 

 

However, after looking some more, I realised my laptop is stupid and leaves the ExternalChargeCapable property (the one that the kext listens to) set to true when I pop the battery out of my laptop. Could you do the following, please? Open IORegistryExplorer, find AppleSmartBattery and check the following:

  • Does the ExternalConnected property change to false when you unplug the charger cable from your laptop with the battery still remaining inserted?
  • Does ExternalConnected remain true when you remove the battery with the charger cable connected?
Thanks!

 

Hi,

 

Sorry for the delayed reply, I didnt get this post for some reason. Stupid junk mail filter.

 

I did as you suggested and the ExternalConnected remains true but BatteryInstalled toggles. I dont know if this may be causing the issues?

 

I took screen shots, I hope this helps.

 

Thanks for the help on this and let me know if theres anything else I can help you with.

post-11143-0-19025700-1374355016_thumb.png

post-11143-0-14846200-1374355017_thumb.png

Link to comment
Share on other sites

Thanks for the reply. I don't know what I was expecting when I wrote that post, really - of course ExternalConnected would remain the same, but my laptop was toggling it then for some reason. Thanks to your work, I've added a check to see if BatteryInstalled returns true before doing anything. Could you please try the attached version and see if your laptop is still turning off Turbo Boost when the battery is taken out? While I've told Xcode to target 10.8, I am nevertheless running 10.9 so I don't know if the kext will actually load in 10.8 (it should!) but I don't have 10.8 running anymore myself to see.

 

EDIT: Removed. Check the first post, which is the same thing as what was here before.

Link to comment
Share on other sites

YOU ROCK!!!!

 

It works perfectly now on 10.8.4 :)

 

Just out of curiosity, do you know if is it possible to disable 2 cores on battery and have all 4 cores on AC via a similar kext? I have a proper quad core (i7-2720qm) and not meaning disabling hyper threading. 

 

I ask because in win7 I was able to do that and I was able to squeeze out an extra 1hr of battery by disabling turbo and limiting the # of cores.

 

Either way, thanks so much for the kext and fast response time!

 

Edit: I just found the below link and was wondering if its possible to implement into a different version of your kext? Say a quad2dual core version of the kext?

 

http://developer.apple.com/library/mac/#qa/qa1141/_index.html

 

Never mind the above link, its only good for pre Lion. 

But I did find this post that details how to adjust the number of cores manually using xCode. I just installed it and it works great, now it would be a dream to have it as a kext with on/off battery...

 

http://forums.macrumors.com/showthread.php?t=1418393

Link to comment
Share on other sites

Great, thanks for testing! I've released version 2 (yes, I am using Firefox-style version numbers...) based on your feedback.

 

WRT your feature request, you might have to wait a while as I'll have to see if I can figure out how to turn off the cores and my OS X install died when trying to downgrade FakeSMC (I suspect the latest version is preventing me from waking up my laptop). Thanks to Apple creating the best filesystem since FAT12, fsck refuses to repair the filesystem and I'm stuck with an OS X install that won't boot and no OS X installation media at the moment...

Link to comment
Share on other sites

Yeah FF versioning :)

 

And sorry to hear about the dead OSX install. I hope you get that sorted out without too much pain.

 

No worries on my request, when you have time.

 

In the meantime I created an alias to Instruments.app and then its a quick 'cmd,' to get to the preferences slider and I can adjust the # of cores.

Link to comment
Share on other sites

Hey Qwerty12,

 

So after about 2 weeks on ML, I reverted back to Lion 10.7.5

My battery was better on 10.7.5 than 10.8.4

 

Any chance you have the source code laying around (not on your osx install) and I can try and compile it on xCode 10.7.5? Then I will at least be 'helping' a bit :)

Link to comment
Share on other sites

Hey,

And sorry to hear about the dead OSX install. I hope you get that sorted out without too much pain.

Thanks, I caught a lucky break: I found ML on one of my USBs, which I then used to upgrade to the Mavericks beta :)

So after about 2 weeks on ML, I reverted back to Lion 10.7.5

My battery was better on 10.7.5 than 10.8.4

 

Any chance you have the source code laying around (not on your osx install) and I can try and compile it on xCode 10.7.5? Then I will at least be 'helping' a bit :)

 

 

The source code has always been on GitHub, you can find the link in the first post :)

 

P.S. Amit Singh's wonderful OS X book has a section on how to turn off processors and I checked - it's the same way that Instruments does it, so there's progress on that front!

Link to comment
Share on other sites

Of course its in the first post :$

 

So I am trying to build it on XCode but I have never done it before....I did try to change some settings so anything that said 'Mountain Lion' is now changed to 'Lion' in the settings and when I hit 'run' I get this error:

 

clang: warning: argument unused during compilation: '-O0'
cc1plus: error: unrecognized command line option "-std=gnu++11"
cc1plus: warning: -Wuninitialized is not supported without -O
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

 

 

Any suggestions or am I being a total idiot?

Link to comment
Share on other sites

Try adjusting the Base SDK to 10.7, changing the "Compiler for C/..." setting to the LLVM version that comes with Lion, setting the Deployment Target to 10.7 and setting the C++ Language Dialect to the Compiler Default (pretty sure I don't take advantage of any GNU extensions...).

 

EDIT: See the first post.

Link to comment
Share on other sites

Thanks for the program. You must be a super ninja to whip that up so quickly :)

 

Re: disable turbo kext

I changed all the options (as you said) and it suceeded in building but when I install it via kext wizard, then repair permissions, reboot. nothing happens, no disabling of the turbo :(

I tried to delete the xCode output folder and start from scratch but it still didnt work. I tried 3 times.

 

Re: Battery processor control

I installed using

sudo /Users/nori/Desktop/BatteryProcessorCoreControl
and put in my password but I couldnt see any difference in core count. I am using activity monitors cpu usage window and with both AC in and out I am getting all 8 cores active :(

 

Maybe its a Lion issue? I will test with my 10.8.4 install and see if things work.

 

Thanks for all the help btw.

 

edit: forgot to say that cpusetter is ML only :(

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...