Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

Joined
Sep 30, 2010
Messages
50
Motherboard
Gigabyte GA-Z97X-Gaming 5
CPU
Intel 4970K
Graphics
EVGA GTX 970
Hi there.

I had a quick look though your SSDT.

What I saw is an odd set of port addresses.
Yes, the port numbers were a total mess. IOReg was essentially impossible to use. If it ever did highlight which port I had plugged something into (which was rare), then it would take about two minutes of SBOD between refreshes. I eventually found another port discovery tool/script elsewhere that enabled me get everything working (but using a kext map instead of building a SSDT). All is good now.

Thanks for taking the time to respond.
 
Joined
Oct 10, 2015
Messages
6
Thanks so much for this, it was incredibly easy to follow and your explanations were helpful as well. I had created my own SSDT earlier but it seems that when I updated to 10.14.4 the patch doesn't seem to get picked up. I recreated an SSDT using your tutorial but its still not hiding the unused ports as expected (and removing the port limit patches doesn't seem to fix it). Any ideas what I'm doing wrong (e.g. HS01 should be removed but its still there)? Files and screenshots attached.
 

Attachments

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,038
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Thanks so much for this, it was incredibly easy to follow and your explanations were helpful as well. I had created my own SSDT earlier but it seems that when I updated to 10.14.4 the patch doesn't seem to get picked up. I recreated an SSDT using your tutorial but its still not hiding the unused ports as expected (and removing the port limit patches doesn't seem to fix it). Any ideas what I'm doing wrong (e.g. HS01 should be removed but its still there)? Files and screenshots attached.
Hello there.

Thank you for the feedback - much appreciated.

First things first - please update your hardware profile as per the Site Rules. :thumbup: Without knowing the hardware involved the problem could be caused by quite a few different things and will be difficult for folk to pinpoint.

Suggestions so far:

1) For 10.14.4 double-check your config.plist and the three port-limit removal patches for typos.

2) Your SSDT from the previous build will work fine with the Mojave update. The port-limit patch is not a part of it. So if that was working ok, use it again to verify the new, bigger, 3-line port-limit patch is working. Remember you only need to create an SSDT once per motherboard.

Finally, so we can all see the screenshots post them as separate images here using the "Attach files" button, bottom left. Then post the config.plist and SSDT*.dsl template as separate files for smaller downloads. :thumbup:
 
Joined
Oct 10, 2015
Messages
6
Thanks for the suggestions - added my hardware info to the signature.

It seems that the port-limit patches are working because when I enable the three of them, IORegExplorer shows more than 15 XHCI devices. However I'm having issues with USB devices not being recognized properly (which was an old issue that got fixed with the SSDT). I'm suspecting my SSDT isn't being loaded because the ports that are supposed to be excluded are still showing up. Using the old or new SSDT doesn't seem to make a difference.

Maybe I have another flag in the config somewhere that's preventing the SSDT from loading?
 

Attachments

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,038
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Thanks for the suggestions - added my hardware info to the signature.

It seems that the port-limit patches are working because when I enable the three of them, IORegExplorer shows more than 15 XHCI devices. However I'm having issues with USB devices not being recognized properly (which was an old issue that got fixed with the SSDT). I'm suspecting my SSDT isn't being loaded because the ports that are supposed to be excluded are still showing up. Using the old or new SSDT doesn't seem to make a difference.

Maybe I have another flag in the config somewhere that's preventing the SSDT from loading?
Okay.

The last time I had a Z270 it was the Gigabyte GA-Z270-Gaming K3 - which is a very similar board. I've just dug out my old EFI to see what I had in there to configure it.

My differences then:

Config.plist

1) No EHCI controller patches in the Acpi section.


EFI/CLOVER/kexts/Other

1) No FakePCIID_XHCMux.kext - this is used alongside EHCI controller usage for USB2 ports (see config.plist).

2) No XHCI-200-series-injector.kext - this was for earlier macOS versions that had no XHCI support for Z270 chipsets. It is an injector that loads the 100-series driver.

Notes:

Changing/removing any of the above will give you some idea if they are affecting your build but there's no guarantee they'll fix anything.

Remember you have an ASMedia chipset feeding the USB3.1 Gen 2 ports.

I notice there are no "USR** USB ports tagged on the end of your IOReg list to get to the 26-ports usually seen. You could try GenericUSBXHCI.kext but it hasn't been updated recently and might have no effect.

:)

(P.S - Signature = great; Profile = still blank).
 
Joined
Apr 15, 2019
Messages
5
Motherboard
Lenvo Thinkpad T450s
CPU
i7-5600U
Graphics
HD 5500 & GeForce 940M
Mobile Phone
Android, iOS
It is a so good tutorial to follow and I finally succeeded on my Lenovo Thinkstation P910.
But still I have a problem that the USB driver mounted to the computer was read-only, then how can I change this to a writalbe one?
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,038
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
It is a so good tutorial to follow and I finally succeeded on my Lenovo Thinkstation P910.
But still I have a problem that the USB driver mounted to the computer was read-only, then how can I change this to a writalbe one?
I am not sure what your USB read-only problem is. As the USB configuration does not touch read/write capability it is perhaps worth noting that it is possible to change the attributes of a file or folder using good-old Terminal commands.

For example check this link: https://discussions.apple.com/thread/1711337
 
Joined
Oct 19, 2011
Messages
51
Motherboard
Asus X99 Deluxe
CPU
i7-5930K
Graphics
2x R9 280X
Mac
MacBook Pro
Classic Mac
128K, 512K, Centris, iBook, LC, Performa, Plus, PowerBook
Mobile Phone
iOS
First, a huge thanks to @UtterDisbelief and everyone else who worked on this guide. I followed the instructions and it works like a charm!

I have an Asus X99 Deluxe which has ten Asmedia USB3 ports on the rear panel. I tested and mapped them as part of the exercise, but commented them out of my SSDT, since they have a different vendor id. Is there a way to use them? Would a secondary SSDT work? Don't want to get greedy as I'm in a good place now but am curious.

Thanks again!
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,038
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
First, a huge thanks to @UtterDisbelief and everyone else who worked on this guide. I followed the instructions and it works like a charm!

I have an Asus X99 Deluxe which has ten Asmedia USB3 ports on the rear panel. I tested and mapped them as part of the exercise, but commented them out of my SSDT, since they have a different vendor id. Is there a way to use them? Would a secondary SSDT work? Don't want to get greedy as I'm in a good place now but am curious.

Thanks again!
Glad the guide worked for you. Thanks for the feedback :thumbup:

Because ASMedia controllers are not activated by USBInjectAll they are not included in the Beginner's Guide. However there are a couple of things you can try if you want to go beyond it ...

1) Install the GenericUSBXHCI.kext. You may have already. This is for 3rd Party chipsets. It hasn't been updated since 2015 but might be okay for your motherboard. Once installed check where on the IOReg tree the extra ports are located.

Some builders choose to ignore the 15-port limit Apple imposes, and leave the PLR patch in place, especially when there are a tempting 10 extra ports to play with! The good news is, if the extra ports do not appear in the XHC section of the IOReg tree, and instead are labelled as RP** or similar, they should work ok. (Power management might be off though).

2) As an alternative, try the Hackintool utility. First put the port-limit removal patch back and remove your new SSDT (temporarily - keep that hard work safe!). In the USB section of Hackintool, at the top, it will list the controllers it can see. Check for the DeviceIDs of your ASMedia chipset. You could then use Hackintool to create a USBPorts.kext and 2x *.aml files. (bottom row of icons, right-most). Be aware though that having more than one USB SSDT (yours and Hackintool's) will confuse the system and isn't recommended as they are actually patches.

:)
 
Joined
Oct 19, 2011
Messages
51
Motherboard
Asus X99 Deluxe
CPU
i7-5930K
Graphics
2x R9 280X
Mac
MacBook Pro
Classic Mac
128K, 512K, Centris, iBook, LC, Performa, Plus, PowerBook
Mobile Phone
iOS
@UtterDisbelief So everything looked good for one or two restarts but then it wasn't. I've redone mySSDT.

I started with this:

400763


In my SSDT, I omitted HS05, HS07-10, SSP5 & SSP6. I added the new SSDT to the Patched folder, kept USBInjectAll.kext & XHCI-x99-injector.kext. Leading to this:

400764


The ports that I thought I had disabled are still there. So I disabled PLP which got me here:
400766

The Asmedia ports when you expand them look like sub-hubs, as in the first screenshot. Four of them get kicked over to RP. I'm guessing that these four are the ones that turn up in RP on the AppleUSBXHCIPCI bus.

400767


I have a patch in my config file, renaming XHCI to XHC_. Do I also need one to rename SSP_ to SS__? On my MBP, I'm seeing XHC1 and SSP1, so am not convinced it should matter.

Any thoughts? Right now, just want to get rid of the Asmedia ports. FWIW, disabling them (and the Asmedia USB3 controller) in BIOS hasn't consistently worked in the past.
 

Attachments

Top