Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

I'm working on the USB on my GA-H77N-WIFI | i3 3225 | HD 4000. I'm following your guide! Mixing methods has messed me up before.:crazy:

All my USB ports seem to be working, but I'm expect instability to creep back in over time. I can't get rid of all the extra USB2 ports that show up in IOReg. I've started from scratch a few times and get to the same end result. I've made the SSDT-USB.aml and the USB3 ports properly show up.. . but ALL the USB2 ports keep showing up in IOReg... not just the ones in the SSDT. I've attached the problem reporting files. I hope you can help me find where I've got it wrong. Thanks.
 

Attachments

  • debug_15582.zip
    2.7 MB · Views: 96
I'm working on the USB on my GA-H77N-WIFI | i3 3225 | HD 4000. I'm following your guide! Mixing methods has messed me up before.:crazy:

All my USB ports seem to be working, but I'm expect instability to creep back in over time. I can't get rid of all the extra USB2 ports that show up in IOReg. I've started from scratch a few times and get to the same end result. I've made the SSDT-USB.aml and the USB3 ports properly show up.. . but ALL the USB2 ports keep showing up in IOReg... not just the ones in the SSDT. I've attached the problem reporting files. I hope you can help me find where I've got it wrong. Thanks.

Okay.

Note: The Beginner's Guide does not cover how to configure both EHC and XHC controllers in the same build. For the latest macOs versions you should only need XHC unless it is not present on the motherboard.

You have covered three motherboards so far in this thread - ASUS Sabertooth X79, Gigabyte GA-H270 Gaming 3 and now a Gigabyte GA-H77N-Wifi. It's confusing. We have not seen an IORegEx for the latest, nor what is in its Drive: Library/Extensions folder.

I see in your latest SSDT-USB.aml you have configured both the XHC and EHC controllers, these are the 8086_1e26, 8086_1e2d & (XHC) 8086_1e31.

Back to basics:

Step 1) Remove any Hackintool configuration files for now (USBPorts.kext, and/or SSDTs).

Step 2) USBInjectAll.kext into EFI/CLOVER/kexts/Other

Step 3) If required edit a Port-lmit removal patch into config.plist (which one is dependant on the macOS version you are using. Not needed if your motherboard has less than 15 ports).

Step 4) Do NOT use FakePCIID_XHCIMux.kext. (Rebuild caches if you have removed any kexts).

Step 5) Do NOT have an EHC rename pair in your config.plist. Disable or remove.

Step 6) Remove the present SSDT-USB.aml but store safely elsewhere in case needed again.

Step 7) Reboot and check your IORegistryExplorer output for the XHC controller. Check if the EHC controller is present. You should see all available USB ports, hopefully 18 on XHC, maybe a couple extra.

To configure:

Step 1) Create an SSDT template with only the XHC device ID present (8086_1e31) but with all the ports you require.

Step 2) Compile to SSDT-USB.aml, place in CLOVER/ACPI/patched.

Step 3) Disable or Remove the port-limit removal patch but leave USBInjectAll.kext in place.

Step 4) Reboot and check IORegistryExplorer again.
 
Last edited:
We have not seen an IORegEx for the latest, nor what is in its Drive: Library/Extensions folder.
I ran gen_debug but I didn't check the previous debug.zip file... I didn't realize it was missing items. This newer one has everything.
Step 7) Reboot and check your IORegistryExplorer output for the XHC controller. Check if the EHC controller is present. You should see all available USB ports, hopefully 18 on XHC, maybe a couple extra.
XHC shows HSP1-4 and SSP1-4 (I need #3 & 4 of each). EHC1 shows 3 ports: PRT1,3 & 8, EHC2 shows 6 ports: PR11-15.
Step 1) Create an SSDT template with only the XHC device ID present (8086_1e31) but with all the ports you require.

Now I make an SSDT with only the XHC device ID (8086_1e31) even though the USB2 ports are under EHC1 (8086_1e26) & EHC2 (8086_1e2d)? Is that right? I am definitely confused. I really appreciate your help. Thank you.
 

Attachments

  • debug_13647.zip
    2.7 MB · Views: 112
I ran gen_debug but I didn't check the previous debug.zip file... I didn't realize it was missing items. This newer one has everything.

XHC shows HSP1-4 and SSP1-4 (I need #3 & 4 of each). EHC1 shows 3 ports: PRT1,3 & 8, EHC2 shows 6 ports: PR11-15.


Now I make an SSDT with only the XHC device ID (8086_1e31) even though the USB2 ports are under EHC1 (8086_1e26) & EHC2 (8086_1e2d)? Is that right? I am definitely confused. I really appreciate your help. Thank you.

Hi there.

Not all XHC controllers are the same. Like everything they have developed over time. Back in 2012 the H77 had an XHCI controller which featured only 4x USB3.0 ports. The included EHCI controller featured a useful 10x USB2.0 ports. So to give a motherboard a full compliment of ports, the manufacturer would use both controllers.

The reason I wanted you to try without EHCI was simply to clear away clutter and see what your configuration was. I don't think you've listed the kexts you have in your Drive: Library/Extension folder when I've asked. No problem; that's your choice - but I'm working in the dark and can't see the whole picture. I was just trying to work around that.

I don't think you've mentioned which version of macOS you are using either.

Your IORegEx USB port setup looks fine - 8x ports on the XHC and 2x ports on the EHCs :thumbup: So yes, put all three controllers in your SSDT template - EH01, EH02 & XHC - by using their Product/DeviceIDs.

You say -

... but I'm expect instability to creep back in over time...

- but that doesn't tell me anything about a specific problem you are experiencing, so I can't address it.

The H77 Mini-ITX motherboard only has 14x ports - 4x USB3 (double these) plus 6x USB2. So no need for the Port-Limit Removal Patch in this example.

The way to get all your USB ports working is to use USBInjectAll.kext to make them available and then create an SSDT to configure the 14x maximum ports you want to use. In this way the SSDT can be thought of as a configuration file for USBInjectAll. Other methods use other means, for example directly patching ACPI or using a codeless kext.

Perhaps if you could be precise about what the problem is you are having we can then address that :thumbup:.

Incidentally you do have a port-limit removal patch in place - it's not needed - and it is only for El Capitan.

:)
 
Last edited:
I don't think you've listed the kexts you have in your Drive: Library/Extension folder
Sorry, I thought the the L/E list was included in gen_debug files. Also I'm on El Capitan.

L/E: ACS6x.kext / AppleIntelE1000e.kext / ArcMSR.kext / AtherosE2200Ethernet.kext / ATTOCelerityFC8.kext / ATTOExpressSASHBA2.kext / ATTOExpressSASRAID2.kext / BJUSBLoad.kext / CalDigitHDProDrv.kext / CIJUSBLoad.kext / FakeSMC.kext / HighPointIOP.kext / HighPointRR.kext / PromiseSTEX.kext / realtekALC.kext / RealtekRTL8111.kext / SoftRAID.kext

One problem I've been trying to solve is that I always ended up with an IOReg showing more USB ports than I used (and more than 15). And my understanding is that this leads to instability.... intermittent USB connection problems - which I've had. I've attached the SSDT that seems to be working for me on the ga-h77n board. With this SSDT the IOReg shows just the USB ports that are actually being used without extras! I think the intermittent USB problems I've seen may be solved. Thanks for your help.
 

Attachments

  • SSDT-UIAC-ALL_mini_9-6.dsl
    4.1 KB · Views: 51
Sorry, I thought the the L/E list was included in gen_debug files. Also I'm on El Capitan.

L/E: ACS6x.kext / AppleIntelE1000e.kext / ArcMSR.kext / AtherosE2200Ethernet.kext / ATTOCelerityFC8.kext / ATTOExpressSASHBA2.kext / ATTOExpressSASRAID2.kext / BJUSBLoad.kext / CalDigitHDProDrv.kext / CIJUSBLoad.kext / FakeSMC.kext / HighPointIOP.kext / HighPointRR.kext / PromiseSTEX.kext / realtekALC.kext / RealtekRTL8111.kext / SoftRAID.kext

One problem I've been trying to solve is that I always ended up with an IOReg showing more USB ports than I used (and more than 15). And my understanding is that this leads to instability.... intermittent USB connection problems - which I've had. I've attached the SSDT that seems to be working for me on the ga-h77n board. With this SSDT the IOReg shows just the USB ports that are actually being used without extras! I think the intermittent USB problems I've seen may be solved. Thanks for your help.

Okay, thanks for the clarification. That helps.

Glad all is working okay now. Well done on your work :thumbup:

Notes:

1) you have only configured 2x of your 4x USB3.0 ports - I'm guessing they are the back-panel ones under the PS/2 socket.

2) the motherboard has 4x back-panel USB2.0 ports plus 2x internally for a total of 6x, so the extra 2x showing on your "Hub"s must be a mix of the EHC and XHC ports to get to those 8x ports. If that's the case then I would want to do-away with those Hubs as they just confuse things.

I'd do port discovery again. Remember to remove any SSDTs already in place. Although not strictly needed, I'd also use a port-limit removal patch for completeness sake. Then test all ports using a USB2.0 memory stick and again with a USB3.0 memory stick, and make my list from IORegistryExplorer.

Although it is possible Gigabyte might have partitioned controllers onto hubs with your motherboard I see no reason why as the numbers are low and it's the same chipset. But hey, you never know! o_O

Also I'd try the simpler SSDT template by @ammulder at the beginning of the guide rather than the all-encompassing one by @RehabMan.

:)
 
Last edited:
1) you have only configured 2x of your 4x USB3.0 ports - I'm guessing they are the back-panel ones under the PS/2 socket.
Correct! The other 2 internal USB3 ports are not being used.
 
In addition EHCI controllers need two extra kexts. Install them with KextBeast - FakePCIID.kext & FakePCIID_XHCIMux.kext . This is because as an older controller it needs help communicating with the latest macOS.
Immediately after I install these USB completely stops working on my system. I have installed the XHCI unsupported kext as well as the InjectAll kext already.

10.13.6 with an X99 board.
Any ideas?
 
Immediately after I install these USB completely stops working on my system. I have installed the XHCI unsupported kext as well as the InjectAll kext already.

10.13.6 with an X99 board.
Any ideas?

Hi there.

I see you have duplicated this query on @RehabMan 's thread.

Thank you for highlighting a problem a little above what can be expected from a "Beginner's Guide" - and @RehabMan is certainly the expert. I have amended the original guide here to clarify this :thumbup: .

To give you some pointers:

1) Have you created your own SSDT? Or are you just using the port-limit removal patch at present?

The X99 has both XHC and EHC controllers. The Product/Device IDs are:

EH01=8086_8d26, EH02=8086_8d2d & XHC=8086_8d31.

You can see these in About This Mac / System Report / USB.

FakePCDIID_XHCIMux.kext is a way to route USB2.0 ports away from the XHC stack, making room within the 15-port limit for more USB3 ports. This trick is used more often with later chipsets because their XHC controllers tend to have 10 or more SS** ports and they don't have a physical EHC controller. It is considered Legacy. Diverting some of the USB2 ports away from XHC can help protect that 15-port limit. As I say, @RehabMan 's thread covers this.

2) To summarise, in your case, unless absolutely necessary to activate ports, I would steer clear of FakePCIID_XHCIMux.kext. It can still be very useful though for certain chipsets, as is ...

3) In this guide we don't mention XHCI-unsupported.kext but you are correct to include it :thumbup: .

Check IORegistryExplorer to see what your changes have done.

Share your IORegistryExplorer output as IOREG so we can see what is going on. (If you are happy to do so. Not compulsory and your choice etc).

:)
 
Last edited:
IOReg attached! Thanks!

@UtterDisbelief I should mention on this board there are NO USB 2.0 only ports, besides the ones inside the mobo.

I'm following this guide because on my last build i followed the other one... it worked pretty well.... but every now and then I had catastrophic failures from what I thought were from USB. Also my computer would from time to time become extremely sluggish when using USB devices before finally crashing and resetting.

Now it's not working at all. :)

Another question: Do I have to map ports from devices that are mounted by thunderbolt? Or would these usb devices be mounted via PCI technically?

What about an attached HUB embedded in my monitor?

Thanks so much
 

Attachments

  • Rufus’s iMac Pro.ioreg
    18.6 MB · Views: 92
Back
Top