Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

Joined
May 25, 2012
Messages
17
Motherboard
Gigabyte GA-H97N-WIFI
CPU
i7-4770S
Graphics
RX 580
Hello, I'm struggling with USB port configuration. I'm on Catalina 10.15.4.

So far I've followed these steps:
- Via Hackintool, on L/E i've got : FakePCIID_XHCIMux.kext, FakePCIID.kext, USBInjectAll.kext
- On Clover Configurator I've added the limit patch:

1585519268053.png

- I added a boot argument "-uia_ignore_rmcf" (seen on Rehabsman guide)

Still, in both Hackintool and IOReg, looks like all my USB devices are under the EHCI controllers. XHCI seems not being used at all.

1585519505923.png
1585519530948.png
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,434
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Hello, I'm struggling with USB port configuration. I'm on Catalina 10.15.4.

So far I've followed these steps:
- Via Hackintool, on L/E i've got : FakePCIID_XHCIMux.kext, FakePCIID.kext, USBInjectAll.kext
- On Clover Configurator I've added the limit patch:
View attachment 458238
- I added a boot argument "-uia_ignore_rmcf" (seen on Rehabsman guide)

Still, in both Hackintool and IOReg, looks like all my USB devices are under the EHCI controllers. XHCI seems not being used at all.

View attachment 458241
View attachment 458242

Hi there.

Okay, I would suggest you remove FakePCIID_XHCIMux.kext, FakePCIID.kext and USBInjectAll.kext from L/E and rebuild your kext caches with the Terminal command:

Code:
sudo kextcache -i /
Once done put only USBInjectAll.kext in the EFI partition EFI/CLOVER/kexts/Other folder. If you need FakePCIID.kext for any other reason put it there also, otherwise don't bother. Do not re-install FakePCIID_XHCIMux.kext.

That should straighten up the XHCI controller.

The only reason to use the "-uia_ignore_rmcf" boot-command with USBInjectAll.kext is if you want to disable an already installed SSDT-UIAC.aml patch.

Come back to us once those steps have been taken :thumbup:
 
Joined
May 25, 2012
Messages
17
Motherboard
Gigabyte GA-H97N-WIFI
CPU
i7-4770S
Graphics
RX 580
Hi there.

Okay, I would suggest you remove FakePCIID_XHCIMux.kext, FakePCIID.kext and USBInjectAll.kext from L/E and rebuild your kext caches with the Terminal command:

Code:
sudo kextcache -i /
Once done put only USBInjectAll.kext in the EFI partition EFI/CLOVER/kexts/Other folder. If you need FakePCIID.kext for any other reason put it there also, otherwise don't bother. Do not re-install FakePCIID_XHCIMux.kext.

That should straighten up the XHCI controller.

The only reason to use the "-uia_ignore_rmcf" boot-command with USBInjectAll.kext is if you want to disable an already installed SSDT-UIAC.aml patch.

Come back to us once those steps have been taken :thumbup:
Yeah, now we're talking!

1585521984260.png

Just few questions left:

- My USB 3.0 Western Digital HD (My Book 1230) is on a USB3 port, but looks like is still on USB 2.0 bandwith cap. Proceeding with mapping SSDT, should I be able to "unlock" the full USB 3.0 speed?
Reboot and plug it in again worked, now is correctly seen as 5Gbps! Tomorrow I'll test all the ports.

- Why bother with FakePCIID.kext and FakePCIID_XHCIMux.kext at all? What's the advantage to move all the USB 2.0 control to EHCI if XHCI is capable of handling it? Is the 15 USB port cap determined by EHCI+XHCI ports?
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,434
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Yeah, now we're talking!

View attachment 458245

Just few questions left:

- My USB 3.0 Western Digital HD (My Book 1230) is on a USB3 port, but looks like is still on USB 2.0 bandwith cap. Proceeding with mapping SSDT, should I be able to "unlock" the full USB 3.0 speed?
Reboot and plug it in again worked, now is correctly seen as 5Gbps! Tomorrow I'll test all the ports.

- Why bother with FakePCIID.kext and FakePCIID_XHCIMux.kext at all? What's the advantage to move all the USB 2.0 control to EHCI if XHCI is capable of handling it? Is the 15 USB port cap determined by EHCI+XHCI ports?

Good news! :thumbup:

Well FakePCIID.kext allows usually non-recognised devices to appear in the configuration profile. It has a plug-in system and the FakePCIID_XHCIMux.kext is one of them. I agree, it isn't needed these days with modern desktop chipsets. Good question about the 15-port limit. Some will argue that 2x ECHI and 1x XHCI controllers means a possible 45-ports is permissable. I disagree and don't believe Apple thought of it that way. Their pro machines were the only expandable ones with PCI-e slots where external controllers could add as many extra ports as required.

:)
 
Joined
May 25, 2012
Messages
17
Motherboard
Gigabyte GA-H97N-WIFI
CPU
i7-4770S
Graphics
RX 580
@UtterDisbelief Looks like all USB ports work good, but I've completely lost the bluetooth Broadcom card: it's not even recognised by the System Information at all now.

BrcmPatchRAM3.kext, BrcmFirmwareRepo.kext, BrcmBluetoothInjector.kext and AirportBrcmFixup.kext are installed under L/E, right now only Wi-Fi works. Something happened when all my ports switched to XHCI controller.
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,434
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
@UtterDisbelief Looks like all USB ports work good, but I've completely lost the bluetooth Broadcom card: it's not even recognised by the System Information at all now.

BrcmPatchRAM3.kext, BrcmFirmwareRepo.kext, BrcmBluetoothInjector.kext and AirportBrcmFixup.kext are installed under L/E, right now only Wi-Fi works. Something happened when all my ports switched to XHCI controller.

Hmmm,

Well looking at your Hackintool screengrab above, Bluetooth is alive and kicking on USB port HS11.

Which Broadcom wireless card are you using and how is it connected? In a PCI-e adapter? The reason I ask because depending on the model you have, you may not need all those Brcm* patches.

:)
 
Joined
May 25, 2012
Messages
17
Motherboard
Gigabyte GA-H97N-WIFI
CPU
i7-4770S
Graphics
RX 580
Hmmm,

Well looking at your Hackintool screengrab above, Bluetooth is alive and kicking on USB port HS11.

Which Broadcom wireless card are you using and how is it connected? In a PCI-e adapter? The reason I ask because depending on the model you have, you may not need all those Brcm* patches.

:)
I've got a Broadcom BCM94352HMB (Mini PCIe).

When I made the screen grab you're referencing, XHCI was active but USB 3.0 being kept at low-speed. After reboot I totally lost the bluetooth card.

1585607836120.png
 
Joined
Apr 10, 2012
Messages
11
Motherboard
Gigabyte GA-Z68X-UD3H-B3 - U11 - clover UEFI
CPU
I5-2500K 3.30ghz
Graphics
RX 560
Mac
iMac, MacBook Pro
Mobile Phone
iOS
Yes, that's great. Thanks :thumbup:

Where you put the necessary kexts depends on which version of macOS you are using.

You don't need FakePCIID_XHCIMux.kext. That particular kext moves Intel USB2 ports off an XHCI controller. As you don't have Intel USB3/XHCI that will only confuse the set-up. Try removing it, rebuilding your kext-caches with Terminal command:

sudo kextcache -i /

... and reboot. Check IORegistryExplorer again :thumbup:

Yes, those renames are correct.

:)
UtterDisbelief i think i managed to get all the usb ports injected however most of them are labeled HP and LP not HS. Cant these simply be renamed in hackintool? see screenshots of ioreg and hackintool.
 

Attachments

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,434
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
UtterDisbelief i think i managed to get all the usb ports injected however most of them are labeled HP and LP not HS. Cant these simply be renamed in hackintool? see screenshots of ioreg and hackintool.
Hi there.

A bit of background may help (sorry if you know all this) ...

Well the way it usually works is that EHCI controllers come in pairs - USBE and EUSB, or EHC1 and EHC2. We rename them to something macOS understands - EH01 and EH02.

Form here things can vary but generally a hub is attached to each controller - PR11 on EH01 and PR21 on EH02. On each of PR11 and PR21 there are HP** ports. Usually 8x on one and 6x on the other. These numbers depend on the chipset being used.

In your case because you don't have a native Intel USB3/XHCI controller, the motherboard manufacturer has added a third-party one - Etron - to give you this functionality. Because these are not a part of the Intel set they are attached elsewhere on the PCI device tree, usually PX** (RP in the case of XHC). They don't count in the 15-port limit.

So no, you can't do much renaming except the initial controller type. Well you can with ACPI patching but there is really no need and it is unlikely to help.

Hope that helps.

:)
 
Joined
Apr 10, 2012
Messages
11
Motherboard
Gigabyte GA-Z68X-UD3H-B3 - U11 - clover UEFI
CPU
I5-2500K 3.30ghz
Graphics
RX 560
Mac
iMac, MacBook Pro
Mobile Phone
iOS
Hi there.

A bit of background may help (sorry if you know all this) ...

Well the way it usually works is that EHCI controllers come in pairs - USBE and EUSB, or EHC1 and EHC2. We rename them to something macOS understands - EH01 and EH02.

Form here things can vary but generally a hub is attached to each controller - PR11 on EH01 and PR21 on EH02. On each of PR11 and PR21 there are HP** ports. Usually 8x on one and 6x on the other. These numbers depend on the chipset being used.

In your case because you don't have a native Intel USB3/XHCI controller, the motherboard manufacturer has added a third-party one - Etron - to give you this functionality. Because these are not a part of the Intel set they are attached elsewhere on the PCI device tree, usually PX** (RP in the case of XHC). They don't count in the 15-port limit.

So no, you can't do much renaming except the initial controller type. Well you can with ACPI patching but there is really no need and it is unlikely to help.

Hope that helps.

:)
no worries thank you for explanation. so i am ok to discover ports no matter what they are called and remove everything else?
 
Top