Contribute
Register

[Guide] Native Power Management for Laptops

sorry was old one I just remove and its worked
 
so here i am
i want to know how to make my cpu freq stays at 800mhz when I'm just running some easy app such browsing or playing music or watch some movie but i also want to make it 1ghz+ when I'm using some video editing software, after effect, or some
 
so here i am
i want to know how to make my cpu freq stays at 800mhz when I'm just running some easy app such browsing or playing music or watch some movie but i also want to make it 1ghz+ when I'm using some video editing software, after effect, or some

The OS will do that on its own. It is not something in user control.
 
hmm ok if you says so
but.. there is cputhrottle tool

That tool appears to limit CPU time to a given process.
It does not manipulate the CPU clock multiplier directly.
 
That tool appears to limit CPU time to a given process.
It does not manipulate the CPU clock multiplier directly.
ooh..
so how do we make it stays 800mhz there must be a way..
what if we make change to ssdt, maximum freq to 1 ghz, if that were possible though.. but i won't be able running editing software perfectly
 
ooh..
so how do we make it stays 800mhz there must be a way..
what if we make change to ssdt, maximum freq to 1 ghz, if that were possible though.. but i won't be able running editing software perfectly

As long as the system is adjusting the pstate accordingly, you're fine.
No need to micromanage.
 
As long as the system is adjusting the pstate accordingly, you're fine.
No need to micromanage.
it's just that I don't wanna make my cpu hot, i7 2630qm
 
it's just that I don't wanna make my cpu hot, i7 2630qm

If you implement CPU PM correctly, your CPU will idle down as appropriate when there is less demand for CPU resources.
Your laptop fan will adjust to accommodate higher temperatures, should the CPU demand be higher (and hence higher pstates).
 
Note: Added two new sections.

First is regarding experimental technique "XCPM only":

Experimental technique: XCPM only

If you have a computer with Haswell or later (eg. Haswell, Broadwell, Skylake, KabyLake, etc), you can use a simpler method that does not involve ssdtPRgen.sh. Since power management is in the kernel (XCPM), it appears the custom tables generated by ssdtPRgen.sh are not needed. But we still need X86PlatformPlugin to load.

In order to do that we only need an SSDT that will inject the "plugin-type" property ("plugin-type"=1). The SSDT is available in my hotpatch repo here: https://github.com/RehabMan/OS-X-Clover-Laptop-Config (hotpatch/SSDT-PluginType1.dsl).

Direct link: https://raw.githubusercontent.com/R...p-Config/master/hotpatch/SSDT-PluginType1.dsl

The contents of it are simple:
Code:
// Inject plugin-type=1 on _PR.CPU0
// This is experimental to see how only injecting plugin-type with native CPU PM SSDTs
// works on various platforms.
//
// Results: OK on Haswell+, not so good on Ivy
DefinitionBlock("", "SSDT", 2, "hack", "PluginType", 0)
{
    External(\_PR.CPU0, DeviceObj)
    Method (\_PR.CPU0._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return (Package()
        {
            "plugin-type", 1
        })
    }
}
//EOF

To use it, compile it as AML in MaciASL, then copy to your EFI/Clover/ACPI/patched.

For example, in Terminal (assuming you have iasl installed):
Code:
# download SSDT-PluginType1.dsl and compile it as SSDT-PluginType1.aml
curl -o ./SSDT-PluginType1.dsl https://raw.githubusercontent.com/RehabMan/OS-X-Clover-Laptop-Config/master/hotpatch/SSDT-PluginType1.dsl
iasl SSDT-PluginType1.dsl
# not valid to use both SSDT.aml and SSDT-PluginType1.aml, so remove it
rm /Volumes/EFI/EFI/Clover/ACPI/patched/SSDT.aml
cp SSDT-PluginType1.aml /Volumes/EFI/EFI/Clover/ACPI/patched/SSDT-PluginType1.aml

Testing and verification is the same was when using SSDT.aml generated from ssdtPRgen.sh.

Second is a heads up on "HWP":
Experimental option for Skylake/Kaby Lake (and later): HWP

In Skylake CPUs, Intel introduced a new power management technology: SpeedShift (aka. SST, aka. HWP).

With HWP enabled, the CPU handles pstate management by itself instead of requiring the OS to do it. The CPU itself will automatically shift to higher and lower pstates depending on CPU demand.

In order to use HWP, use an SMBIOS that is enabled for HWP... currently MacBook9,1, MacBookPro13,x. Also, since HWP tends to cause the xcpm_idle to be invoked, make sure the xcpm_idle patch (courtesy of PikeRAlpha) is enabled. It is default in all current plists provided by my Clover laptop guide. If you're using older than current plists, you may have to copy the patch into your config.plist/KernelAndKextPatches/KernelToPatch section.

You can also enable HWP for other SMBIOS by creating a patched resources injector for X86PlatformPlugin.kext (or by patching the kext itself). But that is a subject for another day.

Note: You still need SSDT.aml from ssdtPRgen.sh or SSDT-PluginType1.aml as discussed earlier.
 
Back
Top