Contribute
Register

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

It looks like the kernel panics I am getting during boot may be related to the ACPI patch EC0 -> EC. I disabled the patch for a few days, and the panics stopped, I re-enabled the patch and the panics immediately started again during boot.

The system will restart a few times, kernel panicking a few seconds after the clover screen, then eventually it will successfully boot.

I have attached debug info, any help would be appreciated. For now, I have disabled the patch, and removed the USBX device from my SSDT-UIAC.aml file and things are fine. Debug was done whilst patch was active and USBX device was present.

You have a lot of other things to work on (should have been done before getting to USB config...):
- CPU PM not implemented
- SATA-unsupported.kext missing (wrong SATA drivers loading)
- probably more if I kept looking...

And...
Your kextcache output proves kexts are not installed correctly.
All kexts you need must be installed to the system volume.
Read post #2 of the Clover guide for details:
https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

EC0->EC patch should be ok as you have no ECDT, but there is no requirement to use it. You can always add SSDT-EC as an alternate to the rename.
 
Thank you for the findings and for writing this guide RehabMan, I could make it work on my build! :clap:

I wrote a shorter guide for beginners not familiar with Hackintosh topics and the common inspector tools we use:
  • 1.) You can read "ioreg" several places but I cannot find a link or description at post #1 what ioreg actually is... So if you're wondering how you can view ioreg, there is an application called IORegistryExplorer (version 2.1 !), which you can download from here: https://www.tonymacx86.com/threads/guide-how-to-make-a-copy-of-ioreg.58368/ If you open it up it will show you a list in alphabetical order.. Look for the name "EC" (Embedded Controller), it will be before the FAN labels... If you can find the element called "EC" in there, continue with step 5.)
  • 2.) If the "EC" element is not there in the IORegistryExplorer, you need to check if you have EC0 or the H_EC name (or neither) under the hood in so called ACPI. There is another application to check that: MaciASL. It's also not mentioned in post #1, you can download it from here: RehabMan / OS-X-MaciASL-patchmatic / Downloads — Bitbucket. Open it up, press Command + F, and search for these terms: "Device (H_EC)" and "Device (EC0)". You will hopefully find the H_EC or the EC0 code block (not both). Don't bother with the meaning of the code you see, you don't have to understand it. There will be a code block in a few lines down, starting with "Method (_STA, ....". If you see a "Return (Zero)" in this {} block, then it means it's ignored as per post #1.
    So what we done in this step: You have to check if you have EC0 or H_EC device or neither in MaciASL. If you find EC0 or H_EC you need to check if it's ignored: "Return (Zero)" or not. Remember your findings...
  • 3.) Now you know what you have under the hood...
    • If you didn't have EC0 or H_EC device or it's returning Zero in method _STA, then you need to copy the file SSDT-EC.aml (attached to this post) to your main macOS drive's EFI partition, under EFI/CLOVER/ACPI/patched.
    • If you have found the EC0 or H_EC device in IORegistryExplorer and it's not returning Zero in method _STA, then you need to add a Clover config patch in EFI/CLOVER/config.plist to rename "EC0 to EC" or "H_EC to EC". Choose which one you have. The patch can be seen in post #1, under the title: "Insuring AppleBusPowerControllerUSB loads". In the picture, the config.plist file was opened in an application called Xcode, available free from the Mac App Store.
  • 4.) Restart you PC. Once macOS is loaded, open IORegistryExplorer again and check weather you see EC in the list. If "EC" shows up, everything is fine, continue with step 5.) If the name "EC" is still not there in IORegistryExplorer, start it over from 1.), more carefully.
  • 5.) Check your system definition in a built in macOS app called "System Information". Under the "Hardware Overview" section, you can find your system definition at "Model identifier", for example: iMac 18,3
    • If you have newer system definition than Macbook8,1 or MacBookAir7,2 or MacBookPro12,1 or MacPro6,1 or MacMini7,1 or iMac15,2 THEN copy the file SSDT-USBX.aml (attached to this post) to your main macOS drive's EFI partition, under EFI/CLOVER/ACPI/patched.
    • If you use one of the system def listed above or older, then you have nothing to do, continue with step 6.)
  • 6.) Restart your PC. Once macOS is loaded, plug in an iPhone or iPad to your Hackintosh with a USB cable. Open System Information app and choose the "USB" section from the left sidebar. Click on the iPhone or iPad in the list. If you can see all 4 lines you're won! ;)
    • Current Available (mA):
    • Current Required (mA):
    • Extra Operating Current (mA):
    • Sleep current (mA):
If all 4 lines are there, it's the obvious indicator of working USB power under macOS.
Hope this post will help others to understand the process described in post #1.
Great work on this simplified guide.

I first created my custom SSDT to eliminate unused USB ports per the @RehabMan guide, and then did this, which IMHO should be the order of implementation. Your step 2 didn't really make much sense to me (like, OK, I use MaciASL, but then open WHAT file to search for "EC"?). But in any case, I never found the EC element anywhere, and I ignored step 2, and followed 3 through 6, and voila, I have proper power insertion.

Aside from step #2, excellent presentation. Clear, simple and straightforward. Bravo.
 
Great work on this simplified guide.

I first created my custom SSDT to eliminate unused USB ports per the @RehabMan guide, and then did this, which IMHO should be the order of implementation. Your step 2 didn't really make much sense to me (like, OK, I use MaciASL, but then open WHAT file to search for "EC"?). But in any case, I never found the EC element anywhere, and I ignored step 2, and followed 3 through 6, and voila, I have proper power insertion.

Aside from step #2, excellent presentation. Clear, simple and straightforward. Bravo.

I'm not sure what you mean by "step #2". This guide does not use numbered steps.
 
Great work on this simplified guide.

I first created my custom SSDT to eliminate unused USB ports per the @RehabMan guide, and then did this, which IMHO should be the order of implementation. Your step 2 didn't really make much sense to me (like, OK, I use MaciASL, but then open WHAT file to search for "EC"?). But in any case, I never found the EC element anywhere, and I ignored step 2, and followed 3 through 6, and voila, I have proper power insertion.

Aside from step #2, excellent presentation. Clear, simple and straightforward. Bravo.
Sorry - I should have be clearer. I'm referring to the @balazs631 guide.

Checking for an existing EC is best done by examining ioreg.
 
I want to know whether my USB will be broken with this USB power injection? Thanks! I have injected USB property successfully with this guide, step by step.
 
No idea what you mean by "USB ... broken".
The excessive usb current. Most laptops are designed for windows, hence their usb current is customized for windows. With this tutorial, we “unlock” the limit to some degree so I am nervous if such current is overloaded beyond its limitation and someday we have the port permanently damaged due to this big current.
 
Last edited:
The excessive usb current. Most laptops are designed for windows, hence their usb current is customized for windows. With this tutorial, we “unlock” the limit to some degree so I am nervous if such current is overloaded beyond its limitation and someday we have the port permanently damaged due to this big current.

No idea (predicting the future is not possible). For you to experiment with.
 
No idea (predicting the future is not possible). For you to experiment with.
So can we decrease the maximum current via modification towards the SSDT, that is, changing the "kUSBWakePortCurrentLimit" and "kUSBSleepPortCurrentLimit" values to less ones?
 
Back
Top