Contribute
Register

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

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 know it's a bit off topic, but is there some specific rule to name SSDTs.aml (maybe with the wrong name Clover can't load them?). I know I can use the clover configurator feature "SortedOrder", but aside from that (which I don't want to use) can I just name an SSDT.aml after anything I want?
 
Inserted all entries and SSDT's please check it.
If the USB Port injection and USB Power property are ok now?

Power properties are now present in ioreg (look under the 'EC' node).
 
I know it's a bit off topic, but is there some specific rule to name SSDTs.aml (maybe with the wrong name Clover can't load them?). I know I can use the clover configurator feature "SortedOrder", but aside from that (which I don't want to use) can I just name an SSDT.aml after anything I want?

Any name ending in .aml will be loaded by Clover, provided no SortedOrder specified.
 
Thanks, this is awesome! Keep up the great work RehabMan, I'm sure you hear it all the time, but your work and effort is deeply appreciated by the members of the Hackintosh community!

This means I can finally use Duet Display with my iPad, without it quickly running out of power :D
 
Great work, i also want to report that after adding fake EC device and USBX, my boot in verbose is much cleaner, now i don't have anymore the message spamming "AppleUSBHostResources::allocateDownstreamBusCurrentGated: assuming successful wakeUnits...." for each port using 17,1 definition
 
This is probably the shortest and easiest SSDT fix I have read.
I am on z97 platform using iMac 16,2. Injected a fake EC, and also USBX in the SSDT-UIAC(currently overriding to the default value).
Not sure I'm doing it right.
All my USB ports were charging fine before this fix, they were slow, I am testing if I can override the default value to see if there's any change.
 

Attachments

  • ssdt-ec ssdt-uiac IOreg.zip
    908.6 KB · Views: 121
This is probably the shortest and easiest SSDT fix I have read.
I am on z97 platform using iMac 16,2. Injected a fake EC, and also USBX in the SSDT-UIAC(currently overriding to the default value).
Not sure I'm doing it right.
All my USB ports were charging fine before this fix, they were slow, I am testing if I can override the default value to see if there's any change.

iMac16,2 is not in the IOUSBHostFamily Info.plist, so you don't need the "AppleBusPowerControllerUSB" override (it is redundant)... only the USBX.
Other than that, you have the right idea...

Note: You could bring the code from SSDT-EC into your SSDT-UIAC if you wanted...
 
I have several problems with USB. After wake from sleep I get continuous log spam about failures resetting the USB power state. Googling the error show that this happens to real Macs occasionally. The problem is similar to this thread https://www.tonymacx86.com/threads/usb-c-hotplug-questions.211313/

I get messages that the usb devices were disconnected improperly ( one message per device per dark ware cycle). I’ve tried Jettison and the solutions offered here but the problem persists.

My USB microphone does not connect on reboot or after sleep but un plugging and re plugging it fixes it.
This is the log spam that get output continuously after sleep:
Code:
default    14:22:30.745468 -0700    kernel    015183.452031 AppleUSBXHCIAR@00000000: AppleUSBXHCI::hardwareException: Error saving state
default    14:22:30.745475 -0700    kernel    015183.452040 AppleUSBXHCIAR@00000000: AppleUSBHostController::setPowerStateGated: going to state 1 returned 0xe00002e9
default    14:22:30.745530 -0700    kernel    015183.452094 AppleUSBXHCIAR@00000000: AppleUSBXHCIPCI::hardwareException: controller unplugged (regRead32)
default    14:22:30.745532 -0700    kernel    015183.452098 AppleUSBXHCIAR@00000000: AppleUSBXHCI::hardwareException: kUSBStatusControllerNotReady did not clear
default    14:22:30.745538 -0700    kernel    015183.452104 AppleUSBXHCIAR@00000000: AppleUSBHostController::setPowerStateGated: going to state 2 failed with 0xe00002e9
default    14:22:30.845713 -0700    kernel    015183.552260 AppleUSB20XHCIPort@00100000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845722 -0700    kernel    015183.552286 AppleUSB20XHCIPort@00200000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845723 -0700    kernel    015183.552286 AppleUSB30XHCIPort@00400000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845727 -0700    kernel    015183.552292 AppleUSB30XHCIPort@00300000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
de
 

Attachments

  • ioreg.zip
    885.5 KB · Views: 82
  • RehabMan patchmatic z170x ud3 ultra .zip
    57.2 KB · Views: 79
  • Terminal Saved Output.zip
    1.3 KB · Views: 86
Last edited:
I have several problems with USB. After wake from sleep I get continuous log spam about failures resetting the USB power state. Googling the error show that this happens to real Macs occasionally. The problem is similar to this thread https://www.tonymacx86.com/threads/usb-c-hotplug-questions.211313/

I get messages that the usb devices were disconnected improperly ( one message per device per dark ware cycle). I’ve tried Jettison and the solutions offered here but the problem persists.

My USB microphone does not connect on reboot or after sleep but un plugging and re plugging it fixes it.
This is the log spam that get output continuously after sleep:
Code:
default    14:22:30.745468 -0700    kernel    015183.452031 AppleUSBXHCIAR@00000000: AppleUSBXHCI::hardwareException: Error saving state
default    14:22:30.745475 -0700    kernel    015183.452040 AppleUSBXHCIAR@00000000: AppleUSBHostController::setPowerStateGated: going to state 1 returned 0xe00002e9
default    14:22:30.745530 -0700    kernel    015183.452094 AppleUSBXHCIAR@00000000: AppleUSBXHCIPCI::hardwareException: controller unplugged (regRead32)
default    14:22:30.745532 -0700    kernel    015183.452098 AppleUSBXHCIAR@00000000: AppleUSBXHCI::hardwareException: kUSBStatusControllerNotReady did not clear
default    14:22:30.745538 -0700    kernel    015183.452104 AppleUSBXHCIAR@00000000: AppleUSBHostController::setPowerStateGated: going to state 2 failed with 0xe00002e9
default    14:22:30.845713 -0700    kernel    015183.552260 AppleUSB20XHCIPort@00100000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845722 -0700    kernel    015183.552286 AppleUSB20XHCIPort@00200000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845723 -0700    kernel    015183.552286 AppleUSB30XHCIPort@00400000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
default    14:22:30.845727 -0700    kernel    015183.552292 AppleUSB30XHCIPort@00300000: AppleUSBXHCIPort::powerOn: deadline passed (PORTSC 0x00000000)
de

I don't think your issue is related to this topic, but you have not implemented post #1... (missing EC device). Your H_EC is inactive (_STA returns 0), so you don't want use use the H_EC rename. Remove it and add SSDT-EC.aml.

Also a different topic, but your UsbConnector values look wrong.
It is impossible to have 6 SSxx ports marked UsbConnector=3, but 8 HSxx ports also marked UsbConnector=3.
There should be a 1:1 correlation between HSxx/SSxx marked UsbConnector=3.
 
Last edited:
Hi RehabMan. Can you take a look at my files? Still can't get this working. Last time I was able to charge my iPad and use an external Apple DVD drive was under Yosemite... Thanks for all you do.
 

Attachments

  • EFI copy.zip
    2.2 MB · Views: 95
  • T-Mac.ioreg
    9.7 MB · Views: 136
Back
Top