Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
May 28, 2017
Messages
31
Motherboard
MSI B85M-E45
CPU
Xeon E3-1230 V3
Graphics
GT 740
Mac
  1. Mac mini
Mobile Phone
  1. iOS
Hi Rehabman. Thanks for your input on the Hack scene, including this guide. I had issues wit the FakePCIID/XMUX Kext, but the version with XHC only seems to work. On thing that is eventually left, is the EH02 portion, the tremains enabled, because it's not included in your example in the laptop, but nothing is attached there anyway. Should I be concerned and modify the code somehow, to disable EH02 as well, or is it unnecessary?
nevermind, I found the code on Github after a Google Search. No EHCI visible now

code source: https://github.com/ZhangYuanSheng12...630+nv1060/ACPI/patched/SSDT-Disable_EHCI.dsl

I also would like to use VirtualBox. do I need additional ports for virtual USB?
 
Joined
Feb 19, 2020
Messages
4
Motherboard
MSI X99A SLI Krait Edition
CPU
i7-6800k
Graphics
MSI 5700XT EVOKE OC
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
I am trying to do USB patching. But when I looked at my USB port. I found there are several 3.0/3.1 USB host controllers which is quite different from this tutorial. I found there were six ports owned by D088 and D08A on my motherboard. And I don't exactly know where should I get started.

I also want to ask what is EH01 and EH02 controller with PR01 and PR12, it seems I can't find any usb port on my motherboard which is owned by EH01 and EH02
Screen Shot 2020-04-25 at 12.00.15 AM.png
 
Joined
Sep 8, 2010
Messages
180
Motherboard
Z77X-UD5H
CPU
i7-3770K
Graphics
HD 4000
Mac
  1. MacBook Pro
Classic Mac
Mobile Phone
  1. iOS
I'm totally lost.
I'm on Mojave 10.14.6 and trying to make a custom SSDT for the USB Ports of my motherboard:
GA-Z77X-UD5H running F16j Modded Bios.

I'm using Hackintool for the port discovery and exporting it to SSDT.

Now when I attach the SSDT to the EFI folder I loose my Bluetooth connection that's on my internal USB port.

Kext I'm using is :
InjectUSBAll
FakePCIID_XHCIMux
FackPCIID

When I remove one of the FakePCIID kexts the internal USB bus doesn't work anymore and Bluetooth is lost.

Can someone help me out on this one ?
I can't find anything around this motherboard
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
5,315
Motherboard
Gigabyte Z390M Gaming - Clover 5102
CPU
i5-9600K
Graphics
RX 570 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. iOS
I am trying to do USB patching. But when I looked at my USB port. I found there are several 3.0/3.1 USB host controllers which is quite different from this tutorial. I found there were six ports owned by D088 and D08A on my motherboard. And I don't exactly know where should I get started.

I also want to ask what is EH01 and EH02 controller with PR01 and PR12, it seems I can't find any usb port on my motherboard which is owned by EH01 and EH02
View attachment 464831


Hi there.

The motherboard you have has extra, third-party USB controllers alongside the main Intel ones. These are the two you mention - ASMedia and VIA.

Generally these are not configurable and they do not count towrds your 15-port limit. macOS treats them as if they are "external" ports, just like a PCI-e card added to a Mac Pro.

A bit of background:

Your X99 chipset comes with 2x EHCI controllers and 1x XHCI controller. This provides 14x USB2 ports in total and 6x USB3. However MSI does not impliment them all, just 6x of each for a total of 18x ports. (Remember a USB3 port can also act as a USB2 port too, so we double those).

Depending on the third-party controllers used, some provide USB3 only and piggy-back on existing USB2 ports, while others provide both types.

Okay, so those two EHCI controllers with the labels PR** are the 'parent' nodes of two 'hubs'. The actual USB2 ports will be hanging off those two hubs. The easiest way to visualise this is to run IORegistryExplorer.

So, what to do?

Well, do not worry about the ASMedia and VL controllers. When @RehabMan wrote this guide, Hackintool did not exist, so by using it you are straying beyond the bounds of the guide. No problem, just tricky sometimes matching what you are seeing with the tutorial.

Delete the third-party controllers if Hackintool lets you, or if not, just ignore their ports. Only work with your Intel ports and set each one up by doing the "port discovery' process with a USB2/3 flash drive.

:)
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
5,315
Motherboard
Gigabyte Z390M Gaming - Clover 5102
CPU
i5-9600K
Graphics
RX 570 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. iOS
I'm totally lost.
I'm on Mojave 10.14.6 and trying to make a custom SSDT for the USB Ports of my motherboard:
GA-Z77X-UD5H running F16j Modded Bios.

I'm using Hackintool for the port discovery and exporting it to SSDT.

Now when I attach the SSDT to the EFI folder I loose my Bluetooth connection that's on my internal USB port.

Kext I'm using is :
InjectUSBAll
FakePCIID_XHCIMux
FackPCIID

When I remove one of the FakePCIID kexts the internal USB bus doesn't work anymore and Bluetooth is lost.

Can someone help me out on this one ?
I can't find anything around this motherboard


Hi there.

Two things:

1) You do not need FakePCIID_XHCIMux.kext.

2) If bluetooth disappears because of USB then the port is not configured correctly.

Maybe consider trying the easier, Beginner's Guide:


:)
 
Joined
May 29, 2018
Messages
16
Motherboard
ASUS ROG Strix z370-e
CPU
i7-8700K
Graphics
GTX 1080
Mac
  1. iMac
Classic Mac
  1. Apple
Mobile Phone
  1. iOS
Ok can't believe I'm getting stuck on this, but I'm port mapping right now. I found that the port my keyboard/mouse is plugged into HS03. When I try this step with these bootflags:

"Next, we boot with -uia_exclude_hs uia_include=HS03 to test SSxx and USRx ports."

It doesn't include HS03 and I can't type. I've tried it with other ports ie HS14, HS04,(and moving the keyboard to the appropriate port) but still nothing.
 
Joined
May 29, 2018
Messages
16
Motherboard
ASUS ROG Strix z370-e
CPU
i7-8700K
Graphics
GTX 1080
Mac
  1. iMac
Classic Mac
  1. Apple
Mobile Phone
  1. iOS
Ok can't believe I'm getting stuck on this, but I'm port mapping right now. I found that the port my keyboard/mouse is plugged into HS03. When I try this step with these bootflags:

"Next, we boot with -uia_exclude_hs uia_include=HS03 to test SSxx and USRx ports."

It doesn't include HS03 and I can't type. I've tried it with other ports ie HS14, HS04,(and moving the keyboard to the appropriate port) but still nothing.

Sorry for the double post but dunno how to delete a post. I got past this point by finding another way to map the ports with a tool that helps you check HSR and SSR simultaneously.
 
Joined
Apr 27, 2020
Messages
73
Motherboard
Gigabyte Designare EX X299
CPU
i9-9940X
Graphics
3x GTX 1080ti
I've followed every step of this guide, reading carefully through each step, and I'm pretty confident that I did everything as it should... But I don't see any change at all on my IOReg tree.

USB works fine with InjectAll.kext + disabling port limit, but I'd like to do this the "right way," because I'm having trouble setting up my broadcom bluetooth controller (probably a separate issue).

A few interesting things to note
  • my USB ports are all showing under a single address (both USB2 and USB3, under HSxx and SSxx, respectively)
  • I am now seeing an nvCommandQueue device being attached and disconnected, continuously, and the whole system is stuttery, having weird hangups. Perhaps an unrelated issue to custom USB SSDTs? Others have been experiencing the same:
Problem Reporting:

I have used the usbinjectall.kext, and port-limit patch. Then I configured my ports and eliminated unused ports. Below is a list of problems that I am having and need help with. PLEASE HELP! I’ve been trying to figure this out for 2 months now and am at a dead end.

Issue #1)

HS01 is a physical usb 3.0 port, and yet it only shows up as usb2 (HS01) when configuring my ports with usb inject all and the port limit patch. No corresponding “SS01” show up when plugging in a usb3 device to that port.

a)Why is this happening?

b) How do I fix this?

c) Does this indicate something wrong with my motherboard, or is the problem due to a fixable error in my mac os?

D) Does this have to do with exposed bugs in my ACPI implementation of _PLD and _UPC (whatever that means)?

Issue #2)

I cannot for the life of me achieve USB3.0 speeds on my usb 3 ports. Aside from HS01, which is supposed to be a physical usb3 port, all of my usb 3 ports have been configured correctly (I think). However, when I plug in a usb3 stick to any of my usb ports, Black Magic Disk Speed test shows them as having a write speed of no more than 25MB/s. When I plug in a usb 3 external hard drive, Black Magic Disk speed test can achieve no more than 100MB/s write speeds. These seem much more like usb 2.0 speeds than usb 3.0 speeds.

a) Is there something I am doing wrong and is there something I can do to remedy this situation in order to get usb3
speeds from these ports?

Issue #3)

In my IOReg, i have items such as “RootDomainUserClient”, “nvCommandQueue”, “nvDevice”, “nvSharedUserClient”, nvShareGroupContext, CCCapture, AppleKeyStoreUserClient, and “com_intel_driver_EnergyDriverClient” showing up in green and then immediately becoming crossed out in red letters.

View attachment 284489
View attachment 284490
View attachment 284491
View attachment 284492
View attachment 284493

a) What are these items and why are they constantly being disconnected and reconnected?
b) Should I be worried about this and does this have anything to do with either my USB speeds
not working properly, or my power management?

Attached Files:
Below I have attached my IOReg, my clover config.file (without any serial number for obvious reasons), my patched UIAC.aml, and screenshots of the crossed out components in IOreg in a zip file. Could someone please take a look at them and let me know what I am doing wrong? Help is much appreciated! I am a super noob and really need help! Thankyou so much everyone! @RehabMan @P1LGRIM


Attaching my full Problem Reporting .zip here, for assistance, but also some IOReg screenshots for quick reference.

Thank you!
IOReg_nvCommandQueue.pngIOReg_XHCI.png
 

Attachments

  • Problem Reporting.zip
    7.7 MB · Views: 18
Last edited:
Joined
Apr 27, 2020
Messages
73
Motherboard
Gigabyte Designare EX X299
CPU
i9-9940X
Graphics
3x GTX 1080ti
UPDATE / EDIT TO MY POST ABOVE

I've tried other methods like the USBMap Tool Method and the Hackintool Method, and out of those, the kext injection method works, while the generated SSDTs simply won't.

I've compared my SSDTs with other people's, and I don't understand why the SSDTs don't work. :confused: :confused: :confused:

I'm starting to suspect that my SSDTs aren't being recognized by clover at all!
Is it possible that some preferences or checkboxes in Clover/ACPI are preventing SSDT's from being applied?
 
Joined
Nov 10, 2015
Messages
106
Motherboard
Clevo 970EF Defiance VI - OpenCore
CPU
i7-8750H/HM370
Graphics
UHD630, RTX 2070, 1920x1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Classic Mac
  1. 128K
  2. iMac
  3. PowerBook
Mobile Phone
  1. iOS
I don't understand why the SSDTs don't work
Your PR files are not as per below guide; difficult to help you without some required files...

However, USBInjectAll is messed up and was not loaded:
1- It's code signed?!?! Replace it, unless you did it personally and you know what you're doing...
2- It's getting linking errors and signature errors, see below
Code:
Invalid signature -67050 for kext <OSKext 0x7feca52041d0 [0x7fff9c4968e0]> { URL = "file:///Library/Extensions/USBInjectAll.kext/", ID = "com.rehabman.driver.USBInjectAll" }
kxld[com.rehabman.driver.USBInjectAll]: The super class vtable 'vtable for IOService' for vtable 'vtable for USBInjectAll' is out of date. Make sure your kext has been built against the correct headers.
kxld[com.rehabman.driver.USBInjectAll]: The super class vtable 'vtable for IOService' for vtable 'vtable for USBInjectAll_config' is out of date. Make sure your kext has been built against the correct headers.
Link failed (error code 5).
Prelink failed for com.rehabman.driver.USBInjectAll; omitting from prelinked kernel.

I cannot check whether you're injecting kexts with Clover or they are installed in /L/E (some PR files missing), in any case, be sure you don't get any prelinking error otherwise your USBInjectAll.kext won't be loaded even if your SSDT-UIAC is correct.
BTW, better in /L/E...

You may want to try the attached one
 

Attachments

  • USBInjectAll.kext.zip
    15.4 KB · Views: 29
Last edited:
Top