Contribute
Register

macOS Native CPU/IGPU Power Management

Hi, it seems to work for me now! I resetted my config.plist and started with a new one. After that I applied Post#1 on that config. It failed again.

Then I tried a bit around where the "PluginType" has to be placed. It seems that it needs to be directly below "SSDT" and not in the "Generate" Dictionary. Now it works perfectly fine!
View attachment 304598

Thanks to Toledo for the hint with my broken config plist. Must have been changes I made with my former graphics card (RX480)...

Is it somehow possible to change the screen name for the cpu?
View attachment 304599
Not correct, String: NO, included in Generate property
Correct, Boolean: NO, included in SSDT property
View attachment 304620
It can be below Generate, not in Generate.

Just to clarify:
- there are two options named PluginType in Clover
- first/original: config.plist/ACPI/SSDT/PluginType, type is integer, typical value if specified is 1.
- added (by me): config.plist/ACPI/SSDT/Generate/PluginType, type is boolean, for this guide we specify as true

config.plist/ACPI/SSDT/PluginType (integer) determines the value for "plugin-type" if it is being injected.
config.plist/ACPI/SSDT/Generate/PluginType (boolean) determines whether or not "plugin-type" is injected.
 
What is patched in the EFI/CLOVER/ACPI/patched/DSDT.aml?

config.plist/ACPI/SSDT/PluginType is in the wrong place and wrong type, remove the property.
Restart, reply with new files.

Files updated with a new DSDT which I used RehabMan's "[syn] Fix PARSEOP_Zero error", and "[syn] Fix ADBG error" these two patches to fix the error in original DSDT.

I restart without SSDT-XCPM (but still with SSDT-5 for AppleLPC to be loaded), and set plugintype = YES (type=boolean) under ACPI/SSDT instead of ACPI/SSDT/Generate, found that X86PlatformPlugin & X86PlatformShim are both not loaded. but the AppleIntelInfo.kext & Intel Power Gadget shows that I have more Pstates, and no longer stuck at high freq. when idling, once I set plugintype to NO or put SSDT-XCPM back to ACPI/patched directory, X86PlatformPlugin & X86PlatformShim can both be loaded, but CPU stuck at high freq. , hardly go down to 0.8 Ghz even when idling. Thanks a lot for your help and patience, I really appreciate it.

Ps. I found that when I load AppleIntelInfo.kext, the utilization will be abnormal in IPG.

Idle, two x86 kexts are not loaded
ipg without ssdt-xcpm.jpeg


Idle, both X86 kext are loaded
ipg with ssdt-xcpm2.jpeg
 

Attachments

  • AppleIntelInfo without ssdt-xcpm.txt
    12.3 KB · Views: 70
  • AppleIntelInfo with ssdt-xcpm.txt
    11.9 KB · Views: 64
  • iMac without ssdt-xcpm.ioreg
    9.1 MB · Views: 99
  • iMac with ssdt-xcpm.ioreg
    9.2 MB · Views: 89
  • CLOVER.zip
    2.5 MB · Views: 94
Last edited:
Just to clarify:
- there are two options named PluginType in Clover
- first/original: config.plist/ACPI/SSDT/PluginType, type is integer, typical value if specified is 1.
- added (by me): config.plist/ACPI/SSDT/Generate/PluginType, type is boolean, for this guide we specify as true

config.plist/ACPI/SSDT/PluginType (integer) determines the value for "plugin-type" if it is being injected.
config.plist/ACPI/SSDT/Generate/PluginType (boolean) determines whether or not "plugin-type" is injected.

Hi RehabMan,

that's ridiculous:

If I apply ACPI/SSDT/PluginType as boolean = YES everything seems to work properly within 800 MHz to 4200 MHz.
If I apply ACPI/SSDT/Generate/PluginType as boolean = YES the CPU is between 4 and 4.2 GHz.

I will test a bit this evening and will post my config plist and the other files to get grip on that.
 
Hi RehabMan,

that's ridiculous:

If I apply ACPI/SSDT/PluginType as boolean = YES everything seems to work properly within 800 MHz to 4200 MHz.
If I apply ACPI/SSDT/Generate/PluginType as boolean = YES the CPU is between 4 and 4.2 GHz.

I will test a bit this evening and will post my config plist and the other files to get grip on that.

Code for ACPI/SSDT/PluginType in Clover (Settings.c):
Code:
        Prop = GetProperty (Dict2, "PluginType");
        if (Prop != NULL) {
          gSettings.PluginType = (UINT8)GetPropertyInteger (Prop, gSettings.PluginType);
          DBG ("PluginType: %d\n", gSettings.PluginType);
        }

And GetPropertyInteger:
Code:
INTN
GetPropertyInteger (
                    TagPtr Prop,
                    INTN Default
                    )
{
  if (Prop == NULL) {
    return Default;
  }

  if (Prop->type == kTagTypeInteger) {
    return (INTN)Prop->string;
  } else if ((Prop->type == kTagTypeString) && Prop->string) {
    if ((Prop->string[1] == 'x') || (Prop->string[1] == 'X')) {
      return (INTN)AsciiStrHexToUintn (Prop->string);
    }

    if (Prop->string[0] == '-') {
      return -(INTN)AsciiStrDecimalToUintn (Prop->string + 1);
    }

    return (INTN)AsciiStrDecimalToUintn (Prop->string);
  }
  return Default;
}

Reality: In the case ACPI/SSDT/PluginType is boolean, the original value of gSettings.PluginType is retained and the setting in config.plist is ignored, just as if you didn't specify it at all.

Note: For your hardware, the default for gSettings.PluginType will be 1 because of this code in platform.c:
Code:
  if (gCPUStructure.Model >= CPU_MODEL_IVY_BRIDGE) {
    gSettings.GeneratePStates    = TRUE;
    gSettings.GenerateCStates    = TRUE;
    // backward compatibility, APFS, APLF, PluginType follow PStates
    gSettings.GenerateAPSN = gSettings.GeneratePStates;
    gSettings.GenerateAPLF = gSettings.GeneratePStates;
    gSettings.GeneratePluginType = gSettings.GeneratePStates;
    //  gSettings.EnableISS          = FALSE;
    //  gSettings.EnableC2           = TRUE;
    gSettings.EnableC6           = TRUE;
    gSettings.PluginType         = 1;

There are a host of other settings that contribute to the entire picture regarding Clover CPU PM inject, and other things you may be doing in your ACPI set that can change the behavior...

FYI, this is the code for ACPI/SSDT/Generate/PluginType:
Code:
            Prop = GetProperty (Prop2, "PluginType");
            if (Prop) {
              gSettings.GeneratePluginType = IsPropertyTrue (Prop);
            }

What I wrote in post #466 is not "ridiculous". It is fact.
 
Hi RehabMan,

thanks a lot for the interesting answer!
Please note: not your clarifications in post #466 were ridiculous but the observed behavior of my CPU. (See the colon behind "That's ridiculous:")

Hence I will go forward and will test this evening both possibilities:
  1. no PluginType set (as that should be the same for ACPI/SSDT/PluginType as boolean = YES)
  2. ACPI/SSDT/Generate/PluginType as boolean = YES
After that I'll post the results here and hopefully you or toleda can give me a hint what I am doing wrong.

Edit:
Ok. Finished. Seems that I do not get CPU PM to work.
 

Attachments

  • No PluginType_config.plist
    4.7 KB · Views: 246
  • No PluginType_Intel.png
    No PluginType_Intel.png
    71.4 KB · Views: 109
  • No PluginType_AppleIntelInfo.txt
    11.7 KB · Views: 103
  • No PluginType_AppleIntelInfo.txt
    10.8 KB · Views: 81
  • No PluginType_config.plist
    4.7 KB · Views: 239
  • No PluginType_Intel.png
    No PluginType_Intel.png
    63.7 KB · Views: 113
  • PluginType_ioReg.png
    PluginType_ioReg.png
    193.5 KB · Views: 100
  • No PluginType_ioReg.png
    No PluginType_ioReg.png
    145.5 KB · Views: 109
Last edited:
config.plist/ACPI/SSDT/PluginType (integer) determines the value for "plugin-type" if it is being injected.
config.plist/ACPI/SSDT/Generate/PluginType (boolean) determines whether or not "plugin-type" is injected.
Thank you for bringing to my attention the errors in my replies above; forgot to check Post #1/Changes. The information you provided is most helpful.

Additional information: Clover_v4334/10.13.2/Profile system:
CloverConfigurator/PluginType=1 does not work:
Screen Shot 2018-01-09 at 10.12.53 PM.png Screen Shot 2018-01-09 at 10.13.16 PM.png

config.plist/ACPI/SSDT/PluginType (integer): String, Number, Boolean; nothing works
An experiment shows CloverConfigurator/PluginType=0 disables SSDT/Generate/PluginType (boolean)
Screen Shot 2018-01-09 at 10.37.37 PM.png
Screen Shot 2018-01-09 at 10.37.49 PM.png
CloverConfigurator/PluginType=Null removes the PluginType property, the only valid selection.

config.plist/ACPI/SSDT/Generate/PluginType (boolean), works:
Screen Shot 2018-01-09 at 10.46.11 PM.png
Screen Shot 2018-01-09 at 10.46.22 PM.png

Summary: currently, your config.plist/ACPI/SSDT/Generate/PluginType (boolean) is the only working Clover XCPM/Plugin method.
 
Last edited:
Thank you for bringing to my attention the errors in my replies above; forgot to check Post #1/Changes. The information you provided is most helpful.

Additional information: Clover_v4334/10.13.2/Profile system:
CloverConfigurator/PluginType=1 does not work:
View attachment 304898 View attachment 304900

config.plist/ACPI/SSDT/PluginType (integer): String, Number, Boolean; nothing works
An experiment shows CloverConfigurator/PluginType=0 disables SSDT/Generate/PluginType (boolean)
View attachment 304906
View attachment 304907
CloverConfigurator/PluginType=Null removes the PluginType property, the only valid selection.

config.plist/ACPI/SSDT/Generate/PluginType (boolean), works:
View attachment 304901
View attachment 304902

Summary: currently, your config.plist/ACPI/SSDT/Generate/PluginType (boolean) is the only working Clover XCPM/Plugin method.

config.plist/ACPI/SSDT/PluginType is always an integer. No other type is valid (see Clover Settings.c and my explanation above).

config.plist/ACPI/SSDT/PluginType determines the *value* that will be injected when "plugin-type" is injected.

"plugin-type" is NOT injected if both config.plist/ACPI/SSDT/Generate/PluginType=false and config.plist/ACPI/SSDT/Generate/PStates=false.

If you set config.plist/ACPI/SSDT/PluginType=0, "plugin-type" will also NOT be injected.
The only correct value for config.plist/ACPI/SSDT/PluginType is 1 or 0. 1 for Ivy Bridge and later. 0 for Sandy Bridge and earlier. An appropriate default is provided by Clover based on CPU type, therefore it is probably best to omit it.
Other than the config.plist/ACPI/SSDT/PluginType=0 case mentioned above, config.plist/ACPI/SSDT/PluginType does not in itself determine whether "plugin-type" is injected or not. As mentioned above, that is based on the flags under Generate instead.
 
Last edited:
Is this compatible with coffee lake?
 
Back
Top