Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Mar 4, 2014
Messages
263
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
a bit cheeky but I'm in a good mood, here ya go

see the difference in yours and mine, editing a config.plist is a key element in hackintoshing and you should learn this :)
So, now with config.plist from @Feartech I see 20 ports under XHC in IOReg Explorer rather than 15 previously (this is what the patch is doing right?)

Screen Shot 2019-03-25 at 21.00.59.png

I think next I need to do port discovery by plugging in and removing a USB device to see what shows up in IOReg Explorer? Again, I am getting confused. When I did this exercise back on El Capitan some long time ago, I got help from rehabman, I recall then that the devices were showing up on XHC when I plugged them in, now showing under EH01 on the first USB device I plugged in. Sorry but this is really stretching me, but I can follow instruction usually!

Screen Shot 2019-03-25 at 21.05.11.png
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
10,362
Motherboard
Asus N752VX-Clover
CPU
i7-6700HQ / HM170
Graphics
HD530 + GTX 950m 1920 x 1080
Mac
iMac
Mobile Phone
Android
So, now with config.plist from @Feartech I see 20 ports under XHC in IOReg Explorer rather than 15 previously (this is what the patch is doing right?)

View attachment 395041

I think next I need to do port discovery by plugging in and removing a USB device to see what shows up in IOReg Explorer? Again, I am getting confused. When I did this exercise back on El Capitan some long time ago, I got help from rehabman, I recall then that the devices were showing up on XHC when I plugged them in, now showing under EH01 on the first USB device I plugged in. Sorry but this is really stretching me, but I can follow instruction usually!

View attachment 395043
you could also use the hackintool as well:
Hackintool:
it may be a little easier to go though, you refresh the page, plug usb2 and usb3 devices in and then delete the ones you don't need, it will then export a kext or a ssdt file you can use
 
Joined
Mar 4, 2014
Messages
263
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
you could also use the hackintool as well:
Hackintool:
it may be a little easier to go though, you refresh the page, plug usb2 and usb3 devices in and then delete the ones you don't need, it will then export a kext or a ssdt file you can use
OK, I used Hackintool and this is what I found testing the ports:

Screen Shot 2019-03-25 at 22.42.35.png

I then deleted ports not needed, leaving 16 active ports, like this:

Screen Shot 2019-03-26 at 11.44.13.png


I know I need to get to 15 ports, but I want to check before proceeding, questions:

1. SS01 is the internal header that leads to the front USB3 port on my case, should I set this as internal as above, or as USB3?
2. HP17 also leads to the front USB2 port on my case, should that be set as internal or USB2?
3. The "IOUSBHostDevice"at PR11 and 12 - I don't know what these mean, are they part of my 15 port limit?

Once I have got the above correct, I can export within the tool and I see it gives me SSDT-UIAC.aml and SSDT-EC.aml which I assume go in ACPI/Patched and also assume can remove the port limit patch

The kext USBPorts.kext is also generated. More confusion, do I still need USBInjectall, or do I use this instead and do I use with the SSDT's or the USBPorts.kext on its own

Sorry so many questions
 
Last edited:
Joined
Mar 4, 2014
Messages
263
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
Hi @Feartech - sorry for double post, but I've done some more reading and work since my last post. Can you tell me if what I have done is correct? I'd really appreciate it.

1. I mapped the ports with Hackintool and deleted those not used to leave 15 ports. I did this with the Port Limit Patch installed, USBInjectall.kext, FakePCIID_XHCIMux.kext and FakePCIID.kext all installed in library/extensions for the mapping. This left me with this:

Screen Shot 2019-03-28 at 09.46.40.png

2. I clicked the Export button, bottom right, which placed USBPorts.kext, SSDT-UIAC.aml and SSDT-EC.aml on my desktop
3. I removed USBInjectall.kext from l/e and installed USBPorts.kext to l/e
4. Placed both SSDT-UIAC and SSDT-EC in EFI/Clover/ACPI/Patched and put the following in Clover Configurator:

Screen Shot 2019-03-28 at 09.51.43.png

5. Removed the port limit patch from config.plist
6. Reboot

I've attached the usual problem reporting files. I know you're a busy guy but so grateful if you can tell me if this is correct. I'm still learning and dont have the deeper understanding to know if I've done right.....
 

Attachments

Feartech

Moderator
Joined
Aug 3, 2013
Messages
10,362
Motherboard
Asus N752VX-Clover
CPU
i7-6700HQ / HM170
Graphics
HD530 + GTX 950m 1920 x 1080
Mac
iMac
Mobile Phone
Android
Hi @Feartech - sorry for double post, but I've done some more reading and work since my last post. Can you tell me if what I have done is correct? I'd really appreciate it.

1. I mapped the ports with Hackintool and deleted those not used to leave 15 ports. I did this with the Port Limit Patch installed, USBInjectall.kext, FakePCIID_XHCIMux.kext and FakePCIID.kext all installed in library/extensions for the mapping. This left me with this:

View attachment 395638

2. I clicked the Export button, bottom right, which placed USBPorts.kext, SSDT-UIAC.aml and SSDT-EC.aml on my desktop
3. I removed USBInjectall.kext from l/e and installed USBPorts.kext to l/e
4. Placed both SSDT-UIAC and SSDT-EC in EFI/Clover/ACPI/Patched and put the following in Clover Configurator:

View attachment 395639

5. Removed the port limit patch from config.plist
6. Reboot

I've attached the usual problem reporting files. I know you're a busy guy but so grateful if you can tell me if this is correct. I'm still learning and dont have the deeper understanding to know if I've done right.....
you can just use either the kext is creates and install to /Library/Extensions

or

use USbInjectAll.kext and place .amls in patched/other
 
Joined
Feb 22, 2018
Messages
79
Motherboard
Asus Z390 Prime-A
CPU
i7-8700K
Graphics
RX 580 & WX7100
Mac
MacBook Pro, Mac Pro
Mobile Phone
iOS
What i found wrong so far:
- into config.plist > ACPI > DSDT > Patches :
1. Rename EHC1 to EH01 patch is present 3 times, why ? so is Rename EHC2 to EH02.
Your Motherboard doesn't have USB2.0 Ports/Controllers therefore no EHC1 to EH01 & EHC2 to EH02 patches needed.
Remove them.

2. You have FakePCIID_XHCIMux.kext installed which same concept to issue #1 apply, no EHCI controllers on your motherboard so this kext is not needed and just causes issues.

3. You need the patch: Change HECI to IMEI for your motherboard, very important patch.

4. You need the patch: Change SAT0 to SATA

5. You have the correct patch for Windows Emulation: Change _OSI to XOSI but you lack the SSDT-XOSI.aml into EFI/Clover/ACPI/Patched therefore no Windows Emulation applied to your ACPI.

6. Remove boot arguments uia_exclude_ss , uia_exclude=USR1, USR2, what is the purpose of your SSDT-UIAC if you have those ?.

I would definitely suggest you to do the changes i listed, remove the SSDT-UIAC from EFI/Clover/ACPI/Patched.

Add the USB Port limit patch and reboot

You need to capture usb ports correctly one more time. It doesn't take much time to be honest.

Simply open IOREG and keep it open the entire time.
Step 1:
Take a USB2 device (USB Mouse or something USB2) and plug it on each usb port that your motherboard have by keeping it plugged in 5 sec then removing and plugging it into the other port (until you have plugged it once on each usb port).

After you have finished this step, take a USB3 device (USB3.0 Flash Drive or USB3.0 External Drive) and plug it again on each port like on Step 1.

After you completed the process, save the ioreg file and upload it here (name it USB) and upload it with the problem reporting files as a separate ioreg named as USB.

Note: after you are about to upload your next "Problem Reporting" files, first on clover Boot menu, press F2 and F4, then after you boot, upload your Problem Reporting files as your EFI/Clover/ACPI/Origin was empty last time (no OEM ACPI files included).
I followed your instructions, worked perfectly, I updated to 10.14.4 after backing up, and the usb 3.0 doesn't work again.
From what I read, if the SSDT was successful that should not be the case, right?
 
Joined
Mar 17, 2015
Messages
21
Motherboard
Asrock Z97X Killer-Clover
CPU
i7-4790
Graphics
GTX780, HD4600
Mac
iMac, MacBook Air, MacBook Pro
Mobile Phone
iOS
Hi RehabMan,

Would be great if you can help with my implementation of the custom ssdt.
My MB has a very convoluted design(Asrock z97x). It has two hubs, Intel XHC and ASMedia USB3.
I disabled the ASMedia USB3 controller in the BIOS, however ASrock BIOS can't disable the EHCI.
I have the EHCI rename and initially I used FakePCIID and the XHCI Mux, but I decided to remove the XHCIMux expecting all ports to go through XHC.
It worked for all but one port (Fatal1ty Mouse port :rolleyes:), which is only USB2 and apparently wired to the HUB1.
In the examples for the Lenovo, you have code disabling EHCI1. My plan is to disable EHCI2, remove all but one port on the EHCI1 and clean the ports on XHC, which will bring me in the 15 port limit.
Is this a good plan or I should use the XHCI Mux and work from there?
Do you have a code disabling EHCI2?

Thanks!
 

Attachments

Joined
Jul 2, 2018
Messages
6
Motherboard
ASUS Prime Z370-A II
CPU
i5-8600K
Graphics
UHD 630
Mac
MacBook Pro
Mobile Phone
iOS
For example, you can see that the NUC6i7KYK uses 0xa12f:
Screen Shot 2017-01-02 at 2.30.25 PM.png
How did you convert the id in <> to the 0xa12f?
Edit: Got it with a little Join the Dots sequence!
Thank you so much for the amazing guide RehabMan!!
PS: What are the USR ports, and can I disable them is they didn't change colour during the identification?
TIA
 
Last edited:
Joined
Jul 24, 2013
Messages
125
Motherboard
Razer Blade 15 (2018)
CPU
I7-8750H
Graphics
GTX 1070HQ
Mac
iMac, MacBook, Mac mini
Classic Mac
iBook, iMac
Mobile Phone
iOS
Hi all,

I've been working through this guide the last day or so to get my USB working properly on my desktop (Z97a in my bio). I think I have reached a point where I have a basic understanding of what is going on, but I have reached a snag.

I have tried the guide using both FakePCIID_XHCIMux and without it. When using it, it does reroute my USB2 to EH01, but it does not route my internal USB2 headers anywhere, so my bluetooth does not work. I have the list of ports from port discovery here:

(xhcimux) EH01-HUB01 - PR11
HS12 - bluetooth (usb2 internal)
HS13 - usb2 top right
HS14 - usb2 top left
HS10/SS06 - usb3 mid left
HS09/SS05 - usb3 mid right
HS04/SS04 - usb3 bottom left
HS03/SS03 - usb3 bottom right
HS05 - usb2 internal
HS06 - usb2 internal
HS07 - usb2 internal
HS08 - usb2 internal
HS01/SS01 - usb3 frontpanel
HS02/SS02 - usb3 frontpanel

It seems like using XHCIMux to reroute my USB2 to EH01 seems like the best bet to stay under the port limit, but I can't figure out where the internal header ports went and how to fix that. If I could reroute some to EH01 and then keep the internal headers on XHC, I think that would work best from my understanding.

I have attached my debug files (this is without FakePCIID_XHCIMux).
 

Attachments

Last edited:
Top