Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
Okay ... But that doesn't match what's happening

@UtterDisbelief,

Wow .. ok I did not know that Hackintool did that, I've never ever seen it myself.

@headkaze must be parsing the DSDT/ACPI and evaluating the SMBIOS to decide if a fake EC is needed ... pretty clever :clap:

Sorry if I confused you .... guess i learned something that i did not know Hackintool does.

Everyday is a school day in the Hackintosh world :)

I've always manually patched my USB ports using Rehabmans original methods so tend to know when to rename a EC and when to use a fake one, but its great to know that @headkaze is automating these little intricacies in Hackintool, super helpful for those who are not up to speed.

Cheers
Jay
 
Last edited:
Joined
Aug 13, 2010
Messages
425
Motherboard
GA-X58A-UD3R
CPU
X5650
Graphics
7970HD
Mac
Mac Pro
Mobile Phone
iOS
Thank you for your help. Will try removing USBInject and using the one created by Hackintool. So far, after removing the port limit patches (all of them), my system seems more stable and snappier. Any changes needed in my config plist? Again, thank you very much and I only turned to Hackintool because I got to the part to map the ports and no HS or SS ports showed, just PR ports (any tutorial I looked up did not show PR ports, and I could not get them to show as HS ports).
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,330
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Thank you for your help. Will try removing USBInject and using the one created by Hackintool. So far, after removing the port limit patches (all of them), my system seems more stable and snappier. Any changes needed in my config plist? Again, thank you very much and I only turned to Hackintool because I got to the part to map the ports and no HS or SS ports showed, just PR ports (any tutorial I looked up did not show PR ports, and I could not get them to show as HS ports).
Hello there.

I can't address your USB2.0 problems from personal experience because my own earliest Hackintosh motherboard was a Z68. So, like you, I have to search and research.

Having said that you can find a heck of a lot of information here at Tonymacx86 that will help considerably.

For example one thing sticks out is the system-defintion. This doesn't affect the USB configuration but is worth mentioning. If you are using ECC DRAM then there's no problem, but for run-of-the-mill non-ECC DRAM you should remove - AppleTyMCEDriver.kext - or change away from MacPro5,1

Secondly for Legacy motherboards there is a DSDT patch available here in the downloads section specifically for your motherboard:

MB.png


Just check which BIOS version you are running and use the appropriate patch.

USBInjectAll is not a problem. In fact it opens-up all motherboard ports for configuration so is recommended (unless you are creating your own bespoke ACPI patch). In @RehabMan 's repository there are versions going way back to 2015 available. Perhaps an earlier version will work better?

You would only remove it if you choose to go with Hackintool's USBPorts.kext instead. Not covered here.

You should also check what kexts you have installed in EFI/CLOVER/kexts/Other and Drive: Library/Extensions. We haven't seen those so don't know what else is going on.

:)
 
Joined
Aug 6, 2017
Messages
11
Motherboard
Gigabyte Z370N WIFI
CPU
i5-8400
Graphics
Integrated
Mac
MacBook
Classic Mac
PowerBook
Mobile Phone
Android
Hi there.

1) Your SSDT looks okay :thumbup:.

2) The IOReg output shows that the Bluetooth adapter is connected as a hub. This is usually a problem. Because a hub can be more than one port you can't configure them, only single ports.

As the motherboard has clearly 'pinched' one of the USB ports for the m.2 slot, maybe the internal wiring for this turns it into a hub rather than a simple port. Or maybe the adapter/riser card, if you used one, is responsible. Disabling HS10 otherwise seems an odd choice. I checked the Gigabyte manual but I see no mention of this in the BIOS set-up.

When you did your port testing prior to building the SSDT template, did you, by any chance, do this without the wireless/BT card in place? If so did you notice if the HS10 port was present elsewhere, or not?

3) Check About this Mac / System Report / USB and the "USB Device Tree" to see what controllers and hubs are showing.

:)
Hi! Thanks for the reply!

1 - Perfect!
2 - I did the port testing with the wireless/bluetooth card in place, and it was present in the HS10 port, should I test without the card?
3 - I tried to check the USB device tree with the SSDT file in the Clover folder and the only devices shown were keyboard and mouse. Moved the SSDT file to trash and rebooted, now bluetooth is available and wireless/bluetooth card appears in the USB device tree as shown in screenshot.
 

Attachments

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,330
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
Hi! Thanks for the reply!

1 - Perfect!
2 - I did the port testing with the wireless/bluetooth card in place, and it was present in the HS10 port, should I test without the card?
3 - I tried to check the USB device tree with the SSDT file in the Clover folder and the only devices shown were keyboard and mouse. Moved the SSDT file to trash and rebooted, now bluetooth is available and wireless/bluetooth card appears in the USB device tree as shown in screenshot.
Okay.

Going over your initial post and this reply I did some more checking for you. Here are some ideas/thoughts:

1) The SSDT_USB.aml is generally correct, as I said before. Something to point out - you have defined all the HS** ports as USB2.0 connectors "0". However all 6x ports on your back-panel are blue - i.e USB3.0 connectors, so wired as "UsbConnector", 3, etc. There are only actually 2x USB2.0 ports and they are internal.

This shouldn't be relevant to the Bluetooth problem.

2) In your device-tree screengrab, my guess, as before, is that the 20702 bluetooth being on the adapter in an m.2 slot could be why it's showing as a hub. Not much we can do about that if so.

You haven't told us what kexts you are using in EFI/CLOVER/kexts/Other or drive: Library/Extensions. These might be affecting the USB sub-system. Where is USBInjectAll.kext for example?

Certainly your hardware should be easily configurable for USB. Setting BT on HS10 as "UsbConnector", 255, might be more tricky.

Here's something you can check:

Highlight your HS10 port in IORegistryExplorer and compare it with this one -

Port1.jpg


There's a hub connected to this port as you can see, but the port itself is UsbConnector 3. What is yours?

:)
 
Joined
Aug 6, 2017
Messages
11
Motherboard
Gigabyte Z370N WIFI
CPU
i5-8400
Graphics
Integrated
Mac
MacBook
Classic Mac
PowerBook
Mobile Phone
Android
Okay.

Going over your initial post and this reply I did some more checking for you. Here are some ideas/thoughts:

1) The SSDT_USB.aml is generally correct, as I said before. Something to point out - you have defined all the HS** ports as USB2.0 connectors "0". However all 6x ports on your back-panel are blue - i.e USB3.0 connectors, so wired as "UsbConnector", 3, etc. There are only actually 2x USB2.0 ports and they are internal.

This shouldn't be relevant to the Bluetooth problem.

2) In your device-tree screengrab, my guess, as before, is that the 20702 bluetooth being on the adapter in an m.2 slot could be why it's showing as a hub. Not much we can do about that if so.

You haven't told us what kexts you are using in EFI/CLOVER/kexts/Other or drive: Library/Extensions. These might be affecting the USB sub-system. Where is USBInjectAll.kext for example?

Certainly your hardware should be easily configurable for USB. Setting BT on HS10 as "UsbConnector", 255, might be more tricky.

Here's something you can check:

Highlight your HS10 port in IORegistryExplorer and compare it with this one -

View attachment 421261

There's a hub connected to this port as you can see, but the port itself is UsbConnector 3. What is yours?

:)
I set USBConnector as 3 and port <0a 00 00 00> in port HS10 (as it appeared in the IOregister with SSDT disabled, with bluetooth working) and it worked!
I have to go now, but tomorrow I'll carefully check if everything works properly, but it should be ok!
I'll let you know, hoping it could be useful for other users in the future.
Thanks a lot!
 
Joined
Nov 2, 2018
Messages
5
Motherboard
ASUS TUF Z390-PRO GAMING
CPU
i9-9900K
Graphics
UHD 630
Mac
MacBook Pro
Mobile Phone
iOS
@UtterDisbelief
a Big Thank You
for your work and help in this thread. Your guide led me smoothly creating my custom ssdt. I'm quite new to the hackintosh thing and only installed USB Inject all to get correct symbols for external drives (yeah just eye candy, i know) without knowing about the port limits and stuff (followed MacMans i9 Z390 Build). I now only disabled the port limit removal patches in clover configurator. Not sure if it is worse than removing them completely.
cheers
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,330
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
@UtterDisbelief
a Big Thank You
for your work and help in this thread. Your guide led me smoothly creating my custom ssdt. I'm quite new to the hackintosh thing and only installed USB Inject all to get correct symbols for external drives (yeah just eye candy, i know) without knowing about the port limits and stuff (followed MacMans i9 Z390 Build). I now only disabled the port limit removal patches in clover configurator. Not sure if it is worse than removing them completely.
cheers
Good news. Glad it was useful. :thumbup:

Disabling the port-limit removal patches has the same effect as removing them completely. The only advantage to leaving them in, but disabled, is if you might need them again in future. Changing their status is just a click away.

:)
 
Joined
Mar 26, 2018
Messages
4
Motherboard
Gigabyte Z170 Gaming 7
CPU
6600K
Graphics
GTX 1060
Mac
MacBook Air, Mac mini
Mobile Phone
iOS
I'm trying to follow this guide but get somehow confuse about my current state. I have a Gigabyte z170 gaming 7 motherboard with XHCI Hand off option turned off in my BIOS, but still I fail to see any SS port in the ioRegistryExplorer. My motherboard seems to have only USB3 ports and I think 1 or 2 x 3.1, but none of them are working when I plug a USB3 flashdrive, they only work with USB2 ones.
I guess something is misconfigured in the BIOS. What should I look for ?
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,330
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
I'm trying to follow this guide but get somehow confuse about my current state. I have a Gigabyte z170 gaming 7 motherboard with XHCI Hand off option turned off in my BIOS, but still I fail to see any SS port in the ioRegistryExplorer. My motherboard seems to have only USB3 ports and I think 1 or 2 x 3.1, but none of them are working when I plug a USB3 flashdrive, they only work with USB2 ones.
I guess something is misconfigured in the BIOS. What should I look for ?
Hello.

You should have XHCI Handoff Enabled in your BIOS :thumbup:
 
Top