Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Aug 21, 2018
Messages
8
Motherboard
Gigabyte GA-Z170X-UD3 Ultra
CPU
Intel Core i7-6700K
Graphics
EVGA GeForce GTX 1070 FTW2
Mac
MacBook Pro
Mobile Phone
iOS
@RehabMan - I'm hoping that maybe you can shine some light on this...

I'm in the preliminary stages of creating a custom SSDT for my Gigabyte GA-Z170X-UD3 Ultra Motherboard (to hopefully address sleep not functioning properly for me in 10.13.6) and so far, I have logged the locations of every physical port available on the board using a USB 3.0 hub I had lying around, per your guide:

USB 2.0/1.1 and USB 3.0 Ports

HS01 <01 00 00 00> - USB2 device on front panel USB3 (left)
HS02 <02 00 00 00> - USB2 device on front panel USB3 (right)
HS03 <03 00 00 00> - USB2 device on IO panel USB3 (bottom-left)
HS04 <04 00 00 00> - USB2 device on IO panel USB3 (bottom-right)
HS05 <05 00 00 00> - USB2 device on IO panel USB3 (top-left)
HS06 <06 00 00 00> - USB2 device on rear panel USB3 top-right
HS07 <07 00 00 00> - (unused/eliminate)
HS08 <08 00 00 00> - Motherboard USB2 header #1 (eliminate)
HS09 <09 00 00 00> - (unused/eliminate)
HS10 <0a 00 00 00> - (unused/eliminate)
HS11 <0b 00 00 00> - Motherboard USB2 header #2 (eliminate)
HS12 <0c 00 00 00> - (unused/eliminate)
HS13 <0d 00 00 00> - USB2/3 device on IO panel USB2 (right)
HS14 <0e 00 00 00> - USB2/3 device on IO panel USB2 (left)
SS01 <11 00 00 00> - USB3 device on front panel USB3 (left)
SS02 <12 00 00 00> - USB3 device on front panel USB3 (right)
SS03 <13 00 00 00> - USB3 device on IO panel USB3 (bottom-left)
SS04 <14 00 00 00> - USB3 device on IO panel USB3 (bottom-right)
SS05 <15 00 00 00> - USB3 device on rear panel USB3 (top-left)
SS06 <16 00 00 00> - USB3 device on rear panel USB3 (top-right)
SS07 <17 00 00 00> - (unused/eliminate)
SS08 <18 00 00 00> - (unused/eliminate)
SS09 <19 00 00 00> - (unused/eliminate)
SS10 <1a 00 00 00> - (unused/eliminate)
USR1 <0f 00 00 00> - (unused/eliminate)
USR2 <10 00 00 00> - (unused/eliminate)

Total Ports Injected: 26
Trimmed Target: 14​


USB 3.1 (Type-A) and USB 3.1/Thunderbolt 3 (Type-C) Ports

According to Gigabyte, these 2 ports are supplied by the onboard Alpine Ridge controller and not the Z170 chipset. Both ports appear to be attached at pci-bridge@2, under a device ID defined as pci8086, 15b6@0 in IOReg instead of being listed under XHC like the rest of the USB ports. Thus, I’m not exactly sure what I need to do with these two ports when constructing my custom SSDT, if anything.

AppleUSB20XHCIPort@00100000 <01 00 00 00> - USB2 device attached to Type-C port
AppleUSB20XHCIPort@00200000 <02 00 00 00> - USB2 device attached to Type-A port
AppleUSB30XHCIPort@00300000 <03 00 00 00> - USB3 device attached to Type-C port
AppleUSB30XHCIPort@00400000 <04 00 00 00> - USB3 device attached to Type-A port

Total Ports Injected: 4

**NOTE: I currently don't have a Thunderbolt 3 device to test with, so I'm not entirely certain whether a Thunderbolt device would assign a dedicated port or not. I may order an adapter to test things with a couple of my old TB2 dongles for FW800 and Ethernet that I have lying around.
If I do need to do something special for these, am I correct in assuming that because these ports are supplied by a separate controller that they're on their own 15-port limit?

My apologies in advance if you think I may have missed anything in your guide. This is my first attempt at a Hackintosh. Any pointers would be greatly appreciated. Thanks!
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,691
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I am obviously misunderstanding something. I thought if I DISABLED, or REMOVED all the Clover port limit patches, OR use the the -uia_ignore_rmcf boot flag then I am effectively enabling all the available USB ports?

But I suppose this must mean I'm hitting the Apple limit of 16 (24?), that's why I don't see the SSPx ports?

So finally, please confirm that there exists a Clover patch that raises the limit to 24 (or X > 16), and I just have to find it?
-uia_ignore_rmcf has nothing to do with the 15 port limit imposed by the macOS XHC kexts.
 
Joined
Aug 18, 2011
Messages
312
Motherboard
ASRock Z270M-ITX/ac
CPU
i7-6700K
Graphics
GTX 950 2 GB
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
iOS
-uia_ignore_rmcf has nothing to do with the 15 port limit imposed by the macOS XHC kexts.
Yes agreed. I just wanted to impart the information that I believed that I was setting up my system to appropriately test USB injection.

So I still have the basic problem of not being able to set the port limit to something greater than 15, despite checking the Clover patches several times.

Should I remove the copy of USBInjectAll.kext and get a fresh copy/version ?
What am I doing wrong, so that I fail to raise the port limit to greater than 15?

I should point out that I was successful in raising the port limit on the now broken Gaming 5 motherboard and getting the USBInjectAll.kext to work with it's USB ports. But now I have replaced it with the GA-Z97X Gaming 7 mobo, and I just can't get the port limit to raise. I am using the same exact USBInjectAll.kext on this Gaming-7 as I did on the Gaming-5 mobo.

I was successful in getting my ASRock mobo USB injector to work correctly too.

Is there something I'm not aware of limiting raising the port limit beyond 15 ? Do you agree, by looking in the bootlog.txt, that the port limit raise patches seem to be applied - but are just not working?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,691
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
@RehabMan

OK I see that in IOREGs that the port count is set to 15 - i.e. limited. I have applied ALL combinations of the config_patches.plist from your repo. I can see the patches getting applied in the bootlog.txt file (attached).

But I can't figure out what is disabling the port limit patch, or why this is failing to raise to 24?
Can you help?

attached is my latest debug attempt.
New patches for 10.13.6 just added to the repo only a few minutes ago.
Check again.
 
Joined
Aug 18, 2011
Messages
312
Motherboard
ASRock Z270M-ITX/ac
CPU
i7-6700K
Graphics
GTX 950 2 GB
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
iOS
Joined
May 31, 2016
Messages
154
Motherboard
Thinkpad X240
CPU
i5-4300U
Graphics
HD4400
Mobile Phone
Android
Code:
            <dict>
                <key>Comment</key>
                <string>disable port limit in XHCI kext (credit RehabMan, based prior PMHeart patch)</string>
                <key>MatchOS</key>
                <string>10.13.6</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Find</key>
                <data>g32IDw+DpwQAAA==</data>
                <key>Replace</key>
                <data>g32ID5CQkJCQkA==</data>
            </dict>
            <dict>
                <key>Comment</key>
                <string>change 15 port limit to 26 in XHCI kext (10.13.6) (credit PMHeart)</string>
                <key>MatchOS</key>
                <string>10.13.6</string>
                <key>Name</key>
                <string>com.apple.driver.usb.AppleUSBXHCI</string>
                <key>Find</key>
                <data>g32IDw+DpwQAAA==</data>
                <key>Replace</key>
                <data>g32ID5CQkJCQkA==</data>
            </dict>
Why are these two patches same? Is it disabled or changed to 26?
 
Joined
Apr 25, 2018
Messages
8
Motherboard
MSI Z270I Gaming Pro AC
New-ish to hackintosh. I've got everything working except for the bluetooth on my broadcom pcie card (wifi works fine). My guess is that it's something with the usb ssdt setup. Followed the guide and hoping someone can take a look at my plist (or any other files you need).

Let me know if there's anything else that'll help troubleshoot. Appreciate it!

Edit: added dsl file.
 

Attachments

Last edited:

Feartech

Moderator
Joined
Aug 3, 2013
Messages
11,252
Motherboard
Asus N752VX-Clover
CPU
i7-6700HQ / HM170
Graphics
HD530 + GTX 950m 1920 x 1080
Mac
iMac
Mobile Phone
Android
New-ish to hackintosh. I've got everything working except for the bluetooth on my broadcom pcie card (wifi works fine). My guess is that it's something with the usb ssdt setup. Followed the guide and hoping someone can take a look at my plist (or any other files you need).

Let me know if there's anything else that'll help troubleshoot. Appreciate it!
problem reporting files are incomplete, please re read post 1
 
Joined
Aug 21, 2018
Messages
8
Motherboard
Gigabyte GA-Z170X-UD3 Ultra
CPU
Intel Core i7-6700K
Graphics
EVGA GeForce GTX 1070 FTW2
Mac
MacBook Pro
Mobile Phone
iOS
New-ish to hackintosh. I've got everything working except for the bluetooth on my broadcom pcie card (wifi works fine). My guess is that it's something with the usb ssdt setup. Followed the guide and hoping someone can take a look at my plist (or any other files you need).

Let me know if there's anything else that'll help troubleshoot. Appreciate it!
Actually, you'll want to post your SSDT-UIAC-ALL.dsl (or whatever name you gave it) file for proper troubleshooting of your custom SSDT. The USB port assigned to your Bluetooth card should have a value of 255 defined under "USB Connector" (common mistake is someone to leave this value at 0 or 3).
 
Joined
Apr 25, 2018
Messages
8
Motherboard
MSI Z270I Gaming Pro AC
Actually, you'll want to post your SSDT-UIAC-ALL.dsl (or whatever name you gave it) file for proper troubleshooting of your custom SSDT. The USB port assigned to your Bluetooth card should have a value of 255 defined under "USB Connector" (common mistake is someone to leave this value at 0 or 3).
Thanks for the pointer. I've tried it with 0, 3, and 255 without luck. But I retested it with 255 and added the .dsl file to my first post.
 
Top