Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Reading through this thread and the "[Guide] 10.11+ USB changes and solutions" thread, I have had trouble finding my answer to this question:

I have an h170 motherboard, with 8 USB 3.0 ports (6 back panel, 2 front panel) and 1 internal USB 2.0 hub (connected to the USB2.0 header) that all USB 2.0 devices (2 front panel USB 2.0 ports, SD Card readers, bluetooth) are connected to. Which is my more realistic port reality:

8 USB 3.0 ports & 1 USB 2.0 port(hub)
------
8 USB3.0 port designations (SSxx)
9 USB2.0 port designations (HSxx)
Total = 17 (still 2 over the port limit)

8 USB 3.0 ports & 5 (or 6) USB 2.0 ports(2 front panel, 2 SD Card readers, bluetooth, & hub)
------
8 USB 3.0 port designations (SSxx)
13 (or 14) USB 2.0 port designations (HSxx)
Total = 21 (or 22) (6 or 7 ports over the limit)

Or maybe I'm not seeing the true configuration. So please point me in the right direction. And thanks for any help on this. I'm just trying to figure out how I should format my custom SSDT.

Just follow the guide as written in post #1.
If you have an issue, read post #1, "Problem Reporting".

Note: Physical ports can be quite different from "ports on the XHC controller" due to physical ports connected to internal hubs. Hence the discovery process using ioreg.
 
Problem is the USB topology is dependent on how the specific system is built.

For example, the set of ports used might be different with the same motherboard used by two different people simply because the use of internal USB headers may be different. For example, one person may have used a particular header for an internal device (such as bluetooth), which would be marked internal (UsbConnector=255) and yet another person may have used that internal header to attach to external ports on the case (UsbConnector=0 or UsbConnector=3 depending on the type of the header/case ports).

ah yes i didn't think through properly
 
@RehabMan

Everything was working well until now... now... I'm getting random reboots/KPs when plugging in a USB device (only happens when plugging in a USB device). Sometimes it recognizes the USB, no problem. Shows up correctly in IOReg and ejects as well. But then, sometimes it crashes my system (KP on screen, or freeze for a few seconds, then random reboot). Anyway, all kexts are loaded in S/L/E, but I've added to EFI->CLOVER->kexts->10.12 if you want to peek at them.

Currently injecting some custom SSDTs. Maybe issues there? Shouldn't be.

pmset -g log | grep -i failure returns nothing. No crash reports in console logs. Any other terminal command to find out crash cause?

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f8398b000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
   94    0 0xffffff7f833cd000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <81 12 5 4 3>
kextstat|grep -y applehda
   96    1 0xffffff7f83671000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (278.56) CFB0D0AE-F09A-3660-8F95-7A02FD5FBF07 <95 84 72 12 7 6 5 4 3 1>
  122    0 0xffffff7f837f3000 0xb4000    0xb4000    com.apple.driver.AppleHDA (999.99.9) A4EB06C9-A40A-39EF-9C4A-D7F23DB9A2F9 <121 104 96 95 84 72 6 5 4 3 1>


sudo touch /System/Library/Extensions && sudo kextcache -u /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext XHCI-x99-injector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooTSCSync.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67054 0xFFFFFFFFFFFEFA12 for kext X86PlatformPlugin.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelMausiEthernet.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareData.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDALoader.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleHDA_ALC1150.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AHCIPortInjector.kext
KernelCache ID: 4BB14EDC22C3241DBF187CCF4F3B6673
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>
 

Attachments

  • Archive.zip
    4.7 MB · Views: 65
Last edited:
@RehabMan

Everything was working well until now... now... I'm getting random reboots/KPs when plugging in a USB device (only happens when plugging in a USB device). Sometimes it recognizes the USB, no problem. Shows up correctly in IOReg and ejects as well. But then, sometimes it crashes my system (KP on screen, or freeze for a few seconds, then random reboot). Anyway, all kexts are loaded in S/L/E, but I've added to EFI->CLOVER->kexts->10.12 if you want to peak at them.

Currently injecting some custom SSDTs. Maybe issues there? Shouldn't be.

pmset -g log | grep -i failure returns nothing. No crash reports in console logs. Any other terminal command to find out crash cause?

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f8398b000 0x66000    0x66000    com.apple.driver.AppleACPIPlatform (5.0) 867C81BE-EA01-3A65-89F4-06D78E6514CA <12 11 7 6 5 4 3 1>
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
   94    0 0xffffff7f833cd000 0x3000     0x3000     com.apple.driver.AppleLPC (3.1) F51595F0-F9B1-3B85-A1C3-F984DAD4107E <81 12 5 4 3>
kextstat|grep -y applehda
   96    1 0xffffff7f83671000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (278.56) CFB0D0AE-F09A-3660-8F95-7A02FD5FBF07 <95 84 72 12 7 6 5 4 3 1>
  122    0 0xffffff7f837f3000 0xb4000    0xb4000    com.apple.driver.AppleHDA (999.99.9) A4EB06C9-A40A-39EF-9C4A-D7F23DB9A2F9 <121 104 96 95 84 72 6 5 4 3 1>


sudo touch /System/Library/Extensions && sudo kextcache -u /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext XHCI-x99-injector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooTSCSync.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext USBInjectAll.kext
kext-dev-mode allowing invalid signature -67054 0xFFFFFFFFFFFEFA12 for kext X86PlatformPlugin.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelMausiEthernet.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext HackrNVMeFamily-10_12_3.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareData.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDALoader.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleHDA_ALC1150.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AHCIPortInjector.kext
KernelCache ID: 4BB14EDC22C3241DBF187CCF4F3B6673
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

Is the hub at SSP6/HS10 an internal hub? If so, why is it marked external? (UsbConnector=3, should be UsbConnector=255 for internal). Same question for the hub at HS06.

Also: No power properties injected on XHC.
 
Is the hub at SSP6/HS10 an internal hub? If so, why is it marked external? (UsbConnector=3, should be UsbConnector=255 for internal). Same question for the hub at HS06.

Also: No power properties injected on XHC.

Code:
HS01/SSP1 => USB 3.0 - Front panel, left
HS02/SSP2 => USB 3.0 - Front panel, right
HS05 => USB 2.0 - Back panel, row 2, right
HS06 => USB 2.0 - Back panel, row 2, left
HS09/SSP5 => USB 3.0 - Back panel, row 4, right
HS10/SSP6 => USB 3.0 - Back panel, row 3, right
HS10/SSP6 => USB 3.0 - Back panel, row 3, left
HS10/SSP6 => USB 3.0 - Back panel, row 4, left
HS11 => Internal USB for H100i
HS13 => USB 2.0 - Back panel, row 1, left
HS14 => USB 2.0 - Back panel, row 1, right

Top of panel to bottom:
HS06 => Monitor Slot 1 @ 0x1454
HS06 => Monitor Slot 2 @ 0x1453
HS06 => Monitor Slot 3 @ 0x1452
HS06 => Monitor Slot 4 @ 0x1451

SSP6 and HS10 should have been internal, my bad.

HS06 is my monitor with 4 ports on the side panel that is connected to my computer via (DisplayPort and a) single USB cable to a USB 2.0 port. Should be 0, no? Technically external to the motherboard.

Added XHC power options.

In the meantime, here's my updated EFI/IOReg. Will do more testing...
 

Attachments

  • Archive.zip
    4.7 MB · Views: 86
HS06 is my monitor with 4 ports on the side panel that is connected to my computer via (DisplayPort and a) single USB cable to a USB 2.0 port. Should be 0, no? Technically external to the motherboard.

Yes... sounds like a USB2-only port connected to an external hub.

Note: You should probably be using the _OSI->XOSI+SSDT-XOSI.aml for better _OSI handling.
 
Hi RehabMan, I'm having the current issue of not seeing XHC. I see your XHC rename patches but I only see XH01 in IoREG. Furthermore, I don't see a lot of ports. I have both UsbInjectAll and XHCI-x99-Injector.kext installed to S/L/E (I thought I would need the latter because I'm on an X99 system). I've raised the port limit in my config.plist and have renamed EHCs to EH0 etc. How would I patch my misnamed XHC as I assume that's why all the ports aren't showing up. Thank you.
 

Attachments

  • Upload.zip
    4.8 MB · Views: 68
  • Screen Shot 2017-03-21 at 5.04.43 PM.png
    Screen Shot 2017-03-21 at 5.04.43 PM.png
    79 KB · Views: 89
Hi RehabMan, I'm having the current issue of not seeing XHC. I see your XHC rename patches but I only see XH01 in IoREG. Furthermore, I don't see a lot of ports. I have both UsbInjectAll and XHCI-x99-Injector.kext installed to S/L/E (I thought I would need the latter because I'm on an X99 system). I've raised the port limit in my config.plist and have renamed EHCs to EH0 etc. How would I patch my misnamed XHC as I assume that's why all the ports aren't showing up. Thank you.

Read post #1, "Problem Reporting"
Hint: You didn't press F4 to collect native ACPI into ACPI/origin.
 
Read post #1, "Problem Reporting"
Hint: You didn't press F4 to collect native ACPI into ACPI/origin.

Hmm sorry about that. I booted and pressed F4 at the main screen and now my ACPI/Origin folder is populated with a bunch of different .amls. I hope I did that right. Thank you for the help.
 

Attachments

  • Upload.zip
    5.7 MB · Views: 60
Hmm sorry about that. I booted and pressed F4 at the main screen and now my ACPI/Origin folder is populated with a bunch of different .amls. I hope I did that right. Thank you for the help.

Still not the right files in CLOVER/ACPI/origin.
Note: You have XH01 in your ioreg for XHC because you (incorrectly) have a patch for it.
The patch is poorly commented as "change XHCI to XHC", because what it actually does is change XHCI to XH01.
You should instead patch XHCI to XHC (must change XHCI->XHC_)
Note:
Code:
SPEEDY-NUC:~ rehabman$ echo -n XHC_|xxd
00000000: 5848 435f                                XHC_
 
Back
Top