Contribute
Register

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

Hi RehabMan,



It seems it has changed in Mojave... I was reading your guides for both USB port limiting and also USB power injector to tune my installation of Mojave.
Thanks to your great tutorials that help to understand the all the logic, I checked there: cat /System/Library/Extensions/AppleBusPowerController.kext/Contents/Info.plist

Code:
<key>IOKitPersonalities</key>
    <dict>
        <key>AppleBusPowerController</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.apple.driver.AppleBusPowerController</string>
            <key>IOClass</key>
            <string>AppleBusPowerController</string>
            <key>IOMatchCategory</key>
            <string>AppleBusPowerController</string>
            <key>IONameMatch</key>
            <string>EC</string>
            <key>IOProviderClass</key>
            <string>IOACPIPlatformDevice</string>
        </dict>
    </dict>
    <key>LSMinimumSystemVersion</key>
    <string>10.14</string>

And so I found out it is now named AppleBusPowerController in Mojave.

So I've added EC0->EC to my config.plist and made a SSDT hotpatch as below, and it does work:

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "UIAC", 0x00000000)
// Port trimmed with port comments SSDT-UIAC.dsl for THINKPAD YOGA12
DefinitionBlock ("", "SSDT", 2, "hack", "UIAC", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")
        Name(RMCF, Package()
        {
     
            "AppleBusPowerController", Package()
            {
                // values from MacBookAir7,1 in /System/Library/Extensions/IOUSBHostFamily.kext/Contents/Info.plist
                "kUSBSleepPortCurrentLimit", 1600, // changed from 2100 to 1600
                "kUSBSleepPowerSupply", 1600, // changed from 2600 to 1600
                "kUSBWakePortCurrentLimit", 2100,
                "kUSBWakePowerSupply", 3200,
            },
     
            "8086_9cb1", Package()
            {

No more instant wake from USB and no more need to make static patch to the DSDT file to fix that problem.
I still have to increase power on USB port for wake, by the way.

Thanks again.

Thanks for reminding me.

It is actually an update to USBInjectAll.kext that I forgot to do when this change was made in 10.13.x.
New USBInjectAll.kext uploaded (0.6.9).

Post #1 updated as well.
 
Can i just get a sanity check as i cannot see USBX in ioreg.
 

Attachments

  • debug_18250.zip
    6 MB · Views: 124
Can i just get a sanity check as i cannot see USBX in ioreg.

Present. Look:
Screen Shot 2018-10-28 at 7.30.44 AM.png
 
RehabMan,

Tried a new clover set-up, with a patched DSDT, but now I've lost my power properties.
Added EC via the DSDT and using iMac14,2 so I thought everything would be okay, no joy.
I've the following kexts in clover:
Schermafbeelding 2018-10-29 om 16.49.11.png
Any chance you could shed a light on it?

Regards,
Simania
 

Attachments

  • config.plist
    11.1 KB · Views: 153
  • DSDT.aml
    68.2 KB · Views: 105
  • iMac Simania.ioreg
    8.8 MB · Views: 109
Thank you, and power properties were being nieces correctly for iMac17,1?

No idea what you mean by "nieces correctly", but you should look under the EC node.
 
RehabMan,

Tried a new clover set-up, with a patched DSDT, but now I've lost my power properties.
Added EC via the DSDT and using iMac14,2 so I thought everything would be okay, no joy.
I've the following kexts in clover:
View attachment 361322
Any chance you could shed a light on it?

Regards,
Simania
"Problem Reporting" files are incomplete/wrong.
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.
 
@RehabMan sorry about that.
Here you go.

No problem here with power properties.
Look:
Screen Shot 2018-10-30 at 8.36.21 AM.png


But you did forget to inject legacy power properties.
Set config.plist/Devices/USB/Inject=true
 
But you did forget to inject legacy power properties.
Set config.plist/Devices/USB/Inject=true

Thanks for the reply @RehabMan, I messed with the config.plist, because it would not give me the power properties.
I've now set Inject=true, but still no joy....Any other thought?
 
Back
Top