Contribute
Register

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

You might experiment with overrides for the power values.
Also test other ports to see if all are the same.
No further ideas.
This is frustrating, I removed USBInjectAll.kext and noticed that the iPad was now charging:

390766



debug_9529.zip shows system without USBInjectAll installed - iPad is charging see image above

debug_10944.zip shows system WITH USBInjectall installed - When I install USBInjectAll which I understand I need with SSDT-UIAC.aml then I get pop up notification saying "USB Accessory Needs Power - Connect iPad to a USB port on this Mac"

I've attached my SSDT-UIAC.aml also

Does any of this give further ideas?
 

Attachments

  • debug_9529.zip
    3.8 MB · Views: 175
  • debug_10944.zip
    3.8 MB · Views: 144
  • SSDT-UIAC.aml.zip
    984 bytes · Views: 149
Last edited:
This is frustrating, I removed USBInjectAll.kext and noticed that the iPad was now charging:

View attachment 390766



debug_9529.zip shows system without USBInjectAll installed - iPad is charging see image above

debug_10944.zip shows system WITH USBInjectall installed - When I install USBInjectAll which I understand I need with SSDT-UIAC.aml then I get pop up notification saying "USB Accessory Needs Power - Connect iPad to a USB port on this Mac"

I've attached my SSDT-UIAC.aml also

Does any of this give further ideas?

Make sure your SSDT-UIAC.aml is only enabling ports which are actually present.
 
Make sure your SSDT-UIAC.aml is only enabling ports which are actually present.
I really appreciate your help - I've checked and double checked SSDT-UIAC.aml and I am as sure as I can be that this is correct

I know you are not a fan of clover configurator but it's easier for an amateur like me. I was experimenting, I disabled the rename here:
391034

Now my iPad charges on all my USB 3 ports (it connects data to USB 2 but no charging which I think is expected)
391035

Bare in mind, I only have limited understanding. I don't fully understand the "Rename" - Do I still need it or was it just for port discovery? Disabling seems to solve the power issue and USB seems to be working normally

Problem reporting files attached
 

Attachments

  • debug_8910.zip
    3.4 MB · Views: 145
I really appreciate your help - I've checked and double checked SSDT-UIAC.aml and I am as sure as I can be that this is correct

I know you are not a fan of clover configurator but it's easier for an amateur like me. I was experimenting, I disabled the rename here:
View attachment 391034

Now my iPad charges on all my USB 3 ports (it connects data to USB 2 but no charging which I think is expected)
View attachment 391035

Bare in mind, I only have limited understanding. I don't fully understand the "Rename" - Do I still need it or was it just for port discovery? Disabling seems to solve the power issue and USB seems to be working normally

Problem reporting files attached

Disabling EH0x renames will disable UsbInjectAll.kext for EHCI.
Typically, your hardware requires FakeSMC_XHCIMux.kext. It seems you have not installed it.
Note that with XHCIMux, you'll need to redo your SSDT.
Refer to the USBInjectAll.kext guide:
 
Hi @RehabMan and everyone else,
I am trying to implement proper USB power property injection for my desktop but for some reason, when I change EC0 -> EC and the AppleBusPowerController loads, only the USB bluetooth and sometimes the keyboard work since when I try to plug in something else like a usb memory stick, macOS says that the device needs more power. If I disable the rename patch and the power properties are not injected, the USBs work just fine (second attached file). I just wanted to implement it so I can be sure that everything is implemented as it should be (like a real mac) so I don't encounter sleep issues or other issues (which I don't currently experience).

As you will notice in the attached file (the first file - debug_5071 - this is the one with EC renamed and the power properties injected), a current of 2100 and power of 5100 is injected and that should be more than enough however, i also noticed that the 'kUSBBusCurrentAllocation' is only 150 (when you select the usb port in IOReg - in this case 'SSP1'). I think that this is where the problem lies but I am unsure how to fix this and if it is possible to override, what value to override it with. I also noticed that the USB memory stick called 'Ultra Fit' connected to SSP1 (in the IOReg) has a property called 'KUSBFailedRequestedPower'. So my deduction is that the memory stick request the power but it gets refused by the OS.

I also tried to override the values from those of iMac14,2 and that caused the keyboard to not work at all.

I don't know why I am facing this issue of lack of power and would really appreciate it if you could please help me. Thank you in advance!
 

Attachments

  • debug_5071.zip
    2.2 MB · Views: 141
  • withoutPowerPropertyInjection.zip
    2.2 MB · Views: 103
Last edited:
Hi @RehabMan and everyone else,
I am trying to implement proper USB power property injection for my desktop but for some reason, when I change EC0 -> EC and the AppleBusPowerController loads, only the USB bluetooth and sometimes the keyboard work since when I try to plug in something else like a usb memory stick, macOS says that the device needs more power. If I disable the rename patch and the power properties are not injected, the USBs work just fine (second attached file). I just wanted to implement it so I can be sure that everything is implemented as it should be (like a real mac) so I don't encounter sleep issues or other issues (which I don't currently experience).

As you will notice in the attached file (the first file - debug_5071 - this is the one with EC renamed and the power properties injected), a current of 2100 and power of 5100 is injected and that should be more than enough however, i also noticed that the 'kUSBBusCurrentAllocation' is only 150 (when you select the usb port in IOReg - in this case 'SSP1'). I think that this is where the problem lies but I am unsure how to fix this and if it is possible to override, what value to override it with. I also noticed that the USB memory stick called 'Ultra Fit' connected to SSP1 (in the IOReg) has a property called 'KUSBFailedRequestedPower'. So my deduction is that the memory stick request the power but it gets refused by the OS.

I also tried to override the values from those of iMac14,2 and that caused the keyboard to not work at all.

I don't know why I am facing this issue of lack of power and would really appreciate it if you could please help me. Thank you in advance!
PowerProperties part seems to be ok for now, But USB implementation seems not finished yet:
  1. No Windows emulation done (_OSI to XOSI rename via config.plist + SSDT-XOSI.aml)
  2. You did create a SSDT-UIAC but you have EH01 & EH02 controllers which you haven't configured them in SSDT or
completely disable EH01 & EH02 if your desktop is within the 16 port limit.
3. ESEL, XSEL, XWAK are present on your ACPI, it is a good idea to disable them as they are known to cause issues.

I think you should re-visit @RehabMan guide for USB Implementation:
https://www.tonymacx86.com/threads/guide-10-11-usb-changes-and-solutions.173616/

Also on your SSDT-UIAC:
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "UIAC-ALL", 0x00000000)
{
    Device (UIAC)
    {
        Name (_HID, "UIA00000")  // _HID: Hardware ID
        Name (RMCF, Package (0x02)
        {
            "8086_8xxx", 
            Package (0x04)
            {
you forgot to write your XHC device id on the SSDT, your ioreg shows pci8086,8cb1 so change "8086_8xxx" to "8086_8cb1".
 
Many thanks @Sniki for the very detailed answer. I will try all of this and let you know how it went.
 
PowerProperties part seems to be ok for now, But USB implementation seems not finished yet:
  1. No Windows emulation done (_OSI to XOSI rename via config.plist + SSDT-XOSI.aml)
  2. You did create a SSDT-UIAC but you have EH01 & EH02 controllers which you haven't configured them in SSDT or
completely disable EH01 & EH02 if your desktop is within the 16 port limit.
3. ESEL, XSEL, XWAK are present on your ACPI, it is a good idea to disable them as they are known to cause issues.

I think you should re-visit @RehabMan guide for USB Implementation:
https://www.tonymacx86.com/threads/guide-10-11-usb-changes-and-solutions.173616/

Also on your SSDT-UIAC:
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "UIAC-ALL", 0x00000000)
{
    Device (UIAC)
    {
        Name (_HID, "UIA00000")  // _HID: Hardware ID
        Name (RMCF, Package (0x02)
        {
            "8086_8xxx",
            Package (0x04)
            {
you forgot to write your XHC device id on the SSDT, your ioreg shows pci8086,8cb1 so change "8086_8xxx" to "8086_8cb1".

@Sniki, how would I completely disable EHC1 & EHC2? I renamed them to EH01 & EH02 which is supposed to prevent them from matching the built-in USB injectors, but that doesn't completely disable them. My machine is under the 15 port limit so would I make them Return 0 and if so, in which method? Is it the 'PSW' method?

As it turns out, my laptop is facing the same issue of power not being assigned when requested by USB devices. (I will post later about that if needed).

Thanks a lot in advance.
 
@Sniki, how would I completely disable EHC1 & EHC2? I renamed them to EH01 & EH02 which is supposed to prevent them from matching the built-in USB injectors, but that doesn't completely disable them. My machine is under the 15 port limit so would I make them Return 0 and if so, in which method? Is it the 'PSW' method?

As it turns out, my laptop is facing the same issue of power not being assigned when requested by USB devices. (I will post later about that if needed).

Thanks a lot in advance.
I think we are going off topic at this point for now.
Better move to USB solutions thread on next post and quote me there so we don't bloat this thread

You need SSDT-DEHCI.aml from Rehabman repo:
https://github.com/RehabMan/OS-X-Clover-Laptop-Config/blob/master/hotpatch/SSDT-DEHCI.dsl

This SSDT does disable your EHCI controllers completely therefore all your USB ports get assigned on your XHC Controller.
 
I think we are going off topic at this point for now.
Better move to USB solutions thread on next post and quote me there so we don't bloat this thread

You need SSDT-DEHCI.aml from Rehabman repo:
https://github.com/RehabMan/OS-X-Clover-Laptop-Config/blob/master/hotpatch/SSDT-DEHCI.dsl

This SSDT does disable your EHCI controllers completely therefore all your USB ports get assigned on your XHC Controller.

Thanks a lot for the help @Sniki - all fixed. USBs are now working perfectly.
 
Back
Top