Contribute
Register

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

Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
I think you have a USB Problem.
Me thinks not so.
I have now tested USB charging with another iPad Air 2 on the same as well as different USB port I used for the other one.
This iPad charges, at what I perceive, at a normal rate, up to approximately 75% battery
capacity. This is when Sierra is awake. From 75%, give and take a few %ages the charge rate reduces considerably, however it keeps on charging. When I then force Sierra to sleep, the charge rate picks up again, and quite noticeably too.
I will however continue testing to ascertain what is cooking. I am hesitant though, to start chasing a problem which may in the end not be a problem. My iPhone on the other hand charges from 20% to 100%, at a constant steady rate.This to me is understandable as it's
charging current requirement is half that of an iPad.
 
Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
Me thinks not so.
I have now tested USB charging with another iPad Air 2 on the same as well as different USB port I used for the other one.
This iPad charges, at what I perceive, at a normal rate, up to approximately 75% battery
capacity. This is when Sierra is awake. From 75%, give and take a few %ages the charge rate reduces considerably, however it keeps on charging. When I then force Sierra to sleep, the charge rate picks up again, and quite noticeably too.
I will however continue testing to ascertain what is cooking. I am hesitant though, to start chasing a problem which may in the end not be a problem. My iPhone on the other hand charges from 20% to 100%, at a constant steady rate.This to me is understandable as it's
charging current requirement is half that of an iPad.
Update:
What I concluded above are perceived charge rates, varying over 80% of a complete charge cycle.
That is not really sound engineering, the reasons are:
That I have never monitored whether this varying perceived charge rate also manifests itself when the iPad is tethered to the charger it shipped with.
Perceptions are misleading and can greatly depend on ones frame of mind at a particular moment.
Remedial action:
I will now run the battery of my iPad down and monitor the charge rate over the complete charge cycle by timing the duration the battery level takes for each consecutive 10%
increase in the charge level.
I will conduct this test via a USB port on Sierra and repeat that same test whilst the iPad
is being charged via it's native charger.
Comparing the results thus obtained will certainly shed some light on this issue and reveal whether I can actually "still" rely on my "ability to perceive" :)
Will report back on the outcome later this week as these tests promise to be quite time consuming.
Greetings
 
Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
pls check mine also
correct already? thanks
Please check mine as well. This is for Sierra 10.12.5 on a GA-Z97X-UD3H mobo.
My sysdef is 14.2 being legacy and present in IOUSBHostFamily.kext/Contents/Info.plist
I did not find ECO or H_EC to rename so I only placed the fake EC file " SSDT-EC.aml"
in Clover/ACPI/patched. iPad/iPhone charging was not working before this simple mod. now
it is charging indeed.
Your feedback is appreciated as always.
 

Attachments

  • SixZips.zip
    2.7 MB · Views: 59

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Please check mine as well. This is for Sierra 10.12.5 on a GA-Z97X-UD3H mobo.
My sysdef is 14.2 being legacy and present in IOUSBHostFamily.kext/Contents/Info.plist
I did not find ECO or H_EC to rename so I only placed the fake EC file " SSDT-EC.aml"
in Clover/ACPI/patched. iPad/iPhone charging was not working before this simple mod. now
it is charging indeed.
Your feedback is appreciated as always.

The ioreg shows it working...
 
Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
The ioreg shows it working...
On my GA-Z97x-UD3H rig the charging current available is only 1000 ma. It manifests itself also
when actually charging the iPad, which takes forever. It is clear that Apple only plugged in values
into IOUSBHostFamily.kext/Contents/Info.plist for the 14.2 System Definition, which are suitable
to charge an iPhone.
So I modded the values that apple provided for 14.2, and that indeed upped the current to 2100 ma., with
my iPad now charging at the rate equal to the capability of the original Apple charger supplied with the iPad.
The drawback is that after every opsys update, that also contains changes to the IOUSBHostFamily.kext the values that I plugged in, will be overridden.
Is there perhaps a way to make this change permanent so that it survives updates? I am thinking of perhaps modding the SSDT-USBX.dsl ie. Device(_SB.USBX) to something else so that the values get injected with each restart, and use that file in the patched clover folder.
Attached the files that depict my modded values and the results obtained.

Sorry for wasting your time, after re-reading your #1 post (Guide) I discovered the answer.
Greetings
 

Attachments

  • Moded 14.2.zip
    156.4 KB · Views: 49
  • Original 14.2.zip
    147.3 KB · Views: 53
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Sorry for wasting your time, after re-reading your #1 post (Guide) I discovered the answer.
Greetings

Yes... congratulations for finding the answer already in post #1 (USBInjectAll.kext/SSDT/"AppleBusPowerControllerUSB").
 
Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
Yes... congratulations for finding the answer already in post #1 (USBInjectAll.kext/SSDT/"AppleBusPowerControllerUSB").
The problem is that I cannot get it to work.
1. I made sure to use your new USBInjectAll.kext in /Library/Extensions
2. I added your "override" code to my SSDT-UIAC.aml in patched. It does however not override the IOUSBHostFamily.kext
with the new values for my SysDef of 14.2 - trying to use values for 15.2 - that work well with a manual override.
3. I compiled your override code to a separate SSDT-OVR.aml. Results are the same as under 2 above, no override.
4. Only manual override is working
5. It appears your new USBInjectAll.kext seems to be the culprit and may require some tweaking, saying this tongue in cheek
off cause.
6. Most likely I made a mistake on my side but cannot find the problem as the code compiled without errors.

I would very much appreciate if you could look at the files I have included in the attached "Archive.zip" and guide me to
mistakes I have made.

Greetings
 

Attachments

  • Archive.zip
    4.6 MB · Views: 47
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,689
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
The problem is that I cannot get it to work.

Read post #1, "Problem Reporting". Provide all requested data, exactly as requested.
 
Joined
Nov 4, 2011
Messages
665
Motherboard
Gigabyte GA-Z170X-UD3 F23g
CPU
i7-6700K
Graphics
RX 580
Mac
  1. iMac
Read post #1, "Problem Reporting". Provide all requested data, exactly as requested.
Here you go, problem reporting files included as required.
The problem is that I am unable to override IOUSBHostFamily.kext as per your #1 posting, with my SSDT-UIAC.aml file, into which I have added the code that you suggested in your guide one should, and I quote, to eliminate the possibility of confusion, what I am attempting to achieve:
Quote
I have added support in USBInjectAll.kext to inject these properties. And, at least in my testing, the properties injected by USBInjectAll.kext are succesful in overriding those from IOUSBHostFamily.kext.
Unquote

Greetings
 

Attachments

  • Problem Report Files.zip
    2.6 MB · Views: 61
Top