Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Jun 15, 2017
Messages
10
Motherboard
GA-Z270M-D3H (rev. 1.0)
CPU
Intel® Core™ i7-7700K
Graphics
ASUS EX-GTX1050TI-O4G
Mac
iMac
Mobile Phone
Android, iOS
Great article RehabMan! Many thanks!
I followed the instruction on page 1 and now all my USB3 devices are working fine on my Hackintosh. Awesome!

Requirements:
- EHC1->EH01 and EHC2->EH02 rename (in config.plist), if applicable (your chipset may not have EHCI, or it may be disabled)
- XHCI controller must be named XHC (for most PCs it is default)
- port limit patch (in config.plist)
- install USBInjectAll.kext (install to the system volume)
- if you plan to use it, install FakePCIID.kext + FakePCIID_XHCIMux.kext
- if you have an existing SSDT for USBInjectAll, use -uia_ignore_rmcf
- XHCI injector kext, if required (200-series need XHCI-200-series-injector.kext)

The EHCx renames and port limit patches are available in config_patches.plist (https://github.com/RehabMan/OS-X-USB-Inject-All/raw/master/config_patches.plist) in the USBInjectAll.kext repository. Use copy/paste from a plist editor to get them into your own config.plist.
I used vim to copy the 2 important patch blocks from config_patches to my config.plist. The difference for the original and new config.plist are stored in the attached diff.txt

1) DSDT->Patches 2) KernelAndKextPatches->KextsToPatch
Also, add '-uia_ignore_rmcf' in Boot->Arguments in config.plist
Code:
-        <string>dart=0 darkwake=8</string>
+        <string>dart=0 darkwake=8 -uia_ignore_rmcf</string>
 

Attachments

Joined
Dec 31, 2013
Messages
332
Motherboard
Intel NUC8i7BEH
CPU
i7-8559U
Graphics
Iris Plus 655
Mobile Phone
iOS
Yes.
And a USB type C can use up to three ports (two SSxx ports [one for each orientation of the connector], and one HSxx).
Depends on whether the USB-C has a built-in switch for dealing with orientation or not (with switch uses 1x SSxx, 1x HSxx, without switch uses 2x SSxx, 1x HSxx).
After swapping the Broadcom card with the faulty adapter and having plugged in the DW1830 from which the bluetooth USB data passes through, I was able to complete the USB mapping. I removed 4 ports more, removed the Port Limit patch and have now 13 ports showing in IOReg.
I'd say sweet.
Thanks a lot for the guide and everything else.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
1. XHC is a2af/ Natively supported in 10.13.4/ but I still need SSDT for full functional USB? right?
Of course you must still follow this guide to configure the ports correctly.
Also here:
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra-and-later.222266/

2. Ok, the internal ports are HS8, HS9 which is internal USB 2.0/1.1 headers. My IOREG original showed me NZXT CPU cooler in HS08 and Bluetooth/wifi in HS9 SO I put both = '255'
Don't forget about internal hubs as mentioned in my previous reply.

4. Sleep/Wake is OK but only Shutdown has issue. (restart)
I believe "auto restart after shutdown" can be solved with BIOS setttings (eRP, or something like that).

5. Internal audio is not enabled intently. (Using monitor's audio)
6. GPU PM? iGPU? No need it so not enabled.
Off-topic.

7. Hibernate? you meant 'darkwake=0'?
Yes/No.
See pmset -g output.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Great article RehabMan! Many thanks!
I followed the instruction on page 1 and now all my USB3 devices are working fine on my Hackintosh. Awesome!



I used vim to copy the 2 important patch blocks from config_patches to my config.plist. The difference for the original and new config.plist are stored in the attached diff.txt

1) DSDT->Patches 2) KernelAndKextPatches->KextsToPatch
Also, add '-uia_ignore_rmcf' in Boot->Arguments in config.plist
Code:
-        <string>dart=0 darkwake=8</string>
+        <string>dart=0 darkwake=8 -uia_ignore_rmcf</string>
Don't forget to follow the rest of the guide. The port limit patch and -uia_ignore_rmcf are for short term use only (port discovery).
 
Joined
Feb 9, 2012
Messages
297
Motherboard
GA-Z390 Designare
CPU
i7 8700k
Graphics
Vega 64
Mac
iMac, MacBook Pro
Mobile Phone
iOS
Of course you must still follow this guide to configure the ports correctly.
Also here:
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra-and-later.222266/




Don't forget about internal hubs as mentioned in my previous reply.

- So internal hubs (My monitor's USB hubs and my case's Front USB 3.0) like you mentioned, should be '255' not '3'

I believe "auto restart after shutdown" can be solved with BIOS setttings (eRP, or something like that).

- Ok, I will try ERP enabled since mine is disabled.



Yes/No.
See pmset -g output.

-Here is my result

-So mine is '3' How to do disable? and what is '3' meaning?



autorestart 0

Sleep On Power Button 1

halfdim 1

hibernatefile /var/vm/sleepimage

powernap 0

gpuswitch 2

networkoversleep 0

disksleep 0

sleep 0 (sleep prevented by mds)

hibernatemode 3

ttyskeepawake 1

displaysleep 0

womp 0


Thanks for your help!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Joined
Sep 5, 2013
Messages
103
Motherboard
GA-H87N-WIFI
CPU
4770
Graphics
GTX 750
Mac
MacBook Air, MacBook Pro
can have some power saving properties
I didn't made the SSDT yet as I've been lazy and I worked ok. But today some friend gave me an Apple Keyboard A1243, the one with two USB2 on both sides. It worked but when I plugged a usb2 pendrive, MacOS told me it needed more energy to function. I've tried the keyboard on my MacBook Pro and it worked.

Could the SSDT fix this? Or it's linked to my motherboard unable to deliver enough power? There this on-off supercharge something advertised for my motherboard, but not sure it is related. https://www.gigabyte.com/MicroSite/185/on-off-charge.htm
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I didn't made the SSDT yet as I've been lazy and I worked ok. But today some friend gave me an Apple Keyboard A1243, the one with two USB2 on both sides. It worked but when I plugged a usb2 pendrive, MacOS told me it needed more energy to function. I've tried the keyboard on my MacBook Pro and it worked.

Could the SSDT fix this? Or it's linked to my motherboard unable to deliver enough power? There this on-off supercharge something advertised for my motherboard, but not sure it is related. https://www.gigabyte.com/MicroSite/185/on-off-charge.htm
No "Problem Reporting" files attached.
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.
 
Joined
Sep 5, 2013
Messages
103
Motherboard
GA-H87N-WIFI
CPU
4770
Graphics
GTX 750
Mac
MacBook Air, MacBook Pro

RehabMan

Moderator
Joined
May 3, 2012
Messages
192,090
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Top