Contribute
Register

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

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,144
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Hi RehabMan,

I am a new hacker. From this thread and the config-HD630*.plist you provided, there 3 ways to implement USB power property injection for machines with EC device:
  1. Change EC0 to EC;
  2. Change H_EC to EC;
  3. Chang ECDV to EC.
However, the third(ECDV to EC) method you did not mention on this tutorial(mention in the comment). For the third method, can I understand this: there's some left laptops use ECDV for the Embedded Controller?

More Important:
In my DSDT.aml(see attachment), there are 2 kind of EC devices: ECDV and H_EC(return zero). How should I patch this situation? Can you help me to check?
You can look at ioreg to determine what name your native ACPI uses for the EC.
 
Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630
You can look at ioreg to determine what name your native ACPI uses for the EC.
How to check? Is it checked before or after the patch? (The patch now is Change ECDV to EC)
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,144
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
189,144
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Because of network issue, I can not use the gen_debug.sh tool.
Actually the gen_debug.sh README has instructions for off-line use.

But your ioreg shows EC. Native is ECDV, but your config.plist is renaming ECDV to EC. Without the patch, you would see ECDV in ioreg.

Relevant part of native DSDT:
Code:
        Device (ECDV)
        {
            Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
...
            Method (_STA, 0, Serialized)  // _STA: Status
            {
                Return (0x0F)
            }
You still need to read post #1 regarding USBX.
 
Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630
But your ioreg shows EC. Native is ECDV, but your config.plist is renaming ECDV to EC. Without the patch, you would see ECDV in ioreg.
:thumbup:, I see ECDV in ioreg after disable that patch.

You still need to read post #1 regarding USBX.
Do you mean adding USBX to UIAC? I merged, can you help me see if it is right?

You're using H_EC->EC patch in config.plist/ACPI/DSDT/Patches... but this patch applies only to ACPI/patched/DSDT.aml, not the SSDTs you have in ACPI/patched. And in ACPI/patched, I find SSDTs with H_EC references:
You mentioned that need to rename SSDTs references. Is this only needed for static patches?
 

Attachments

Joined
Oct 15, 2016
Messages
67
CPU
i7 6500U
Graphics
HD520
Mobile Phone
Android
Hi,
Is there anything missing? I can't find the usbx in ioreg despite using usbinjectall kext and all.
Thanks.

Edit: After lurking around in page 20s, since I didn't find usbx and used 13,2. I should just use EH0 -> EH patch, right?
 

Attachments

Last edited:
Joined
Jul 18, 2018
Messages
31
Motherboard
DELL Precision 5520-Clover
CPU
i5-7440HQ
Graphics
HD 630
Hi,
Is there anything missing? I can't find the usbx in ioreg despite using usbinjectall kext and all.
Thanks.

Edit: After lurking around in page 20s, since I didn't find usbx and used 13,2. I should just use EH0 -> EH patch, right?
EH0->EH* used for USB port discovery. See https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/ .

Your config.plist has no any patch for the Embedded Controller, need Change EC0 to EC patch. You do not need SSDT-EC.aml.

Relevant part of native DSDT:
Code:
Device (EC0)
        {
            Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
            Name (_GPE, 0x50)  // _GPE: General Purpose Events
            Name (OKEC, One)
            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
            {
You still need to read post #1 about USBX:
For SMBIOS that are not already covered in IOUSBHostFamily.kext/Contents/Info.plist, you will need to inject the USBX device in order to provide the power properties for AppleBusPowerControllerUSB.
 
Joined
Oct 15, 2016
Messages
67
CPU
i7 6500U
Graphics
HD520
Mobile Phone
Android
EH0->EH* used for USB port discovery. See https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/ .

Your config.plist has no any patch for the Embedded Controller, need Change EC0 to EC patch. You do not need SSDT-EC.aml.
Done.
You still need to read post #1 about USBX:
So I should just get some default kusb* from the internet, and paste it to the SSDT-UIAC? I did it, and it still doesn't show the USBX0 in ioreg. I still can't grasp the understanding about the USBX, sorry.
 

Attachments

Top