Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Oct 17, 2013
Messages
288
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
RX 580
Mac
  1. iMac
Mobile Phone
  1. Android
Hi again @RehabMan, I was able at last to use properly install tools. Here is my zip. My issue is that I cannot make ioregistryexplorer to show all HS and SS ports. I get only 15 ports total which 11 are HS and 4 SS ports. I tried different patches but no luck. Can you help me please?

Update: I finally made to discover all ports but when I put SSDT-UIAC.aml to ACPI->patched folder, system is restarting while booting. What am I doing wrong? Also do I need "change _OSI to XOSI" (SSDT-XOSI.aml included) and "change EC0 to EC"? I can't find any information about those patches.

Update 2: Finally I made it and everything working as it should be and in the correct speeds! Last 4 days I was reading all day to finally make it work! The trick was to exclude every HS/SS port I wasn't using in my SSDT with the argument "uia_exclude=" in clover boot mode. I have seen many people to just throw their ssdt in the patched folder and works oob.
 

Attachments

  • debug_27190.zip
    3.3 MB · Views: 51
  • MAXIMUS XI HERO_IO.png
    MAXIMUS XI HERO_IO.png
    3.6 MB · Views: 65
  • SSDT-UIAC.aml
    696 bytes · Views: 78
Last edited:
Joined
Jan 3, 2019
Messages
1
Motherboard
Gigabyte Z370 HD3P
CPU
i7-8700k
Graphics
Gigabyte RX 580
Hi,

just registered here to say thank you for this thread. It is amazing that people share their knowledge and I absolutely appreciate it.

I am running a Vanilla Mojave Hackintosh and fixing the USB ports was one of the last things which needed to get fixed.
Thank you @RehabMan !
 
Joined
Feb 4, 2017
Messages
3
Motherboard
GA B360M D3H | Z170N
CPU
i5 8400 | i5 6600K
Graphics
UHD 630 | RX 480 8GB
Mac
  1. MacBook Pro
  2. Mac mini
Just wanted to pass along, what I believe is a successful implementation of this guide. I've been analyzing the thread for a few months prior to my recent build.

Updated USB Port Mapping
  • Originally tried this guide - https://www.tonymacx86.com/threads/254559/
    • To be honest, didn't really know what I was doing
    • If you check the thread, I was having multiple issues
    • Eventually scrapped it
  • Followed this guide - https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
    • Not as painful as you think - start to finish about 3 hours
    • Requirements, I added EHC1, EHC2 and 2 versions of XHCI renames (had to search for these) to Clover
    • Ensure you put USBInjectAll.kext into S/L/E --> didn't do this at first
    • Added XHCI-unsupported kext into S/L/E
    • Syntax is really important when performing the -uia excludes and includes
      • -uia_exclude_hs uia_include=HS04
      • -uia_exclude_ss uia_exclude=USR1,USR2
    • Plugged in the various USB2 and USB3 devices (see ioreg screen shots)
    • XHC Device ID = <6d a3 00 00
    • Created SSDT-UIAC.aml and put in EFI/Clover/ACPI/patched (see attached file)
    • Restarted and checked all of my USB ports in System Information and all ports are functioning as designed
    • Due to the 15 port limit, I did not load HS07,08 USB2 so I could get USB3 values for SS07,08
    • On this last bullet, I've created a few different versions of the SSDT-UIAC. I'm attaching v3 which removes HS07 and HS08
Clover/acpi/dsdt/patches
full


-uia_exclude_ss uia_exclude=USR1,USR2
full


-uia_exclude_hs uia_include=HS04
full


All USB2 shown as 480 Mb/sec and USB3 at 5 Gb/sec in System Information
full

  • Top of case = USB2 and USB3
  • Back Top (a ports) = USB2, can recognize USB3 devices at 480 Mb/sec
  • Back Middle Blue (e ports) = USB3 only, turned off HS07 and HS08
  • Back Lower Blue (e ports) = USB2 and USB3
  • Middle Red, right (g port) = USB2 and USB3
  • Middle Red, left (h port) = not tested yet
List of all ports based on USB2|USB3 discovery
  • HS01 - middle red, right, usb2, usb3
  • HS02
  • HS03 - top case, right, usb2
  • HS04 - top case, left, usb2 (kb/mouse)
  • HS05 - back, lower blue, left, usb2
  • HS06 - back, lower blue, right, usb2
  • HS07 - back, middle blue, left, usb2
  • HS08 - back, middle blue, right, usb2
  • HS09 - back, top, right, usb2, usb3 (480 Mb/sec)
  • HS10 - back, top, left, usb2, usb3 (480 Mb/sec)
  • HS11
  • HS12 - internal, Bluetooth hub
  • HS13
  • HS14
  • USR1
  • SS01 - middle red, right, USB3
  • SS02 -
  • SS03 - top case, right, USB3
  • SS04 - top case, left, USB3
  • SS05 - back, lower blue, left, USB3
  • SS06 - back, lower blue, right, USB3
  • SS07 - back, middle blue, left, USB3
  • SS08 - back, middle blue, right, USB3
  • USR1 -
  • USR2 -
I'm marking USB as working!

How long did it take for you to compile your aml files? This is the first time I'm doing this and I am unsure how long this should take.

Thanks,

zhutson24
 
Joined
Dec 29, 2018
Messages
5
Motherboard
ASRock Z370M-ITX/ac P3.20 - Clover UEFI
CPU
i5-9600K
Graphics
Intel UHD 630, Zotac GTX 1080ti mini
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hi, have a question about FakePCIID_XHCIMux.

My motherboard is ASUS ROG STRIX H370-I with IOName pci8086,a36d of XHC.
In total, I have 11 HS + 7 SS ports (+2 for Type C which now is not working, I will fix it in future). To overcome the port limit (route USB2.0 to another device) it's better to use FakePCIID_XHCIMux. But Info.plist of FakePCIID_XHCIMux doesn't have information about my controller.

According to documentation, it's possible to add support for new chipset.
Configuration properties and their defaults: RM,pr2-force <00 00 00 00>. By default forces all XHCI ports to route USB2 devices to EHC1.
RM,pr2-init <01>. Will write RM,pr2-force value at startup if non-zero.
RM,pr2-block <01>. Will block writes to XUSB2PR if non-zero.
RM,pr2m-block <01>. No evidence that OS X drivers attempt to write XUSB2PRM (offset 0xD4), but since this kext relies on a valid value here (as provided by the BIOS), writes to it are blocked if non-zero.
RM,pr2-honor-pr2m <01>: Changes to XUSB2PR will be masked by XUSB2PRM if this is non-zero.
RM,pr2-chipset-mask: Writes to XUSB2PR are masked by this value. This is defined by the chipset documentation. Default value depends on chipset.

Where I can get those values? Found chipset datasheet https://www.intel.com/content/dam/w...ts/300-series-chipset-pch-datasheet-vol-1.pdf, but have no idea what I should look for.

Edit: I have rechecked documentation. My question is incorrect. 300 chipset doesn't have Port Routing Register, so such patching is impossible.
 
Last edited:
Joined
Nov 29, 2011
Messages
116
Motherboard
Gigabyte H370M-D3H-Clover
CPU
i3-8350K
Graphics
RX 570, 1920x1080
Mobile Phone
  1. iOS
How long did it take for you to compile your aml files? This is the first time I'm doing this and I am unsure how long this should take.

Thanks,

zhutson24

To start from step 1 to finish and deployed aml, about 3 hours. I had never tried it before and so there was some trial and error to get the sequencing correct. But once you have working files, it was relatively easy to update. Actually "compiling" the aml is near real time <-- not sure if that is what you are asking.
 
Joined
Dec 30, 2018
Messages
1
Motherboard
Z87 Sabertooth
CPU
Intel Core-i5 4690K
Graphics
GeForce GTX 1080 FE
GOD this is such an amazing guide. I couldn't get my usb ports to work correctly for the life of me until I found this. THANK YOU!!!
 
Joined
Jun 7, 2011
Messages
15
Motherboard
Asus Maximus XI Hero z390
CPU
i7 9700K
Graphics
RX 580
Mobile Phone
  1. Android
  2. iOS
Hi again @RehabMan, I was able at last to use properly install tools. Here is my zip. My issue is that I cannot make ioregistryexplorer to show all HS and SS ports. I get only 15 ports total which 11 are HS and 4 SS ports. I tried different patches but no luck. Can you help me please?

Update: I finally made to discover all ports but when I put SSDT-UIAC.aml to ACPI->patched folder, system is restarting while booting. What am I doing wrong? Also do I need "change _OSI to XOSI" (SSDT-XOSI.aml included) and "change EC0 to EC"? I can't find any information about those patches.

Update 2: Finally I made it and everything working as it should be and in the correct speeds! Last 4 days I was reading all day to finally make it work! The trick was to exclude every HS/SS port I wasn't using in my SSDT with the argument "uia_exclude=" in clover boot mode. I have seen many people to just throw their ssdt in the patched folder and works oob.


How did you do this I have the same board as you and I am stuck at it not showing all the ports when I exclude them can't get any usb2 ports to work or any usb 3 ports at full speed. Please for the love of god help. I am not even close.

I installed the usbinjectall to s/l/e
I installed the xcci unsupported kext to s/l/e
I have I have changed ehc1 to eh01
I have changed ehc2 to eh02
I have booted with excluding ss ports and have booted excluding hs ports separate.
I am not getting all the hs ports to show.
 
Joined
Oct 17, 2013
Messages
288
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
RX 580
Mac
  1. iMac
Mobile Phone
  1. Android
How did you do this I have the same board as you and I am stuck at it not showing all the ports when I exclude them can't get any usb2 ports to work or any usb 3 ports at full speed. Please for the love of god help. I am not even close.

I installed the usbinjectall to s/l/e
I installed the xcci unsupported kext to s/l/e
I have I have changed ehc1 to eh01
I have changed ehc2 to eh02
I have booted with excluding ss ports and have booted excluding hs ports separate.
I am not getting all the hs ports to show.

Hi thackstonns, it was pretty difficult to me also. I was getting no matter what only 14 HS ports and 1 USR port (photo attached). I then copied usbinjectall.kext and xhciunsupported.kext to kexts/other. Then I used the argument
  • -uia_exclude_hs uia_include=HS**;HS** (HS** use the ports where the mouse and keyboard is connected so you can use them while you are discovering SS ports with this argument). After you have discovered HS and SS ports you have to select the ones you want to use until 15 ports max limit. Beware that a port which is usb3 is also usb2, so if you include for example only SS** for this usb port then it will work with only usb3 devices. In my case I knew what device goes to what port so in my setup a few usb3 ports work only with usb3 devices and some other usb3 ports which connect to monitor hubs work with both usb2 (HS) and usb3 (SS). Im attaching my SSDT so you can check how I built it. After you have created SSDT you have to use the argument for every port you are not using so ioreg shows only the ones that are based on your SSDT. In my case the argument in clover configurator is this:

  • uia_exclude=HS02;HS05;HS06;HS07;HS08;HS14;USR1;SS01;SS02;SS06;USR2;
My SSDT configuration:

HS01@14100000 - Internal USB - AURA MOTHERBOARD 1. USB2.0

HS03@14300000 - USB3.1 Gen2 Bottom Right - DELL U2417H HUB 2. USB2.0/USB3.1

HS04@14400000 - USB3.1 Gen2 Bottom Left - Dell U2413 HUB 3. USB2.0/USB3.1

HS09@14900000 - USB3.0 Front Right - Tower front panel 4. USB2.0/USB3.1

HS10@14a00000 - USB3.0 Front Left - Tower front panel 5. USB2.0/USB3.1

HS11@14b00000 - USB2.0 Back Right - Microsoft Mouse 6. USB2.0

HS12@14c00000 - USB2.0 Back Left - Microsoft Keyboard 7. USB2.0

HS13@14d00000 - Internal USB/USB2.0 Front Left/Right - NZXT Kraken 8. USB2.0

SS03@14600000 - USB3.1 Gen2 Bottom Right - DELL U2417H HUB 9. USB2.0/USB3.1

SS04@14700000 - USB3.1 Gen2 Bottom Left - Dell U2413 HUB 10. USB2.0/USB3.1

SS05@14800000 - USB3.1 Gen2 Top Right - Free USB port 11. USB3.1

SS07@14a00000 - USB3.1 Gen1 Bottom Right - External Hard Drive 12. USB3.1

SS08@14b00000 - USB3.1 Gen1 Bottom Left - Card Reader 13. USB3.1

SS09@14c00000 - USB3.0 Front Right - Tower front panel 14. USB2.0/USB3.1

SS10@14d00000 - USB3.0 Front Left - Tower front panel 15. USB2.0/USB3.1


P.S. Doublecheck the PCI Device ID you are using in your SSDT (photo attached). It must be the same as mine. USB3.1 Gen2 Type-C port is off cause I don't have any type-c device to test it.
 

Attachments

  • ioregistry XHCI.png
    ioregistry XHCI.png
    233.3 KB · Views: 90
  • MAXIMUS XI HERO_IO.png
    MAXIMUS XI HERO_IO.png
    3.6 MB · Views: 109
  • SSDT-UIAC.aml
    695 bytes · Views: 101
  • Screenshot 2019-01-07 at 15.38.11.png
    Screenshot 2019-01-07 at 15.38.11.png
    23.9 KB · Views: 76
Last edited:
Joined
Jul 3, 2013
Messages
36
Motherboard
Gigabyte GA-Z87X-UD3H
CPU
i7-4770
Graphics
RX 580
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hi I was able to follow this guid until I hit a roadblock

I was able to test HS port, mine is USB3s are HS09 and HS10, USB2s are HS11 and HS14. I added -uia_exclude_hs uia_include=HS11 since HS11 is where my BlueTooth are connected.

Screen Shot 2019-01-08 at 12.45.17 AM.png


Upon restart. Even if I plug and unplug USB 3 devices on USB 3 ports. SSxx ports won't recognize the devices.

Screen Shot 2019-01-08 at 12.54.21 AM.png


Here are ktext installed in my EFI...ktext/Others

Screen Shot 2019-01-08 at 12.51.09 AM.png


Motherboard: Gigabyte GA-Z87X-UD3H

BIOS Settings:
XHCI Mode: Smart Auto
XHCI Controll: Disabled
EHCI Controll: Disabled
 

Attachments

  • config-Setup.plist
    6.9 KB · Views: 128
Joined
Oct 17, 2013
Messages
288
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
RX 580
Mac
  1. iMac
Mobile Phone
  1. Android
Hi I was able to follow this guid until I hit a roadblock

I was able to test HS port, mine is USB3s are HS09 and HS10, USB2s are HS11 and HS14. I added -uia_exclude_hs uia_include=HS11 since HS11 is where my BlueTooth are connected.

View attachment 377429

Upon restart. Even if I plug and unplug USB 3 devices on USB 3 ports. SSxx ports won't recognize the devices.

View attachment 377430

Here are ktext installed in my EFI...ktext/Others

View attachment 377432

Motherboard: Gigabyte GA-Z87X-UD3H

BIOS Settings:
XHCI Mode: Smart Auto
XHCI Controll: Disabled
EHCI Controll: Disabled

Hi aloofkid, your motherboard has EHCI controller also (z390 have only XHCI as far as I know). Im not sure but you may have to enable EHCI and use also adiitional patches (see post #1) patches in clover. Last you have to enable XHCI hand-off in bios for sure.
 
Top