Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

You're doing pretty well so far :thumbup:

However take a look at this:


Click on the icon, bottom-right to output the configuration files.

Use the SSDTs, files 1 & 2, with USBInjectAll instead of your own SSDT - OR - Remove your SSDT and the USBInjectAll.kext and install USBPorts.kext, file 3, instead.

For more detail head on over to the thread.

:)
I clicked on the bottom right icon and a message came up to rename EC0>EC & SAT0>SATA. I found USBPorts.kext & SSDT-UIAC.aml on the desktop & put them in appropriate places in EFI/Clover/... I deleted my SSDT-USB-Template.aml, USBInjectAll & uia_exclude command, added GenericUSBXHCI. (The older IOReg had EH01 > PR11 > HP11 to HP18 all coming off PR11, then PR12-18 continued branching from EH01.)

Now HP11-18 ports are all directly coming off EH01. And off the EH02 node are ports HP21-22 followed by several PRxx ports...

Everything USB seems to be working. I'm going to read up on Hackintool. Thank you for shining the light!
 
Last edited:
Hi @UtterDisbelief

I'm having some issues with setting up my USB, I thought it was good but I'm starting from scratch. Would appreciate help if you have the time....

To prepare for port discovery, I have done this rename:
Screenshot 2019-08-30 at 23.06.50.png

Then I installed the port limit patches using Multibeast:
Screenshot 2019-08-30 at 23.09.50.png

Then I installed USBInjectAll Kext to library/extensions. I already have FakePCIID_XHCIMux.kext and FakePCIID.kext installed, then rebooted

Questions:

1. Do I need the XHC1 rename with my hardware?
2. I plan to now do port discovery with Hackintool, have I done everything I need to do? When I look in ioReg I see devices on EH01 and EH02 and XHC, is this as it should be?

Many thanks for help, problem reporting files attached
 

Attachments

  • debug_18096.zip
    2.2 MB · Views: 51
Last edited:
Hi @UtterDisbelief

I'm having some issues with setting up my USB, I thought it was good but I'm starting from scratch. Would appreciate help if you have the time....

To prepare for port discovery, I have done this rename:
View attachment 423851

Then I installed the port limit patches using Multibeast:
View attachment 423852

Then I installed USBInjectAll Kext to library/extensions. I already have FakePCIID_XHCIMux.kext and FakePCIID.kext installed, then rebooted

Questions:

1. Do I need the XHC1 rename with my hardware?
2. I plan to now do port discovery with Hackintool, have I done everything I need to do? When I look in ioReg I see devices on EH01 and EH02 and XHC, is this as it should be?

Many thanks for help, problem reporting files attached

Hello there.

I don't offer support for Hackintool here. That's an excellent utility, but someone else's work with its own thread. It also has a very useful built-in Help system.

However, I'll try and work through some points for you:

1) The Z87 chipset has an XHCI controller. You would only need to use the rename if, when checking with IOReg, the controller was indeed showing as XHC1. If it's XHC then no.

2) Your motherboard has 8x USB2 ports and 6x USB3. This makes for a grand total of 20x ports configurable.

3) Your IOReg output is showing 34x ports - 20x on XHC and 14x on EHC. Not likely to work reliably. Using FakePCIID_XHCIMux.kext in your case shunts the USB2 ports away from the XHC controller for macOS, and onto the EH01/EH02 EHCI controllers. This is a common 'trick' to allow more USB3 ports to be included in the XHC tree. Confusingly though, they still look to be included on XHC too. The SSDT-EC.aml you are using might have something to do with this as it is a spoofed embedded controller.

You have 14x possible USB2 port configurations, along with 6x USB3 (their USB2 component included in the 14 etc). And that's it. So remember 8x of those 14 ports - HS01 to HS14 - are UsbConnector type '0' (USB2 contacts) not '3' (USB3 contacts).

4) So as a first-step test I think I would remove FakePCIID_XHCIMux.kext and see how the landscape looks afterwards. With any luck the EHC controller items will be gone. YMMV.

5) One further thought - is Audio working for you?

:)
 
Last edited:
Hello there.

I don't offer support for Hackintool here. That's an excellent utility, but someone else's work with its own thread. It also has a very useful built-in Help system.

No worries, I just thought it was easier for port identification than IOReg, but I'll follow your guide

1) The Z87 chipset has an XHCI controller. You would only need to use the rename if, when checking with IOReg, the controller was indeed showing as XHC1. If it's XHC then no.

It is showing as XHC

4) So as a first-step test I think I would remove FakePCIID_XHCIMux.kext and see how the landscape looks afterwards. With any luck the EHC controller items will be gone. YMMV.
So now, I am seeing devices in IOReg on XHC when I plug them in. I do have two devices though PR11 on EH01 and PR21 on EH02, both showing AppleUSB20InternalHub@1d100000 and @1a100000 - should these be there?

One further thought - is Audio working for you?

Yes, audio working

New IOREG attached
 

Attachments

  • iMac.zip
    1.1 MB · Views: 76
No worries, I just thought it was easier for port identification than IOReg, but I'll follow your guide



It is showing as XHC


So now, I am seeing devices in IOReg on XHC when I plug them in. I do have two devices though PR11 on EH01 and PR21 on EH02, both showing AppleUSB20InternalHub@1d100000 and @1a100000 - should these be there?



Yes, audio working

New IOREG attached

Hello again.

1) The latest IOReg uploaded above still shows the 8+6 ports on EH01/EH02 as well as the 20 on XHC. Did you remove FakePCIID_XHCMux.kext and rebuild the kext-caches?

2) As audio is working then I think it would be interesting to see what is in your Drive: Library/Extensions folder. I know that's not the reason for your initial post but it is a pointer ...

:)
 
Hello again.

1) The latest IOReg uploaded above still shows the 8+6 ports on EH01/EH02 as well as the 20 on XHC. Did you remove FakePCIID_XHCMux.kext and rebuild the kext-caches?

Yes, I did

) As audio is working then I think it would be interesting to see what is in your Drive: Library/Extensions folder. I know that's not the reason for your initial post but it is a pointer ...

:)

Here is a screenshot of my l/e folder
Screenshot 2019-08-31 at 12.28.31.png

FYI, I only install kexts to l/e as a rule, the only exception at the moment is FakeSMC I also have in CLOVER/kexts/Other

Wish I understood this better and thanks for your help. I've attached latest prob reporting files
 

Attachments

  • debug_3879.zip
    1.9 MB · Views: 60
Yes, I did



Here is a screenshot of my l/e folder
View attachment 423882

FYI, I only install kexts to l/e as a rule, the only exception at the moment is FakeSMC I also have in CLOVER/kexts/Other

Wish I understood this better and thanks for your help. I've attached latest prob reporting files

Hi there. Thanks for all the extra info.

Well you said in your initial post that you were 'having some issues' - what are they, exactly?

It looks as though you used Hackintool but removed the SSDTs. Apart from that you haven't otherwise configured your USB ports and there are too many.

:)
 
Last edited:
Hi there. Thanks for all the extra info.

Well you said in your initial post that you were 'having some issues' - what are they, exactly?

It looks as though you used Hackintool but removed the SSDTs. Apart from that you haven't otherwise configured your USB ports and there are too many.

:)
So I initially thought I had configured things correctly, I created a kext with Hackintool back on High Sierra. I then upgraded to Mojave and checked with Feartech and he said I could use the kext I created in HS

I was then checking things and I noticed that I had configured my 15 ports including PR11 and PR21 which are on EH01 and EH02, they show as “AppleUSB20InternalHub” - I included these when I created the kext with Hackintool and I now think this is wrong as everything should be on XHC no?

I thought I would start from scratch as I said but I think I’m now confusing myself more

I hope this makes sense
 
So I initially thought I had configured things correctly, I created a kext with Hackintool back on High Sierra. I then upgraded to Mojave and checked with Feartech and he said I could use the kext I created in HS

I was then checking things and I noticed that I had configured my 15 ports including PR11 and PR21 which are on EH01 and EH02, they show as “AppleUSB20InternalHub” - I included these when I created the kext with Hackintool and I now think this is wrong as everything should be on XHC no?

I thought I would start from scratch as I said but I think I’m now confusing myself more

I hope this makes sense

No problem. Going back to basics -

Apple impose a USB 15-port limit. Apple use an XHCI controller. So we try to emulate those if we can.

There are so many PC motherboards we sometimes have to compromise. Generally they have many more USB ports so we aim to only configure 15. And in preference use the XHCI controller. To do this we initially use USBInjectAll and a port-limit removal patch (remember macOS only sees 15 otherwise) so we can see them and choose which ones we want. Then we write a template to specify which ports are activated and how they should work. To run this template we use USBInjectAll again OR we use Hackintool's USBPorts.kext (There is a third method but we will ignore it for now).

In your case the Z87 has 14-ports available - 8x USB2 and 6x USB3. Because the USB3 ports can also act as USB2 ports we need two configurations for each, totalling 20x ports. Logic dictates we then should disable 5x ports to get to our target 15.

On your motherboard, personally I would not use the EHC renames you have in your config.plist. I don't have access to a Z87 but I would hope that if you do remove the renames the EHC controller will become invisible to macOS, leaving just the XHC ports to play with. Try it and let me know etc.

Next you can decide which of your HS01 to HS14 and SS01 to SS06 ports you are going to use by doing the port-discovery shown in this guide way back at post #1.

Create your template and put it in - EFI/CLOVER/ACPI/patched - remove or temporarily disable the port-limit patch and reboot. Hopefully you then have a fully working USB sub-system.

OR after removing the EHC controller, by using Hackintool you can select either of its two methods to configure your ports instead. The actual technology behind both processes is the same, just wrapped-up in different ways. The method outlined here is more hands-on but also more transparent.

The choice, as they say, is yours :thumbup:
 
Last edited:
No problem. Going back to basics -

Apple impose a USB 15-port limit. Apple use an XHCI controller. So we try to emulate those if we can.

There are so many PC motherboards we sometimes have to compromise. Generally they have many more USB ports so we aim to only configure 15. And in preference use the XHCI controller. To do this we initially use USBInjectAll and a port-limit removal patch (remember macOS only sees 15 otherwise) so we can see them and choose which ones we want. Then we write a template to specify which ports are activated and how they should work. To run this template we use USBInjectAll again OR we use Hackintool's USBPorts.kext (There is a third method but we will ignore it for now).

In your case the Z87 has 14-ports available - 8x USB2 and 6x USB3. Because the USB3 ports can also act as USB2 ports we need two configurations for each, totalling 20x ports. Logic dictates we then should disable 5x ports to get to our target 15.

On your motherboard, personally I would not use the EHC renames you have in your config.plist. I don't have access to a Z87 but I would hope that if you do remove the renames the EHC controller will become invisible to macOS, leaving just the XHC ports to play with. Try it and let me know etc.

Next you can decide which of your HS01 to HS14 and SS01 to SS06 ports you are going to use by doing the port-discovery shown in this guide way back at post #1.

Create your template and put it in - EFI/CLOVER/ACPI/patched - remove or temporarily disable the port-limit patch and reboot. Hopefully you then have a fully working USB sub-system.

OR after removing the EHC controller, by using Hackintool you can select either of its two methods to configure your ports instead. The actual technology behind both processes is just the same, just wrapped-up in different ways. The method outlined here is more hands-on but also more transparent.

The choice, as they say, is yours :thumbup:
Thanks. I understand about the 15 port limit and that we use the XHCI controller

I have the rename from when @RehabMan helped me when I was back on El Capitan, I think it is needed. I removed the rename and I attach "iMac1" ioReg which shows EHC1 and EHC2 active and "iMac2" which is with the patch restored with these routed to EH01 and EH02. By the way, anyone know what happened to rehabman, he seems to have disappeared, hope he's not actually in rehab!

I think I can do the SSDT, I understand that part. My question is should I have PR11 and PR21 showing on EHC1/2 after the rename, is this normal. I may head over to the more advanced thread or Hackintool also (no offence - I appreciate your help!) to try and develope my understanding
 
Back
Top