Jump to content

Kext to disable Intel Turbo Boost on Battery Power


qwerty12

Recommended Posts

DisableTurboBoostBatery.kext doesn't work with VirtualSMC.kext and SMCBatteryManager.kext.

 

Problem is here:

void DisableTurboBoostBattery::actOnChangedPowerState()
{
	if (pPowerSource && isOnAC != pPowerSource->externalChargeCapable() && pPowerSource->batteryInstalled()) {
		if ((isOnAC = pPowerSource->externalChargeCapable()))
			enable_tb();
		else
			disable_tb();
	}
}

Reason is simple - externalChargeCapable returns different values with VirtualSMC.kext and SMCBatteryManager.kext than with FakeSMC.kext and ACPIBatteryManager.kext.

 

ExternalChargeCapable property has same value as ExternalConnected in case of FakeSMC.kext and ACPIBatteryManager.kext. On battery both values are false, on charger both values are true.

With VirtualSMC.kext and SMCBatteryManager.kext only ExternalConnected property change value. It's true on charger and false on battery. ExternalChargeCapable is always true.

 

This is the reason why disable_tb() is never called with VirtualSMC.kext and SMCBatteryManager.kext and Turbo Boost remains active.

 

Fix should be simple as this:

void DisableTurboBoostBattery::actOnChangedPowerState()
{
	if (pPowerSource && isOnAC != pPowerSource->externalConnected() && pPowerSource->batteryInstalled()) {
		if ((isOnAC = pPowerSource->externalConnected()))
			enable_tb();
		else
			disable_tb();
	}
}

This should work in both usage cases - VirtualSMC.kext with SMCBatteryManager.kext and FakeSMC.kext with ACPIBatteryManager.kext.

 

VirtualSMC implementation of ExternalChargeCapable looks proper based on documentation:

 ExternalConnected
 Type: bool
 IORegistry Key: kIOPMPSExternalConnectedKey
 True if computer is drawing external power
 
 ExternalChargeCapable
 Type: bool
 IORegistry Key: kIOPMPSExternalChargeCapableKey
 True if external power is capable of charging internal battery

 

 

  • Like 3
Link to comment
Share on other sites

This is fixed version of DisableTurboBoostBattery.kext that should work with both SMCBatteryManager and ACPIBatteryManager.

DisableTurboBoostBattery_2.3.zip

 

I performed tests on battery and on charger with SMCBatterManager and looks like everything finally works as expected.

 

Please test properly with ACPIBatteryManager since I only did brief test on battery to see if TurboBoost is disabled or not, but I didn't done any tests on charger. Please let me know if there is any problem so I could fix this.

 

  • Like 1
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...