Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,897
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
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:
Joined
Oct 4, 2014
Messages
225
Motherboard
ASUS x99 E-WS
CPU
Intel E5-2630v3
Graphics
EVGA GTX 980 x2
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

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,897
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
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
Hi there.

Yes, that's right. All back-panel ports are USB3, however the internal USB2 ports are still there and show up in IOReg. :thumbup:

Your IOReg also shows us that you have the port-limit removal patch in place with 20x ports on the XHC tree. There is an EHC controller active too.

Your motherboard features just 4x X99 USB3 ports, the others are controlled by an ASMedia third-party chip. So only 4x of the USB3 back-panel ports might be working unless ...

There are several ways to approach your particular USB sub-system. Do you have GenericXHCIUSB.kext installed? That would activate the ASMedia ports. They would probably show up as PR/HP ports in IOReg.

So:

1) If you create an SSDT you will be able to configure each port and choose which will be within the 15 limit for XHC. You can then remove the port-limit removal patch.

2) You do not have to map the ASMedia ports, nor the Thunderbolt. They will not appear on the XHC section of the IOReg tree.

3) Similarly the hub in your monitor is not configurable and will not show on the XHC tree. Any USB motherboard port it is plugged into will be, if it is one of the X99 ports.

:)
 
Joined
Oct 4, 2014
Messages
225
Motherboard
ASUS x99 E-WS
CPU
Intel E5-2630v3
Graphics
EVGA GTX 980 x2
Your IOReg also shows us that you have the port-limit removal patch in place with 20x ports on the XHC tree. There is an EHC controller active too.

Your motherboard features just 4x X99 USB3 ports, the others are controlled by an ASMedia third-party chip. So only 4x of the USB3 back-panel ports might be working unless ...

There are several ways to approach your particular USB sub-system. Do you have GenericXHCIUSB.kext installed? That would activate the ASMedia ports. They would probably show up as PR/HP ports in IOReg.

So:

1) If you create an SSDT you will be able to configure each port and choose which will be within the 15 limit for XHC. You can then remove the port-limit removal patch.

2) You do not have to map the ASMedia ports, nor the Thunderbolt. They will not appear on the XHC section of the IOReg tree.

3) Similarly the hub in your monitor is not configurable and will not show on the XHC tree. Any USB motherboard port it is plugged into will be, if it is one of the X99 ports.
Okay so the ASMedia ports are showing up UNDER other ports and are labled "ASM107x". They're showing up under HS and SS.

Screen Shot 2019-09-10 at 9.37.30 AM.png
Screen Shot 2019-09-10 at 9.38.20 AM.png


This is my monitor (P232w):
Screen Shot 2019-09-10 at 9.40.35 AM.png


This is my thunderbolt (mercury is a HDD I have connected 2nd in a chain):
Screen Shot 2019-09-10 at 9.42.26 AM.png


Rufuss-iMac-Pro:~ rufusxavier$ kextstat | grep USB

15 0 0xffffff7f80a8b000 0x6000 0x6000 com.rehabman.driver.USBInjectAll (0.7.1) A5767EA0-3760-3131-B996-28EE85139CF5 <12 11 4 3>

24 10 0xffffff7f81482000 0x8000 0x8000 com.apple.driver.usb.AppleUSBCommon (1.0) E7111D99-B893-3F96-9741-71C88BC6F66B <5 4 3 1>

25 19 0xffffff7f8148a000 0x81000 0x81000 com.apple.iokit.IOUSBHostFamily (1.2) CE61D704-9BFF-308E-BC1C-56FF071DBB74 <24 23 7 6 5 4 3 1>

30 1 0xffffff7f82332000 0x35000 0x35000 com.apple.iokit.IOUSBMassStorageDriver (140.70.2) 91925DA5-1D2A-3444-A53B-1432B6363BA7 <28 25 19 6 5 4 3 1>

32 1 0xffffff7f838cf000 0x16000 0x16000 com.apple.driver.AppleUSBTDM (439.70.3) 1CE56483-ADE1-3C2B-ABF6-2F7BA1E3B14E <31 30 29 28 25 19 7 6 5 4 3 1>

61 5 0xffffff7f8150b000 0xad000 0xad000 com.apple.iokit.IOUSBFamily (900.4.1) 2837DD62-F2B0-3357-A164-D44FEF6810E0 <25 24 12 7 5 4 3 1>

62 0 0xffffff7f82547000 0x5000 0x5000 com.apple.driver.usb.AppleUSBHostPacketFilter (1.0) 4A6B061E-BBA5-3F4C-91C8-5069CBC5D3B2 <25 24 7 6 5 4 3 1>

71 1 0xffffff7f82387000 0x52000 0x52000 com.apple.driver.usb.AppleUSBXHCI (1.2) 7C64428D-A72C-351E-919A-0D40E625562E <25 24 11 7 6 5 4 3 1>

72 0 0xffffff7f823d9000 0x39000 0x39000 com.apple.driver.usb.AppleUSBXHCIPCI (1.2) 7570F212-6A40-31D3-825D-5F3123FD4EF2 <71 25 24 12 11 7 6 5 4 3 1>

79 1 0xffffff7f82467000 0x4a000 0x4a000 com.apple.driver.usb.AppleUSBEHCI (1.2) 56D31B71-BEFA-3ACD-9EA7-3BD1132BD770 <25 24 11 7 6 5 4 3 1>

80 0 0xffffff7f8255c000 0x12000 0x12000 com.apple.driver.usb.AppleUSBEHCIPCI (1.2) 053C3D7B-0BFF-3F46-82D8-11C987216CE4 <79 25 24 12 11 7 6 5 4 3 1>

98 0 0xffffff7f8250a000 0x3d000 0x3d000 com.apple.driver.usb.AppleUSBHub (1.2) 212690CE-F664-386F-915A-83BE8A20568F <25 24 11 5 4 3 1>

99 1 0xffffff7f82550000 0x8000 0x8000 com.apple.driver.usb.AppleUSBHostCompositeDevice (1.2) 83156A35-0541-3EE0-89AF-2D79952EE17A <25 24 6 5 4 3 1>

102 0 0xffffff7f8254c000 0x4000 0x4000 com.apple.driver.AppleUSBHostMergeProperties (1.2) D0D53B0A-CE40-3A08-9695-050DDFD705A7 <4 3 1>

103 2 0xffffff7f8164d000 0xa000 0xa000 com.apple.iokit.IOUSBHIDDriver (900.4.1) 8B9C3077-3531-35E3-8F86-24D23F4C10B7 <61 56 5 4 3 1>

107 0 0xffffff7f8237b000 0xc000 0xc000 com.apple.driver.usb.IOUSBHostHIDDevice (1.2) 12A13B71-F85D-3B02-9E3D-B541EC767461 <56 25 24 5 4 3 1>

108 0 0xffffff7f82a24000 0x4000 0x4000 com.apple.iokit.IOBluetoothUSBDFU (6.0.7f10) A326432D-F6A4-3A95-881A-EC474B488AC6 <61 4 3>

110 1 0xffffff7f82a4e000 0x20000 0x20000 com.apple.iokit.IOBluetoothHostControllerUSBTransport (6.0.7f10) A90B564F-12FF-339E-9797-E901C2C67B04 <109 104 25 12 11 7 6 5 4 3 1>

111 0 0xffffff7f82a6e000 0xc000 0xc000 com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport (6.0.7f10) 6D229D60-BBAE-3DAF-9E92-9B64237D1448 <110 109 104 25 12 11 7 6 5 4 3>

Rufuss-iMac-Pro:~ rufusxavier$
Don't see that kext, but I remember using it in my previous build. Pretty confused here. ?????
 

Attachments

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,897
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Okay so the ASMedia ports are showing up UNDER other ports and are labled "ASM107x". They're showing up under HS and SS.

View attachment 425372View attachment 425374

This is my monitor (P232w):
View attachment 425375

This is my thunderbolt (mercury is a HDD I have connected 2nd in a chain):
View attachment 425376



Don't see that kext, but I remember using it in my previous build. Pretty confused here. ?????
Okay...

So what have you done to the system since your IOReg upload in post #442 ?

Clearly this latest is not what is in there ...
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
2,897
Motherboard
Gigabyte Z370M D3H
CPU
i3-8350K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Okay, understood ... :thumbup: See edit below...

G1s.jpg


Edit: Spent some time with this because it was confusing. Two supposedly identical exports and yet one was 3MB bigger than the other...

USB points of note only - The EH02 controller is used in the earlier IOReg and not in the latest.

And the two different apparent attachments on the same ports - in two places.

Only way forward I can think of with what I know so far is to review which kexts you have installed and where. Particularly EFI/CLOVER/kexts/Other and Drive: Library/Extensions. I've not seen an X99 do this before.

As an aside, I wouldn't be using system-definition: iMacPro1,1 either. It doesn't really fit your hardware or sub-systems. Your choice of course :thumbup:

Interesting thread here - it's not ASUS-based, but Gigabyte. Still makes for interesting reading. The bespoke kext @jasperlevi uploaded is a codeless kext, so just an info.plist basically. Not saying it will work for you, but shows the inner workings of USB configuration quite well. It is similar to the Hackintool output.

:)
 
Last edited:
Joined
Oct 21, 2018
Messages
6
Motherboard
Gigabyte Z370M-DS3H
CPU
i5-8500
Graphics
HD 630/ Rx 580
Mobile Phone
iOS
Hey Guys! I tried everything and I can't manage to have my usb 3.0 ports working in Catalina and I don't understand why!!

Can someone see my EFI and give me some light?

I ve managed to have my built working flawlessly in Mojave with a costum SSDT, but since I updated do Catalina (fresh install) everything works great but not the usb. I have the USBinjectall.kext in L/E like always, I ve Disabled Gatekeeper and mounted the System partition in Read/Write mode, fixed the permissions and no luck.

Anyone? And thank you all for this great community!
 

Attachments

trs96

Moderator
Joined
Jul 31, 2012
Messages
14,801
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
iMac, Mac mini
Mobile Phone
Android
Hey Guys! I tried everything and I can't manage to have my usb 3.0 ports working in Catalina and I don't understand why!!
Apple may have changed something in the USB stack yet again. We'll have to research this. One of the reasons to wait until the .2 or .3 update when most of this will be worked out and documented.
 
Joined
Oct 21, 2018
Messages
6
Motherboard
Gigabyte Z370M-DS3H
CPU
i5-8500
Graphics
HD 630/ Rx 580
Mobile Phone
iOS
Apple may have changed something in the USB stack yet again. We'll have to research this. One of the reasons to wait until the .2 or .3 update when most of this will be worked out and documented.
Didn’t know that, sorry if it’s something that everyone knows by now. I thought that the costum ssdt would be something more “bulletproof “ :D. I guess I’ll have to wait. Thanks
 
Top