Contribute
Register

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

Personally, I like to reduce the number of files. Lately, in my guides, I have started combining everything into a single SSDT (where possible).

Especially when I'm looking at someone's files after they followed one of my guides. With only a single (or few) files, it is easier for me to verify they have the correct set of files...

For some of my projects, I keep separate files in the project, but remove the DefinitionBlock wrapper and use #include to build the all-in-one SSDT (you will see that in my ProBook and NUC projects, for example). The end result in that case is a single (or just a few) SSDT.

Other repos just have everything copy/pasted into a single .dsl as those projects never used the separate files to begin with.
I see. Thanks for the clarification. I may change how I have it in the future, but I'll leave it as is for now because it works.

And is there any way to verify the ports are actually sending that much power without a multimeter hooked up to USB? Just checked System Profiler and it said it had an additional 1600 mA (so 2.1 A total) to deliver to my iPhone 7, non plus. Does that mean that's how much it CAN send or is that how much it IS sending? I'm using the iMac 17,1 definitions as it matches my hardware.

Additionally, does it matter which ports I use? This is a report from the USB header -> Front USB ports on my case, not off the motherboard.
 
I see. Thanks for the clarification. I may change how I have it in the future, but I'll leave it as is for now because it works.

And is there any way to verify the ports are actually sending that much power without a multimeter hooked up to USB? Just checked System Profiler and it said it had an additional 1600 mA (so 2.1 A total) to deliver to my iPhone 7, non plus. Does that mean that's how much it CAN send or is that how much it IS sending? I'm using the iMac 17,1 definitions as it matches my hardware.

Additionally, does it matter which ports I use? This is a report from the USB header -> Front USB ports on my case, not off the motherboard.

I really don't know the meaning of any of this data...
 
I really don't know the meaning of any of this data...
Let me try to clarify.

This is what System Information reported before on my iPhone.
Screen Shot 2017-05-27 at 1.08.51 PM.png


This is what it is now reporting.
Screen Shot 2017-05-27 at 1.08.18 PM.png

It says it is capable of sending up to 2100mA, even while sleeping. Is there a way to verify exactly how much power is going to the phone from the system while it is charging?
 
Let me try to clarify.

This is what System Information reported before on my iPhone.
View attachment 257694

This is what it is now reporting.
View attachment 257695
It says it is capable of sending up to 2100mA, even while sleeping. Is there a way to verify exactly how much power is going to the phone from the system while it is charging?

Like I said, really don't know what any of this data means or how USB really provides power and how the OS tells each port how much power to provide, nor how USB devices request certain amounts of power.

I just haven't read the relevant parts of the USB spec and chipset documentation.

For this guide, I simply observed what macOS was doing for their own products...
 
Oh. I thought I wasn't clear and you didn't understand what I was trying to ask. I'll pull out the multimeter later this week.

Yeah, just not something I looked into deeply...(more reading of chipset documentation required).
Probably one of those USB power meter gadgets would be quite useful...
 
Yes. And DropOem=false.



layout-id inject (and hda-gfx, etc) can be done easily with config.plist/Devices/AddProperties.
See example plists from my guide.



And yes, they can also be injected with _DSM in an add-on SSDT such as what I have in SSDT-HDAU (see SSDT-Config for how to configure the layout-id).

After 2 hours of attempt i somehow on my brain got a signal to just go check intelbacklight github on your repo and see the issue tracker and saw that it`s a known issue with 10.12.4+
I spent 2 hours to figure out why my brightness keys were working but not decreasing/increasing the level of brightness.
Went to the guide and build the injector mentioned on the guide and fixed the issue.

And wow this new method was really really easy to do so,your prebuilt SSDT-s on the hotpatch folder of your github are 95% complete.
With this new Hotpatch method it saves us a lot of time and headache,it will be much more easier for others too,like on my guide for example i can simply put all the necesary SSDT`s for my laptop and people can complete their hackintosh 300% faster.

Anyway here are the files after switching to the new method,i only did some small patches into DSDT like:
into _RMV methods i have to change the value from (One) Removable to (Zero) Non-Removable to get rid of a icon on system tray (Can i apply this change into Config.plist or with a SSDT ?)
i did the _PRW (Instant wake) patch even though it was on SSDT,wasn`t sure if it was already complete.
Will open separate Thread or post on my guide: https://www.tonymacx86.com/threads/guide-lenovo-thinkpad-l440.217119/
for that so i don`t clutter and go off topic on this one.

I would like to know if USB Power property is injected correctly and if theres also something else incorrect or missing.
 

Attachments

  • Rehabman.zip
    648.7 KB · Views: 80
It looks like a patched USB port charges my iPad as fast as the official Apple charger. Which is a rated at 10Watt, ergo 5v/2A = 2000 mA.
 
After 2 hours of attempt i somehow on my brain got a signal to just go check intelbacklight github on your repo and see the issue tracker and saw that it`s a known issue with 10.12.4+
I spent 2 hours to figure out why my brightness keys were working but not decreasing/increasing the level of brightness.
Went to the guide and build the injector mentioned on the guide and fixed the issue.

And wow this new method was really really easy to do so,your prebuilt SSDT-s on the hotpatch folder of your github are 95% complete.
With this new Hotpatch method it saves us a lot of time and headache,it will be much more easier for others too,like on my guide for example i can simply put all the necesary SSDT`s for my laptop and people can complete their hackintosh 300% faster.

Anyway here are the files after switching to the new method,i only did some small patches into DSDT like:
into _RMV methods i have to change the value from (One) Removable to (Zero) Non-Removable to get rid of a icon on system tray (Can i apply this change into Config.plist or with a SSDT ?)
i did the _PRW (Instant wake) patch even though it was on SSDT,wasn`t sure if it was already complete.
Will open separate Thread or post on my guide: https://www.tonymacx86.com/threads/guide-lenovo-thinkpad-l440.217119/
for that so i don`t clutter and go off topic on this one.

OK... just FYI you might have overdone it a bit with the SSDTs...
I think you'll find that some of them are not doing what they were designed to do (therefore probably not needed).
If you disassemble your patchmatic output, you'll see there are issues:
Code:
mkdir test
cd test
patchmatic -extract
iasl -da -dl *.aml

But yes, avoiding patched SSDTs in ACPI/patched does simplify some things.


I would like to know if USB Power property is injected correctly and if theres also something else incorrect or missing.

It is working.
 
OK... just FYI you might have overdone it a bit with the SSDTs...
I think you'll find that some of them are not doing what they were designed to do (therefore probably not needed).
If you disassemble your patchmatic output, you'll see there are issues:
But yes, avoiding patched SSDTs in ACPI/patched does simplify some things.
ACPI Error: [XSEL] Namespace lookup failure, AE_ALREADY_EXISTS (20161210/dswload-462)

ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20161210/psobject-310)

As far as i understand i see that XSEL is already nullified or not in use if im correct and is not needed as a patch ?
Is there something else that im missing ?
 
Back
Top