Contribute
Register

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

Hi RehabMan,
I can't figure out why sometimes my mouse isn't working after sleep.Other devices work perfectly.
I properly injected USB-UIAC/USBX SSDT as you can see in my IOReg.

I have another question:
how I can see the log output of verbose mode? - can't find any boot.log or kernel.log in Console App.

Many Thanks in Advance.

Specs:
i7 8700K
Z370 F Asus
TL-WDN 4800(not working properly,already ordered an original Apple Broadcom card)
GTX 1070
Sierra 10.13.4
APFS File System

Problem Reporting Files Attached:EFI,kextstat,IOReg,DSDT (not injected)
 

Attachments

  • Archivio.zip
    31 MB · Views: 581
Hi RehabMan,
I can't figure out why sometimes my mouse isn't working after sleep.Other devices work perfectly.
I properly injected USB-UIAC/USBX SSDT as you can see in my IOReg.

I have another question:
how I can see the log output of verbose mode? - can't find any boot.log or kernel.log in Console App.

Many Thanks in Advance.

Specs:
i7 8700K
Z370 F Asus
TL-WDN 4800(not working properly,already ordered an original Apple Broadcom card)
GTX 1070
Sierra 10.13.4
APFS File System

Problem Reporting Files Attached:EFI,kextstat,IOReg,DSDT (not injected)

"Problem Reporting" files are wrong. (ioreg is corrupt, must use IORegistryExplorer v2.1)
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Hi RehabMan,
I can't figure out why sometimes my mouse isn't working after sleep.Other devices work perfectly.
I properly injected USB-UIAC/USBX SSDT as you can see in my IOReg.

I have another question:
how I can see the log output of verbose mode? - can't find any boot.log or kernel.log in Console App.

Many Thanks in Advance.

Specs:
i7 8700K
Z370 F Asus
TL-WDN 4800(not working properly,already ordered an original Apple Broadcom card)
GTX 1070
Sierra 10.13.4
APFS File System

Problem Reporting Files Attached:EFI,kextstat,IOReg,DSDT (not injected)
So sorry RehabMan for my mistake.
Fixed Problem Reporting files using script attached.

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/

Your USB configuration is wrong... wrong UsbConnector values. For each SSxx port with UsbConnector=3, there should be an associated HSxx port with UsbConnector=3. I see no HSxx ports with UsbConnector=3, but 4 SSxx with UsbConnector=3.

See guide:
https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/

Also, (may be unrelated) why is X86PlatformPlugin.kext patched?

For methods to access kernel logs, read here:
https://www.tonymacx86.com/threads/readme-common-problems-in-10-13-high-sierra.233582/
 
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.
 

Attachments

  • SSDT-EC.aml
    63 bytes · Views: 22,596
  • SSDT-USBX.aml
    185 bytes · Views: 8,700
Last edited:
How can i remove this patch from X86PlatformPlugin.kext?
Thanks

Run the macOS installer to restore all Apple provided system files to original.
 
I have problem with one usb 3.0. When i connect it directly to usb port, it say usb need power. If i plug into usb hub it work flawlessly. Also try this usb with my PC hack or another usb 3.0 with laptop it work without problem. Any help would be appreciated.
 

Attachments

  • Trung’s MacBook Pro.ioreg
    5.8 MB · Views: 372
  • Screen Shot 2018-04-25 at 1.01.37 PM.png
    Screen Shot 2018-04-25 at 1.01.37 PM.png
    15.7 KB · Views: 496
  • debug_31279.zip
    3 MB · Views: 268
Back
Top