- Joined
- Aug 29, 2018
- Messages
- 78
- Motherboard
- GA-Z170X-Gaming 5
- CPU
- Intel Core i7 6700K
- Graphics
- AMD Radeon Pro 580
- OS X/macOS
- 10.14.x
- Bootloader
- Clover (UEFI)
- OpenCore (UEFI)
- Mobile Phone
- iOS
Few years ago I wrote a guide on How to install macOS Sierra on GA-Z170X-Gaming 5 and a friend of mine SavageAUS wrote this section on how to create the custom SSDT-UIAC as a part of the guide, I hope you guys find it useful.)
How to create custom SSDT-UIAC:
A quick rundown on how to create a custom SSDT-UIAC.
Add the following patch to your config.plist if you don’t already have the patch.
The USBInjectAll.kext provided in this guide needs to be and stay installed.
Download ioregistryexplorer Version 2.1 from http://macdownload.informer.com/ioregistryexplorer/download/
Download MaciASL from: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-MaciASL-2017-0117.zip and extract, drag MaciASL.app into /Applications. (Credit RehabMan)
Download OS-X-USB-Inject-All Master from: (Credit RehabMan)
https://github.com/RehabMan/OS-X-USB-Inject-All/archive/master.zip
and extract the zip file.
Inside the OS-X-USB-Inject-All-master folder you will find SSDT-UIAC-ALL.dsl, copy it to your desktop.
Open ioregistryexplorer and find your device id by typing XHC in the search field.
Open SSDT-UIAC-ALL.dsl with MaciASL and find your appropriate device id section.
Remove all other sections in the SSDT-UIAC-ALL.dsl that do not correspond with your device id leaving just the one section. Skylake does not have a EHCI controller so “HUB1”, ”HUB2”, ”EH01”, "EH02" can be removed and in my case I can also remove "8086_1e31", "8086_8xxx", "8086_9xxx", "8086_9cb1", "8086_9d2f" and "8086_a2af".
Compile the file to make sure there are no errors in the code and then save the file with “ACPI Machine Language Binary”.
Now we turn our attention to ioregistryexplorer, while you have ioregistry open go to the XHC section and take note of the HSxx or SSxx locations that have devices attached. Now plug in a USB 2.0 device into all USB 2.0 you NEED and do the same with USB 3.0 ports with USB 2 and 3 devices and take note of them all.
Returning back to the SSDT-UIAC-ALL.dsl you will see all ports listed, you need to remove the ones you did not take note of and you can also add a comment to the ones you keep.
UsbConnector values = USB 2.0 = 0, USB 3.0 = 3. Internal = 255
USB 2.0 devices plugged into USB 3.0 ports HSxx are still marked as USB 3.0 = 3.
Internal devices such as Bluetooth etc are marked as 255
Once you gone through and done this to all the devices you need and removed the ones you don’t you can save your SSDT-UIAC-ALL.dsl in MaciASL. Make sure you rename it to SSDT-UIAC and that the file format is ACPI Machine Language Binary
Copy and paste the resulting SSDT-UIAC.aml into your EFI/EFI/CLOVER/ACPI/patched folder.
Disable the port limit patch in config.plist and add SSDT-UIAC.aml into SortedOrder if needed.
Reboot.
Open ioregistryexplorer and test the ports you left enabled USB 2 & 3.
The number of ports you should see in ioreg should be significantly reduced as they are not being injected anymore.[/SPOILER]
How to create custom SSDT-UIAC:
A quick rundown on how to create a custom SSDT-UIAC.
Add the following patch to your config.plist if you don’t already have the patch.
<dict>
<key>Comment</key>
<string>change 15 port limit to 26 in XHCI kext (100-series)</string>
<key>MatchOS</key>
<string>10.12.x</string>
<key>Name</key>
<string>com.apple.driver.usb.AppleUSBXHCIPCI</string>
<key>Find</key>
<data>g710////EA==</data>
<key>Replace</key>
<data>g710////Gw==</data>
</dict>
or
Name*: AppleUSBXHCIPCI
Find* [HEX] : 83bd74ff ffff10
Replace [HEX] : 83bd74ff ffff1b
Comment: Raise change 15 port limit to 26 in XHCI kext (100-series)
MatchOS: 10.12.x
<key>Comment</key>
<string>change 15 port limit to 26 in XHCI kext (100-series)</string>
<key>MatchOS</key>
<string>10.12.x</string>
<key>Name</key>
<string>com.apple.driver.usb.AppleUSBXHCIPCI</string>
<key>Find</key>
<data>g710////EA==</data>
<key>Replace</key>
<data>g710////Gw==</data>
</dict>
or
Name*: AppleUSBXHCIPCI
Find* [HEX] : 83bd74ff ffff10
Replace [HEX] : 83bd74ff ffff1b
Comment: Raise change 15 port limit to 26 in XHCI kext (100-series)
MatchOS: 10.12.x
<dict>
<key>Comment</key>
<string>USB 10.13.4+ by PMHeart</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
g32UDw+DlwQAAA==
</data>
<key>InfoPlistPatch</key>
<false/>
<key>Name</key>
<string>com.apple.driver.usb.AppleUSBXHCI</string>
<key>Replace</key>
<data>
g32UD5CQkJCQkA==
</data>
</dict>
or
Name*: com.apple.driver.usb.AppleUSBXHCI
Find* [HEX] : 837D940F 0F839704 0000
Replace [HEX] : 837D940F 90909090 9090
Comment: USB 10.13.4+ by PMHeart
MatchOS: 10.13.x
<key>Comment</key>
<string>USB 10.13.4+ by PMHeart</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
g32UDw+DlwQAAA==
</data>
<key>InfoPlistPatch</key>
<false/>
<key>Name</key>
<string>com.apple.driver.usb.AppleUSBXHCI</string>
<key>Replace</key>
<data>
g32UD5CQkJCQkA==
</data>
</dict>
or
Name*: com.apple.driver.usb.AppleUSBXHCI
Find* [HEX] : 837D940F 0F839704 0000
Replace [HEX] : 837D940F 90909090 9090
Comment: USB 10.13.4+ by PMHeart
MatchOS: 10.13.x
The USBInjectAll.kext provided in this guide needs to be and stay installed.
Download ioregistryexplorer Version 2.1 from http://macdownload.informer.com/ioregistryexplorer/download/
Download MaciASL from: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-MaciASL-2017-0117.zip and extract, drag MaciASL.app into /Applications. (Credit RehabMan)
Download OS-X-USB-Inject-All Master from: (Credit RehabMan)
https://github.com/RehabMan/OS-X-USB-Inject-All/archive/master.zip
and extract the zip file.
Inside the OS-X-USB-Inject-All-master folder you will find SSDT-UIAC-ALL.dsl, copy it to your desktop.
Open ioregistryexplorer and find your device id by typing XHC in the search field.
Open SSDT-UIAC-ALL.dsl with MaciASL and find your appropriate device id section.
Remove all other sections in the SSDT-UIAC-ALL.dsl that do not correspond with your device id leaving just the one section. Skylake does not have a EHCI controller so “HUB1”, ”HUB2”, ”EH01”, "EH02" can be removed and in my case I can also remove "8086_1e31", "8086_8xxx", "8086_9xxx", "8086_9cb1", "8086_9d2f" and "8086_a2af".
Compile the file to make sure there are no errors in the code and then save the file with “ACPI Machine Language Binary”.
Now we turn our attention to ioregistryexplorer, while you have ioregistry open go to the XHC section and take note of the HSxx or SSxx locations that have devices attached. Now plug in a USB 2.0 device into all USB 2.0 you NEED and do the same with USB 3.0 ports with USB 2 and 3 devices and take note of them all.
Returning back to the SSDT-UIAC-ALL.dsl you will see all ports listed, you need to remove the ones you did not take note of and you can also add a comment to the ones you keep.
UsbConnector values = USB 2.0 = 0, USB 3.0 = 3. Internal = 255
USB 2.0 devices plugged into USB 3.0 ports HSxx are still marked as USB 3.0 = 3.
Internal devices such as Bluetooth etc are marked as 255
Once you gone through and done this to all the devices you need and removed the ones you don’t you can save your SSDT-UIAC-ALL.dsl in MaciASL. Make sure you rename it to SSDT-UIAC and that the file format is ACPI Machine Language Binary
Copy and paste the resulting SSDT-UIAC.aml into your EFI/EFI/CLOVER/ACPI/patched folder.
Disable the port limit patch in config.plist and add SSDT-UIAC.aml into SortedOrder if needed.
Reboot.
Open ioregistryexplorer and test the ports you left enabled USB 2 & 3.
The number of ports you should see in ioreg should be significantly reduced as they are not being injected anymore.[/SPOILER]
Last edited: