Contribute
Register

[SUCCESS] ASUS Maximus VII Hero - HIGH SIERRA - 10.13.4 - Custom SSDT for USBInjectAll.kext

Joined
Feb 4, 2017
Messages
171
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6600U
Graphics
HD 520, 3200 x 1800
Mac
iMac, MacBook Air, Mac mini
Mobile Phone
iOS
  • Tools/Solutions
I can claim NO credit for finding this solution other than being able to follow the comprehensive guides by ReHabman
All credit to @RehabMan - Thank You! Thank You! Thank You!
Sites used

https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
https://www.tonymacx86.com/threads/guide-10-11-usb-changes-and-solutions.173616/
The MaciASL used by this guide is available here:
https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/

Downloading latest USBInjectAll.kext
https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads/


as per title this DDST.aml is only for ASUS Maximus Vii Hero mob



Prologue

I started my first Customac (CustoMacMini) build last year in February. I was a completely noob and it was quite a learning experience but I got it to work.
At that time I came across the posts by RehabMan re: usb custom ssdt and to be honest I could not really get it.
Fast forward one year later and having just installed a second Customac (April 2018) (I had a windows/gaming PC - and wanted to have to ability to use it as a Mac).
I was experiencing problems with USB on this machine.
So I reread and reread (and reread …you get the idea) the posts by RRehabMan, and now they totally make sense. I can’t say I understand all the detail but a lot more than last year. They are very comprehensive and detailed posts. So my advice is, you may not get it the first time you read it but keep on reading and trying to understand all that is there and looking up terms you don’t understand etc. I can now understand why RehabMan keeps telling us to read the post… last year for me though I could just not get it even after reading and reading, I just had to build up more understanding over time.

this is my second hackingtosh/customac
screensplashgeekbenchhwmonitorfinishedinstall.jpg

* note : the SSDT creates 6 external USB3 ports - 6 external USB2 ports - and 2 internal USB2 ports
(one is used by Corsair link dongle in my case , keeping one internal free just in case when I install wifi/bluetooth combo card in future and bluetooth needs an internal)
**note: I choose to have 14 ports under XHCI only (not using FakePCIID_XHCIMux.kext )



1. Bios Options

XHCI - Smart auto
Asus Maximus VII XHCI setting.jpg


2. Disabling the default injectors

Patches ACPI/DSDT in Config.plist (use clover configurator (list of patches in ACPI) or plisteditor.pro)

Item 1:
Comment: change EHC1 to EH01
Find: <45484331>
Replace: <45483031>

Item 2:
Comment: change EHC2 to EH02
Find: <45484332>
Replace: <45483032># rename EHCI2 to EH02

cloverconfigurator EHCi to EHO1 rename injectors.jpeg


3. Install USBInjectAll.Kext

Install to /Library/Extensions

sudo cp -R Release/USBInjectAll.kext /Library/Extensions
sudo touch /Library/Extensions && sudo kextcache -u /



4. Install disable port limit patch for High Sierra 10.13.4

You can find the patch in the file
config_patches.plist @ https://github.com/RehabMan/OS-X-USB-Inject-All
Open the file, copy the section for 10.13.4 disable port limit in XHCI kext.
Note: the patch can be different for each version of OS, this patch is for 10.13.4.

<dict>
<key>Comment</key>
<string>disable port limit in XHCI kext (credit PMHeart)</string>
<key>MatchOS</key>
<string>10.13.4</string>
<key>Name</key>
<string>com.apple.driver.usb.AppleUSBXHCI</string>
<key>Find</key>
<data>g32UDw+DlwQAAA==</data>
<key>Replace</key>
<data>g32UD5CQkJCQkA==</data>
</dict>



Open your config.plist on your EFI partition with PlistEditPro and add an entry under KernelAndKextPatches/KextstoPatch

plistwithportlimitdisabled for 12-3-4.png

ONLY INSTALL PATCH TEMPORARILY - after finding all the ports info you need - remove port limit patch *********




5. Testing ports

After rebooting
Open your IoRegistryExplorer
Under iMac14,2-IOResources/PCI0@0/AppleACPIPCO/XHC@14/XHC@14000000
You will see all your ports under XHC

ioreg XHC@14 all injected.jpeg


As you can see fully injected I have
HS01 to HS14: USB2 ports
SSP1 to SSP6 : USB3 ports
By plugging in a USB2/3 hub into the ports you can see which ports correspond to which ports.

As you know physical USB3 ports also have USB2 ports:
So the ports pair up like this SSP1-HS01, SSP2-HS02, SSP3-HS03, SSP4-HS04, SPP5-HS09, SPP6-HS10

Here are pictures showing where the ports are located on the Asus Maximus VII hero.

Maximus VII Hero Mobo picture .jpeg Hero VII back ports photo.jpeg

6. Choosing ports for custom SSDT

To stay underneath the 14 port limit of XHC
I choose to allocate following 14 ports

HS01 - HS02: two USB2 ports on the top of my case NZXT H440 (these are the combined USB2/3 ports)
HS05 - HS06 : two USB2 only ports on the top of my case
HS12 - HS14 : two USB2 only ports at the back of my case
HS07: internal USB2 connected to my corsair link PSU
HS08: internal USB2 unused (possibly for future bluetooth)

***update 12/4/18 I changed HS08 to HS11 - when you look at photos of where HS08 and HS11 are, you can see why I would choose HS11 over HS08

SSP1 - SSP2: two USB3 ports on the top of my case (relating to HS01/HS02)
SSP3 - SSP4: two USB3 only ports at the back
SSP5 - SSP6: two USB3 only ports at the back


Custom SSDT USB NZXT H440 top ports v2.JPG Custom SSDT USB Asus Maximus VII back ports.JPG

7. Creating Custom SSDT - DSL files
  • use SSDT-UIAC-ALL.dsl as a template (https://github.com/RehabMan/OS-X-USB-Inject-All/raw/master/SSDT-UIAC-ALL.dsl)
  • load the file in MaciASL.app
  • remove configuration sections that don't apply to the target hardware, in this case the target hardware is pci8086,8cB1 (see IOName property for XHC14 in ioregiststry explorer, picture above) so just kept the 8086_8xxx", Package()
  • remove ports from the various sections that are not needed: just keeping HS01, HS02, HS05,HS06,HS07,HS08, SSP1, SSP2,SSP3,SSP4,SSP5,SSP6
  • change UsbConnector values to match physical hardware/ports

HS01/HS02 UsbConnector 3 : usb2 ports that are on usb3
HS05/HS06/HS12/HS14 UsbConnector 0 : usb2 ports only
HS07/HS08 Usbconnector 255 : internal
SSP1/SPP2/SSP3/SSP4/SSP5/SSP6 Usbconnector 3 : usb 3 ports





The final SSDT-UIAC.dsl is:

Code:
// SSDT-UIAC-ASUS MAXIMUS VII XHI only 14 ports.dsl
//
// Maximus VII Hero MB only 6 USB3 and 8 USB2 defined on
// customization for USBInjectAll.kext.


DefinitionBlock ("", "SSDT", 2, "hack", "UIAC", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
                       "8086_8xxx", Package()
            {
                "port-count", Buffer() { 21, 0, 0, 0 },
                "ports", Package()
                {
                    "HS01", Package() // USB2 of USB3 top of case left
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HS02", Package() // USB2 of USB 3 top of case right
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HS05", Package() // USB2 top of case right
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package() // USB2 top of case left
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS07", Package() // corsair link dongle
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HS08", Package() // USB2 internal USB 2
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                    "HS12", Package() // USB2 back of case top
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 12, 0, 0, 0 },
                    },
                    "HS14", Package() // USB 2 back of case bottom
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 14, 0, 0, 0 },
                    },
                    //HS15 is phantom port (port address 15 not used)
                    "SSP1", Package() // USB3 top of case left
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 16, 0, 0, 0 },
                    },
                    "SSP2", Package() // USB3 top of case right
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 17, 0, 0, 0 },
                    },
                    "SSP3", Package() // USB3 back of case middle top
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 18, 0, 0, 0 },
                    },
                    "SSP4", Package() // USB3 back of case middle bottom
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 19, 0, 0, 0 },
                    },
                    "SSP5", Package() // USB3 back of case right most top
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 20, 0, 0, 0 },
                    },
                    "SSP6", Package() // USB 3 back of case right most bottom
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 21, 0, 0, 0 },
                    },
                },
            },
    })
    }
}
//EOF




Compile this file and place it in EFI/Clover/ACPI/patched. In MaciASL, you can compile as AML by using File -> Save As, format: ACPI Machine Language Binary. Save it to a location you know how to navigate to (desktop).
maciASL save as.jpeg maciasl save as ACPI machine binary.jpeg


Then mount your EFI partition and copy it to EFI/Clover/ACPI/patched. You can use any name for the .aml file in /patched folder so mine is called SSDt-UIAC - Asus Maximus VII 14 ports.aml

***update
I have attached the .aml (replaced HS08 with HS11) if you wanted to use.
Please be aware that the layout of the ports may not suit your purposes, it serves mine. So if it doesn't create you own .dsl with the ports you like and compile.

8. Reboot and check if SSDT is working

ioreg XHC@14 custom 14 ports injected.jpeg


Working!

9. Remove the port limit patch

from entry under KernelAndKextPatches/KextstoPatch in your config.plist
 

Attachments

Last edited:
Joined
Sep 13, 2016
Messages
12
Motherboard
Gigabyte Z170N-WIFI
CPU
i3-6320
Graphics
Nvidia GeForce 750ti
Mac
iMac
Mobile Phone
iOS
This is awesome! But how do I do this if I can’t login to my Mac.

I have upgraded to High Sierra but non of the usb work. I’m a little stumped as to how to login to make the changes
 
Joined
Feb 4, 2017
Messages
171
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6600U
Graphics
HD 520, 3200 x 1800
Mac
iMac, MacBook Air, Mac mini
Mobile Phone
iOS
This is awesome! But how do I do this if I can’t login to my Mac.

I have upgraded to High Sierra but non of the usb work. I’m a little stumped as to how to login to make the changes
Yes it happens.

Ideally the SSDT-uiac .aml would be created before the upgrade that way USB ports will work after upgrade.
That is the advantage of making one.

I did the same as you. Installed sierra and then upgraded to high Sierra without the SSDT (for USBInjectAll). Then realised I should have created the SSDT while having a sort of working USB in Sierra.

Anyway not to worry.


Not sure how far you got with high Sierra upgrade? Do you reach login screen?

3 options you can try:


1. Make sure to try all ports.
The best chance of working are HS12 or HS14 USB2 ports only at the back.
USB3 tends not to work.

2. Have you still got Usb 2 flashdrive with Installer for Sierra? (Or create one for High Sierra on a Usb 2 flashdrive, best to not use a USB3 flashdrive in case USB3 ports not working properly yet)
You can try and boot from the USB stick’s EFI and then select you High sierra disk from clover boot. And see if you have some USB ports working. And take it from there.

(If you wanted to you can edit the EFI partition on your usb flashdrive and add the custom SSDT.aml to EFI/Clover/ACPI/patched. (i can post that file here if you wanted) nand copy USBInjectAll.Kext in EFI/clover/Kexts/others just to get access to your USB ports, then configure your EFI on main hard drive)


3. If you reach login screen and you are connected via LAN to other Mac or Hackingtosh.
Use the other Hackingtosh/mac’s share screen option in finder , to remotely access your high Sierra build for which you have no USB ports.
And configure that way.
 
Last edited:
Joined
Sep 13, 2016
Messages
12
Motherboard
Gigabyte Z170N-WIFI
CPU
i3-6320
Graphics
Nvidia GeForce 750ti
Mac
iMac
Mobile Phone
iOS
Ok good ideas

Tried option 1) no USB ports work

2) I still have the usb. It booted to clover but it doesn’t show my main HDD with High Sierra. All I see is start uefi she’ll, boot external and the other usual stuff.

Is there some way I can do this from the shell?
 

BreBo

Moderator
Joined
Oct 17, 2011
Messages
9,643
Motherboard
Gigabyte GA-Z87X-OC
CPU
i7-4770K
Graphics
GTX 970
@Robbrad182, please update your profile (personal details) with your Motherboard (Mobo), CPU and iGPU or Graphics Card.
The Rules said:
Profiles need to contain at least your primary system to assist others with helping you.
 
Joined
Sep 13, 2016
Messages
12
Motherboard
Gigabyte Z170N-WIFI
CPU
i3-6320
Graphics
Nvidia GeForce 750ti
Mac
iMac
Mobile Phone
iOS
Done - sorry
 
Joined
Feb 4, 2017
Messages
171
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6600U
Graphics
HD 520, 3200 x 1800
Mac
iMac, MacBook Air, Mac mini
Mobile Phone
iOS
Ok good ideas

Tried option 1) no USB ports work

2) I still have the usb. It booted to clover but it doesn’t show my main HDD with High Sierra. All I see is start uefi she’ll, boot external and the other usual stuff.

Is there some way I can do this from the shell?

Did you change to APFS file system when you upgraded?
If you had a SSD it would have , unless you specifically configured the installer not to, and stayed on HFS+

If you are on APFS your sierra installer flashdrive will need to have
Apfs.efi in its EFI/EFI/Clover/drivers64UEFI
Folder
 
Last edited:
Joined
Feb 4, 2017
Messages
171
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6600U
Graphics
HD 520, 3200 x 1800
Mac
iMac, MacBook Air, Mac mini
Mobile Phone
iOS
Done - sorry
(just saw in profile that your computer is a Z170-N , the custom SSDT file in this guide is for Maximus Hero VII - Z97, methodology is grosely the same but will have some changes (port limit patch etc) for 100- series. See main guide. Just so you know once you get access to your High Sierra install)
 
Last edited:
Joined
Sep 13, 2016
Messages
12
Motherboard
Gigabyte Z170N-WIFI
CPU
i3-6320
Graphics
Nvidia GeForce 750ti
Mac
iMac
Mobile Phone
iOS
I have ordered a ps2 keyboard gonna try and login with that before really messing something up. Will report back thanks for your help
 
Joined
Feb 4, 2017
Messages
171
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6600U
Graphics
HD 520, 3200 x 1800
Mac
iMac, MacBook Air, Mac mini
Mobile Phone
iOS
I have ordered a ps2 keyboard gonna try and login with that before really messing something up. Will report back thanks for your help
Well PS2 keyboard will only work if you had originally VoodooPS2Controller.kext installed properly on your Sierra.
(Mac OS does not natively support PS2 as far as I am aware)
MacOs is a very different beast compared to windows troubleshooting,
where PS2 keyboard and mouse was our go to with usb keyb/mouse problems.
 
Last edited:
Top