Contribute
Register

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

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,691
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Buddy, It is difficult to understand this guide, can you simplify this for me?
or just tell me what is exactly I wanted to do to get the proper power supply.
I'm having trouble when I connect Pendrives and external HDD together. If any USB is connected my magic mouse becomes very slow and unresponsive also when two Pendrive is connected one will eject and reconnects automatically will this guide can fix these issues?

Read post #1, "Problem Reporting".
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,691
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Can you make guide this guide simple for me?

No "Problem Reporting" files attached.
Please attach all "Problem Reporting" files and I'll tell you which components you need from this guide.
 
Joined
Feb 29, 2016
Messages
159
Motherboard
Gigabyte GA H270N WiFi
CPU
i5-7600
Graphics
HD 630
Mac
  1. iMac
  2. MacBook Air
Mobile Phone
  1. iOS
No "Problem Reporting" files attached.
Please attach all "Problem Reporting" files and I'll tell you which components you need from this guide.
Here are the files.
 

Attachments

  • CLOVER 2.zip
    1.9 MB · Views: 49
  • config.plist
    6.9 KB · Views: 192
  • Jk'sMac.ioreg
    6 MB · Views: 94

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,691
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Here are the files.

You forgot to press F4 to collect ACPI/origin, but the ioreg shows no EC.

So... given no EC, and iMac17,1 as SMBIOS, to implement this guide, you need only to add SSDT-EC.aml and SSDT-USBX.aml to ACPI/patched.

That will get you the power properties of iMac17,1.

Now.. your other major problem is that USB port inject is not implemented correctly. Your ioreg shows you are using the port limit patch, which is a mistake (it is only for short term use).

That is off-topic here, as there is a separate guide:
https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
 
Joined
Feb 29, 2016
Messages
159
Motherboard
Gigabyte GA H270N WiFi
CPU
i5-7600
Graphics
HD 630
Mac
  1. iMac
  2. MacBook Air
Mobile Phone
  1. iOS
You forgot to press F4 to collect ACPI/origin, but the ioreg shows no EC.

So... given no EC, and iMac17,1 as SMBIOS, to implement this guide, you need only to add SSDT-EC.aml and SSDT-USBX.aml to ACPI/patched.

That will get you the power properties of iMac17,1.

Now.. your other major problem is that USB port inject is not implemented correctly. Your ioreg shows you are using the port limit patch, which is a mistake (it is only for short term use).

That is off-topic here, as there is a separate guide:
https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
Thanks for your reply. Where can I download SSDT-EC and SSDT-USBX?
 
Joined
Feb 29, 2016
Messages
159
Motherboard
Gigabyte GA H270N WiFi
CPU
i5-7600
Graphics
HD 630
Mac
  1. iMac
  2. MacBook Air
Mobile Phone
  1. iOS
The code is provided in post #1. You need to use MaciASL to compile them to AML.
Buddy, I just inject USB Port patch and compiled AML please check. I think SSDT of EC and USBX is not configured correctly.
 

Attachments

  • config.plist
    7.5 KB · Views: 238
  • SSDT-EC-USBX.aml
    248 bytes · Views: 107
  • Jk'sMac.zip
    703 KB · Views: 52

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,691
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Buddy, I just inject USB Port patch and compiled AML please check. I think SSDT of EC and USBX is not configured correctly.

According to your Clover bootlog, the SSDT is not loading:
Code:
1:071  0:000  Inserting SSDT-XCPM.aml from EFI\CLOVER\ACPI\patched ... Success

It means it is not likely in ACPI/patched.

Note: I'm not certain you can combine multiple DefinitionBlock in a single file like you have... Worth testing (I'll have to test it too), but if it doesn't work, combine in the more conventional way...

eg.
Code:
// Inject Fake EC device and power properties via USBX
DefinitionBlock("", "SSDT", 2, "hack", "EC-USBX", 0)
{
    Device(_SB.EC)
    {
        Name(_HID, "EC000000")
    }
    Device(_SB.USBX)
    {
        Name(_ADR, 0)
        Method (_DSM, 4)
        {
            If (!Arg2) { Return (Buffer() { 0x03 } ) }
            Return (Package()
            {
                // these values from iMac17,1
                "kUSBSleepPortCurrentLimit", 2100,
                "kUSBSleepPowerSupply", 5100,
                "kUSBWakePortCurrentLimit", 2100,
                "kUSBWakePowerSupply", 5100,
            })
        }
    }
}
//EOF
 
Joined
Feb 29, 2016
Messages
159
Motherboard
Gigabyte GA H270N WiFi
CPU
i5-7600
Graphics
HD 630
Mac
  1. iMac
  2. MacBook Air
Mobile Phone
  1. iOS
According to your Clover bootlog, the SSDT is not loading:
Code:
1:071  0:000  Inserting SSDT-XCPM.aml from EFI\CLOVER\ACPI\patched ... Success

It means it is not likely in ACPI/patched.

Note: I'm not certain you can combine multiple DefinitionBlock in a single file like you have... Worth testing (I'll have to test it too), but if it doesn't work, combine in the more conventional way...

eg.
Code:
// Inject Fake EC device and power properties via USBX
DefinitionBlock("", "SSDT", 2, "hack", "EC-USBX", 0)
{
    Device(_SB.EC)
    {
        Name(_HID, "EC000000")
    }
    Device(_SB.USBX)
    {
        Name(_ADR, 0)
        Method (_DSM, 4)
        {
            If (!Arg2) { Return (Buffer() { 0x03 } ) }
            Return (Package()
            {
                // these values from iMac17,1
                "kUSBSleepPortCurrentLimit", 2100,
                "kUSBSleepPowerSupply", 5100,
                "kUSBWakePortCurrentLimit", 2100,
                "kUSBWakePowerSupply", 5100,
            })
        }
    }
}
//EOF
Inserted all entries and SSDT's please check it.
If the USB Port injection and USB Power property are ok now?
 

Attachments

  • CLOVER.zip
    1.9 MB · Views: 76
  • config.plist
    7.7 KB · Views: 211
  • Jk'sMac.zip
    704.7 KB · Views: 71
  • SSDT-EC.aml
    63 bytes · Views: 154
  • SSDT-USBX.aml
    185 bytes · Views: 144
Top