Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

Hello. There.

Yes you can use the guide. There is a new port-limit removal patch in the Catalina Support thread.

I guess you are booting in Legacy BIOS mode? I couldn't see a UEFI BIOS in the motherboard specs.

If you have a booting Catalina system then you will need to test (someone has to be the first with any older motherboard :thumbup:). I'd recommend you install USBInjectAll.kext in EFI/CLOVER/kexts/Other and the new port-limit removal patch in your config.plist. Once rebooted check your ports using IORegistyExplorer as explained in the guide.

As always, keep a UniBeast installer drive handy so you can boot the system if things go wrong - and back-up anything important to a separate drive.

Let us know how you get on.

:)
I followed the beginners and advanced guide and was able to successfully get only the desired ports working. I´m booting UEFI, but can not get my usb camera to work properly with Automator Photo Capture.
I recently updated all my rigs to Catalina, I have in two of my computers a USB Logitech webcam to take pictures of clients using a small Automator app. After Catalina update Automator is not able to show any video from the webcam, when I clic on the Camera button the webcam's led turns on, but no video is displayed. Tried it with Photo Booth and video shows from web cam for a few minutes; but after a while it only shows a black screen showing "camera not connected". I have tried different USB ports without any positive results. Every thing else seems to be working fine. I can actually see the camera detected on System Report.
I followed the beginners and advanced guide and was able to successfully get only the desired ports working, and no need for usb limit patch. I´m booting UEFI, but can not get my usb camera to work properly with Automator Photo Capture. I have USBInjectAll.kext in Library/Extensions, FakePCIID_XHCIMux.kext and FakePCIID.kext in /EFI/Clover/kexts/Other. Any ideas or suggestions?
1572662211588.png
 
I followed the beginners and advanced guide and was able to successfully get only the desired ports working. I´m booting UEFI, but can not get my usb camera to work properly with Automator Photo Capture.
I recently updated all my rigs to Catalina, I have in two of my computers a USB Logitech webcam to take pictures of clients using a small Automator app. After Catalina update Automator is not able to show any video from the webcam, when I clic on the Camera button the webcam's led turns on, but no video is displayed. Tried it with Photo Booth and video shows from web cam for a few minutes; but after a while it only shows a black screen showing "camera not connected". I have tried different USB ports without any positive results. Every thing else seems to be working fine. I can actually see the camera detected on System Report.
I followed the beginners and advanced guide and was able to successfully get only the desired ports working, and no need for usb limit patch. I´m booting UEFI, but can not get my usb camera to work properly with Automator Photo Capture. I have USBInjectAll.kext in Library/Extensions, FakePCIID_XHCIMux.kext and FakePCIID.kext in /EFI/Clover/kexts/Other. Any ideas or suggestions?
View attachment 433948

Hi there.

Well done on doing all the necessay ground-work to get your ports working :thumbup:

From what you tell us and what we can see in the screengrab, you have moved USB 2.0 ports away from XHC and onto the EHC controllers. The motherboard USB 2.0 ports are on a "hub".

It's worth noting your motherboard features an add-on "piggy-back" USB controller by ASMedia, but your camera is not attached to one of those.

Okay, so then:

A "hub" port is not easy to configure - and this is one of the ones you have your camera plugged into.
For Catalina it may be better to use a direct port on the XHC controller where possible.
The ASMedia ports will work but not be configurable using normal techniques.

Here's what I would try:

Check your port-discovery to identify the ASMedia ports, there's 2x of them on the back panel. They will appear in a different part of the IOReg tree entirely. ASUS's web-site shows you have 6x USB3.1 ports (so 12x to configure) and 8x USB2.0 ports controlled by the Z97 chip. A total of 20x ports. No real need to use the ASMedia ones as you still need to 'lose" 5x to get down to 15.

Remove FakePCIID_XHCIMux.kext and see how that affects the output in IORegistryExplorer. This kext moves USB 2.0 ports away from the XHC controller and on to EHC to make more room for USB 3 ports. If instead you keep them all on XHC this is going to be more "natural" for Catalina. When you have both types of controller and are using a modern macOS, then XHC is preferable.

Remember Catalina has much stricter rules about installing third-party kexts. You may or may not be using the Logitech driver software. Check with them it is Catalina 'notarized'. Your camera probably works okay without their driver. Double-check.

:)
 
Thanks for the detailed reply.

Turned out to be an issue with USBInjectAll.kext as it whitelists specific Mac identifiers and had not been updated to include iMac19,2. I was able to add what I guessed as appropriate references and it worked as expected.

Why do you even need to patch? I thought the ASRock Z390M-ITX/ac has mostly USB 3.1 Gen 2 ports which shouldn't require anything custom, no? There are only 2 USB 3 Gen 1 ports on the motherboard -- the 2 on the internal header. 2 gen 1 ports, 2 USB 2 ports = 6 entries, not even close to the 15 port limit.
 
Why do you even need to patch? I thought the ASRock Z390M-ITX/ac has mostly USB 3.1 Gen 2 ports which shouldn't require anything custom, no? There are only 2 USB 3 Gen 1 ports on the motherboard -- the 2 on the internal header. 2 gen 1 ports, 2 USB 2 ports = 6 entries, not even close to the 15 port limit.

While that is true when the total number of implemented USB ports is less than 15, I think in this case there are actually more - according to the ASRock website -

Back-panel:

5x USB3.1 Gen 2. = 10
1x USB3.1 Gen 2 USB-C = 2
2x USB2.0 = 2

Internal:

2x USB3.1 Gen 1 on a single Header = 4
2x USB2.0 on a single header = 2

PLUS, although unverified, a USB2.0 port for built-in Bluetooth = 1

So the potential for 21x ports that need configuring.
 
Hi there.

Well done on doing all the necessay ground-work to get your ports working :thumbup:

From what you tell us and what we can see in the screengrab, you have moved USB 2.0 ports away from XHC and onto the EHC controllers. The motherboard USB 2.0 ports are on a "hub".

It's worth noting your motherboard features an add-on "piggy-back" USB controller by ASMedia, but your camera is not attached to one of those.

Okay, so then:

A "hub" port is not easy to configure - and this is one of the ones you have your camera plugged into.
For Catalina it may be better to use a direct port on the XHC controller where possible.
The ASMedia ports will work but not be configurable using normal techniques.

Here's what I would try:

Check your port-discovery to identify the ASMedia ports, there's 2x of them on the back panel. They will appear in a different part of the IOReg tree entirely. ASUS's web-site shows you have 6x USB3.1 ports (so 12x to configure) and 8x USB2.0 ports controlled by the Z97 chip. A total of 20x ports. No real need to use the ASMedia ones as you still need to 'lose" 5x to get down to 15.

Remove FakePCIID_XHCIMux.kext and see how that affects the output in IORegistryExplorer. This kext moves USB 2.0 ports away from the XHC controller and on to EHC to make more room for USB 3 ports. If instead you keep them all on XHC this is going to be more "natural" for Catalina. When you have both types of controller and are using a modern macOS, then XHC is preferable.

Remember Catalina has much stricter rules about installing third-party kexts. You may or may not be using the Logitech driver software. Check with them it is Catalina 'notarized'. Your camera probably works okay without their driver. Double-check.

:)
Thanks for your follow up. I have to apologize for two things: first duplicating my question in another thread and second, all the issues with the camera is in the following MB: GA-B75M-D3P, that's the one I need Automator to use the camera to take client photos. Anyway, that rig is working pretty good with the USB SSDT I made thanks to your guide; the camera-automator issue I think that has something to do with permissions and that kind of stuff. Automator is able to bring the camera video if I start PhotoBooth app while the automator video captures screen is active; then I get to capture the picture with automator. I plan to update that machine to 10.15.1 and see if that brings full automator-camera functionality. Any suggestion are welcome. I'll keep you posted how 10.15.1 update goes.
Anyway, back to my main rig: ASUS SABERTOOTH Z97 MARK 2/USB 3.1, the one that has 2 USB3 Asmedia ports. I am trying to create a USB SSDT for this machine but ran into some issues. I have a iMac 15,1 identifier, USBInjectAll.kext in Library/Extensions. I don't have any EHC rename in my config.plist, I don't think is needed for this MB; I actually tried it and lost all my usb ports, so no EHC rename in config.plist file. I also have Catalina version of usb limit removal patch, I'm on 10.15.
First issue: I am able to find all my Z97 usb ports under XCH section, but when I connect a Lexar USB3 flash drive into z97 USB3 ports on the back, I only find it at HS10, the same as a USB2 device, and never get the flash drive into a SSXX address; I guess I'm lacking USB3 function on those ports.
Screen Shot 2019-11-03 at 10.17.13.png

Second issue: When i try USB2 and USB3 flash drive at Asmedia USB3 ports I find them in the registry at:
RP07@1C,6/IOPP/PXSX@0/PXSX@00000000/AppleUSB30XHCIPort@00100000 - usb3 flash drive
RP07@1C,6/IOPP/PXSX@0/PXSX@00000000/AppleUSB20XHCIPort@00300000 - usb2 flash drive
Screen Shot 2019-11-03 at 10.21.29.png

Installed GenericUSBXHCI.kext to Library/Extensions to see if that would make any changes, but nop, I'm still finding Asmedia ports in the same place.
I don't have any real issues with this rig, but would really like to have the SSDT so I can forget removal patch in every update and all its consequences.
Thanks again for all your help.
 
Thanks for your follow up. I have to apologize for two things: first duplicating my question in another thread and second, all the issues with the camera is in the following MB: GA-B75M-D3P, that's the one I need Automator to use the camera to take client photos. Anyway, that rig is working pretty good with the USB SSDT I made thanks to your guide; the camera-automator issue I think that has something to do with permissions and that kind of stuff. Automator is able to bring the camera video if I start PhotoBooth app while the automator video captures screen is active; then I get to capture the picture with automator. I plan to update that machine to 10.15.1 and see if that brings full automator-camera functionality. Any suggestion are welcome. I'll keep you posted how 10.15.1 update goes.
Anyway, back to my main rig: ASUS SABERTOOTH Z97 MARK 2/USB 3.1, the one that has 2 USB3 Asmedia ports. I am trying to create a USB SSDT for this machine but ran into some issues. I have a iMac 15,1 identifier, USBInjectAll.kext in Library/Extensions. I don't have any EHC rename in my config.plist, I don't think is needed for this MB; I actually tried it and lost all my usb ports, so no EHC rename in config.plist file. I also have Catalina version of usb limit removal patch, I'm on 10.15.
First issue: I am able to find all my Z97 usb ports under XCH section, but when I connect a Lexar USB3 flash drive into z97 USB3 ports on the back, I only find it at HS10, the same as a USB2 device, and never get the flash drive into a SSXX address; I guess I'm lacking USB3 function on those ports.
View attachment 434273
Second issue: When i try USB2 and USB3 flash drive at Asmedia USB3 ports I find them in the registry at:
RP07@1C,6/IOPP/PXSX@0/PXSX@00000000/AppleUSB30XHCIPort@00100000 - usb3 flash drive
RP07@1C,6/IOPP/PXSX@0/PXSX@00000000/AppleUSB20XHCIPort@00300000 - usb2 flash drive
View attachment 434274
Installed GenericUSBXHCI.kext to Library/Extensions to see if that would make any changes, but nop, I'm still finding Asmedia ports in the same place.
I don't have any real issues with this rig, but would really like to have the SSDT so I can forget removal patch in every update and all its consequences.
Thanks again for all your help.

Okay, I'll start from the end and work backwards ...

It's unlikely GenericUSBXHCI.kext will work with Catalina. It was last updated in 2015 and I have yet to see anyone get it working with the latest macOSs. The RP** area of the IORegistryExplorer tree is where you would expect the ASMedia ports to be. They are not XHC and thus not a part of the SSDT/USBInjectAll process and not easily configurable. If they work, that's great, but don't use them as 'reliable' connections. They are unlikely to be properly power-managed.

Next ...

As you know, it's pretty easy to see which are the USB2.0-only ports on the back-panel, they are that column of black ports to the left. The other 4x blue ports are divided into 2x Intel ports and 2x Asmedia ports. The thing with the Z97 chipset is that it only features 6x USB3.0 ports. That's why your SS** ports only go as high as SS06. There is no SS10 equivalent of HS10 that your Lexar drive is plugged into.

You need to keep that port-discovery map you've made handy, so you can plan which port to use for which device.

Even nexter ...

There are 2x EHCI controllers macOS understands and works with - EH01 and EH02. To get these we usually rename any EHC1, EHC2, EUSB or USBE controllers present to match these two accepted names. Having the renames in place does no harm if the name to replace does not exist. It simply does the search, doesn't Find anything, and moves on.

As I mentioned previously, unless you have a specific need for USB2.0 ports there's no point in using the EHC controllers because your motherboard only has 6x USB3.0 ports you can configure. And Catalina will work best with XHC anyway.

Finally, if you are building your SSDT remember to double-check the DeviceID you are using is the XHC one - 8086_8cb1

:)
 
The thing with the Z97 chipset is that it only features 6x USB3.0 ports. That's why your SS** ports only go as high as SS06. There is no SS10 equivalent of HS10 that your Lexar drive is plugged into.
So that means I won't be able to get USB3 functionality out of the two blue Z97 USB ports on the back? HS10 is one of those blue USB3 ports. Thanks for your time.

Edit
I updated to 10.15.1, and sleep broke; hack will wake immediately after sleep. Sleep has been working fine long time ago, long before Mohave.
This seems like a USB issue. So I worked a little bit more on my SSDT. I was able to make the Z97 USB3 ports work, and named those ports SS09 and SS10 so they will match HS09 and HS10. I tried them with a USB3 kingston pen drive, and with a USB3 hub.
I also went back and renamed EHC1 and EHC2 to EH01 and EH02. During the discovery process, none of the usb drives showed at EH01 or EH02, so I just wrote "0" in the count property. I am not sure if that is the best way to go, if I don't put any EH01/EH02 configuration in SSDT file, ioreg keeps showing some ports there. Asmedia ports keep showing and working at RP07.
Captura de Pantalla 2019-11-03 a la(s) 23.03.30.png

Sleep is not working yet, I tried disabling Asmedia ports in BIOS, that didn't help the sleep issue. I am happy I finally got USB3 speed and functionality on Z97 ports, still working on fixing sleep at 10.15.1
Thanks again UtterDisbelief, for all your help and time.
 
Last edited:
While that is true when the total number of implemented USB ports is less than 15, I think in this case there are actually more - according to the ASRock website -

Back-panel:

5x USB3.1 Gen 2. = 10
1x USB3.1 Gen 2 USB-C = 2
2x USB2.0 = 2

Internal:

2x USB3.1 Gen 1 on a single Header = 4
2x USB2.0 on a single header = 2

PLUS, although unverified, a USB2.0 port for built-in Bluetooth = 1

So the potential for 21x ports that need configuring.

Assuming the Gen 2 ports are on a different controller, that shouldn't be a problem should it? I thought the 15 port limit was per controller, not for the entire motherboard.
 
Assuming the Gen 2 ports are on a different controller, that shouldn't be a problem should it? I thought the 15 port limit was per controller, not for the entire motherboard.

That depends on what exactly you mean. Of the main CPUs only the latest feature USB3.1 Gen 2 on the Intel controller. Most in circulation prior to the Z390 have Gen 1. So motherboard manufacturers used add-on, 3rd-party, chips to provide the Gen 2 ports.

To follow through with your argument, some older Intel chipsets feature an XHCI controller as well as two EHCI controllers. That would add up to 45 ports. So clearly that's not the case.

Apple only uses the Intel controller and no 3rd-party "piggy-back' controllers like ASMedia and Renesas. So the 15-port limit is for those Intel ports. However, there is driver support for add-on PCI-e USB cards that might, for example, fit in a Mac Pro. Those are 3rd-party controllers that need 3rd-party drivers (you might have seen mention of CalDigital, NEC, ASMedia, Renesas etc). They don't feature in the 15.
 
Hey, I’ve been reading some other posts about creating a usb.kext with Hackintool and removing the usb-uiac.aml

which method is the best?
 
Back
Top