Contribute
Register

[Guide] USB power property injection for Sierra (and later)

@RehabMan
Would you mind to check my injection, please?
Hardware:
  • Asus Z170i PRO Gaming
  • Intel i7 6700
  • UEFI Clover install
What I did:
  • Found EC0 in my System DSDT looking for "PNP0C09". It doesn't return zero from _STA so I guess I need to rename EC0 to EC rather than add a fake EC.
  • Added change EC0 to EC patch (find 4543305f >> replace 45435f5f in config.plist\Acpi\DSDT Patches)
  • Injected the USBX device via SSDT adding
Code:
Device (_SB.USBX)
    {
        Name (_ADR, Zero)  // _ADR: Address
        Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
        {
            If (LNot (Arg2))
            {
                Return (Buffer (One)
                {
                     0x03                                     
                })
            }

            Return (Package (0x08)
            {
                "kUSBSleepPortCurrentLimit",
                0x0834,
                "kUSBSleepPowerSupply",
                0x13EC,
                "kUSBWakePortCurrentLimit",
                0x0834,
                "kUSBWakePowerSupply",
                0x13EC
            })
        }
    }
at the bottom of my SSDT-UIAC (to me SSDT-3.aml)​
  • Overrided the IOUSBHostFamily.kext/Contents/Info.plist via SSDT adding
Code:
"AppleBusPowerControllerUSB",
            Package (0x08)
            {
                "kUSBSleepPortCurrentLimit",
                0x0834,
                "kUSBSleepPowerSupply",
                0x13EC,
                "kUSBWakePortCurrentLimit",
                0x0834,
                "kUSBWakePowerSupply",
                0x13EC
            },
at the beginning of my SSDT-UIAC (to me still SSDT-3.aml)​
  • Rebuilded cache
  • Rebooted
The point I am missing, here, is how to check if my steps are correct.
Thanks for the huge support. As always.

No files in ACPI/origin (you forgot to press F4 in Clover before collecting EFI/Clover).
From ioreg, looks as expected.

And yes, you have an active EC, as it would not appear in ioreg (with AppleACPIEC) if it wasn't real...
 
No files in ACPI/origin (you forgot to press F4 in Clover before collecting EFI/Clover).
From ioreg, looks as expected.

And yes, you have an active EC, as it would not appear in ioreg (with AppleACPIEC) if it wasn't real...
uploaded a new attachment. Thank you
 
uploaded a new attachment. Thank you

I just wanted to check EC0._STA.
And... there is no _STA, which means the EC is present (as we already confirm in ioreg).
The default for _STA, as per ACPI spec, is Ones (present).
So ... all as expected

BTW, I would suggest naming your SSDTs after their function instead of with numbers.
Generally, we reserve SSDT-xx (where xx are digits) for patched OEM SSDTs (eg. SSDTs sourced from ACPI/origin).
 
I have a tricky laptop it seems.
If i do the rename EC0 to EC my nvidia card re enables as its disabled in DSDT via an EC0 method.
So the only way i am able to load AppleBusPowerControllerUSB is by adding the fake EC SSDT.

also i'm not sure if its the way it is but only my USB3.0 port will charge my ipad not the USB2.0 ports.

Ive attached files to help describe what i mean.
 

Attachments

  • CLOVER.zip
    12.7 MB · Views: 89
  • Patched.zip
    87.3 KB · Views: 98
  • Shane’s MacBook Pro.zip
    769.8 KB · Views: 102

Attachments

  • CLOVER.zip
    3.6 MB · Views: 86
I compiled SSDT-USBX as per your example, put in in ACPI/Patched, rebooted, and it works. iPad is charging as I write this, About This Mac... shows proper values for charging. Thanks, Rehabman!
For some reason, this doesn't work on my Sierra test disk... I copied the SSDT-USBX.aml over from my El Cap disk, but it doesn't work for some reason(iPad isn't charging, max current shows as 500 mA)
IOACPIPlane looks right.
Is there something else one has to do in Sierra for proper USB power?
My Sierra EFI stuff is the same as in El Cap, only Clover boot loader is updated.
 
Last edited:
I ask questions 1 & 2 because I have more than one machine.

1) If I am using system definition iMac 14,2 which is listed in IOUSBHostFamily.kext am I correct in thinking that applying the config list patch is not needed if USB Power properties are working well for my build?

2) In the same scenario if there are some issues (such as some ports not delivering sufficient power for devices) will simply applying the config patch be sufficient?

3) I checked my ioreg and I have no USBX device listed - however my understanding of this article is that that would only be used if my system definition did not appear in IOUSBHostFamily.kext. My understanding of this post being that IOUSBHostFamily.kext will override settings for USBX if a listed system definition is used. Is that correct? Therefore no need to inject fake EC

apologies if I am asking for confirmation of more or less the same things.
 
I have a tricky laptop it seems.
If i do the rename EC0 to EC my nvidia card re enables as its disabled in DSDT via an EC0 method.
So the only way i am able to load AppleBusPowerControllerUSB is by adding the fake EC SSDT.

also i'm not sure if its the way it is but only my USB3.0 port will charge my ipad not the USB2.0 ports.

Ive attached files to help describe what i mean.

Your mistake. Nothing unusual or tricky about your scenario...

With your attempt at renaming EC0 to EC using only config.plist, you have unbalanced renames. The EC0->EC patch in your config.plist applies only to ACPI/patched/DSDT.aml, not the SSDTs in ACPI/patched. As a result, you end up with EC in DSDT, but the references in the SSDTs are still EC0... and therefore broken.

It is covered in post #1:
Note: If you are using static patched SSDTs (that is, patched OEM SSDTs in ACPI/patched), you must make sure the EC rename is accomplished in each of those files manually. Clover config.plist/ACPI/DSDT/Patches applies only to DSDT.aml in ACPI/patched, and OEM DSDT and SSDTs loaded from BIOS... not to SSDTs in ACPI/patched.

As for USB2 charging... that may just be the way it is (not enough power there), or it may be because of the legacy power properties you're injecting there. Try without... (config.plist/Devices/USB/Inject=false).
 
pls check mine also
correct already? thanks

This is fine, but you could have renamed ECDV -> EC instead of SSDT-EC.aml.
I think either way will work.
 
For some reason, this doesn't work on my Sierra test disk... I copied the SSDT-USBX.aml over from my El Cap disk, but it doesn't work for some reason(iPad isn't charging, max current shows as 500 mA)
IOACPIPlane looks right.
Is there something else one has to do in Sierra for proper USB power?
My Sierra EFI stuff is the same as in El Cap, only Clover boot loader is updated.

No "Problem Reporting" files attached.
Read post #1, "Problem Reporting".
 
Back
Top