Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,902
Motherboard
Gigabyte Z390M Gaming - Clover UEFI 5102
CPU
i5-9600K
Graphics
RX 570 8gb HDMI 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
Hi everyone, I followed the guide and managed to map my USB ports, the ports are working but now Bluetooth isn't working anymore. I noticed that my Broadcom card (internally plugged into the m.2 slot, replacing original gigabyte card, not actually plugged into a USB port) was seen by IORegistryExplorer in port HS10 so I kept it active setting it as "USBConnector", 255, but still it doesn't work (and now disappeared in IORegistryExplorer). WiFi is working properly (and it wasn't mentioned in IORegistryExplorer).
What should I do?
In attachment the SSDT_USB.aml file and a screenshot of IORegistryExplorer before rebooting with SSDT file in EFI folder.
Thanks a lot for helping, guys!

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.

:)
 
Last edited:
Joined
Aug 13, 2010
Messages
425
Motherboard
GA-X58A-UD3R
CPU
X5650
Graphics
7970HD
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
Thank you very much. Here are the files (I am sorry I cannot create problem reporting files, for some reason no F-key will work in the Clover boot). Used Hackintool to create the files. I still have to trim a few ports. I remove all the port limit patches and it seems to be stable, but waiting a while to see what happens.
 

Attachments

  • USBSSDT TRY.zip
    1.2 MB · Views: 25

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,902
Motherboard
Gigabyte Z390M Gaming - Clover UEFI 5102
CPU
i5-9600K
Graphics
RX 570 8gb HDMI 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
Thank you very much. Here are the files (I am sorry I cannot create problem reporting files, for some reason no F-key will work in the Clover boot). Used Hackintool to create the files. I still have to trim a few ports. I remove all the port limit patches and it seems to be stable, but waiting a while to see what happens.

Hi there.

Okay ...

Some observations:

1) Your motherboard does not have an XHC controller, only UHC and EHC. This you can see in the Hackintool output with device IDs.

2) EHC is USB2.0 only. Your motherboard uses a 3rd-party NEC chip for USB3.0.

3) The reason why your ports appear in the PR** part of the IOReg tree is because of the Hackintool-generated SSDT.

4) You have correctly inserted the EHC controller renames in your config.plist but they are not being used.

5) Did you install the USBInjectAll.kext and then Hackintool's SSDT-UIAC.aml file? Or did you use Hackintool's USBPorts.kext instead? They are mutually exclusive etc.
 
Joined
Jan 21, 2012
Messages
907
Motherboard
HP 8300 Elite
CPU
i5-3570
Graphics
GT 710
Mobile Phone
  1. Android
or some reason no F-key will work in the Clover boot
See if you can see a key Marked 'Fn' or similar on your keyboard (normally key is in a different colour). (or on mac KB's see above the Arrow keys).
Some laptops/PC's have a Fn Key which uses causes the Function Keys to behave differently - eg, if they have been setup to work as Media keys pressing the 'Fn' key with a Function key will revert it to behave as a normal Function Key not as a media playing related key. If that doesnt work try the function keys with various combinations of shift/ctrl/alt. (also check BIOS for a setting that deals with this)
 
Joined
Aug 13, 2010
Messages
425
Motherboard
GA-X58A-UD3R
CPU
X5650
Graphics
7970HD
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
So use the hackintool usb Kext? I only used hackintool because PR ports also appeared using your method, and I could not figure out why and could not continue with your method. I turned off mono usb 3.0 and have a add on card. Ports PR11-14 are the front panel and not used yet (have to remove 15-18 still). Any changes you suggest or is it ok as is?
I have tried every key combo, different keyboards and check bios, have never been able to have clover save anything via key press at boot.
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,902
Motherboard
Gigabyte Z390M Gaming - Clover UEFI 5102
CPU
i5-9600K
Graphics
RX 570 8gb HDMI 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
So use the hackintool usb Kext? I only used hackintool because PR ports also appeared using your method, and I could not figure out why and could not continue with your method. I turned off mono usb 3.0 and have a add on card. Ports PR11-14 are the front panel and not used yet (have to remove 15-18 still). Any changes you suggest or is it ok as is?
I have tried every key combo, different keyboards and check bios, have never been able to have clover save anything via key press at boot.

I'm sorry the method in this thread does not work for you. This is only a general beginner's guide and doesn't touch on older motherboards with legacy controllers.

I can't support Hackintool here. I can tell you though that you either use the SSDT-UIAC.aml and SSDT-EC.aml files it produces, together with USBInjectAll.kext - OR - the USBPorts.kext on its own.

There's nothing wrong with ports being on the PR** area of the IOReg tree. In fact a lot of older hardware and specialist motherboards cause this to happen in ACPI.

It's difficult to configure an add-in USB card because it will use a third-party chipset. It will probably work ok though:)

If you have installed Clover in legacy mode for your older motherboard, it will work slightly differently.

Check out @RehabMan 's full, expert guide in the Mojave Laptop support section for all the background. Information doesn't come much better :thumbup:
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,854
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
  1. MacBook Air
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
I can't support Hackintool here. I can tell you though that you either use the SSDT-UIAC.aml and SSDT-EC.aml files it produces, together with USBInjectAll.kext - OR - the USBPorts.kext on its own.


@UtterDisbelief,

Hackintool does not generate the SSDT-EC.aml file which is used is to fake an Embedded Controller (EC) to satisfy MacOS USB Power Delivery on systems that do not have an active EC correctly defined in the DSDT. Without a AHCI device called "EC" the AppleBusPowerController module will not load.

It's use and a code example are available in Rehabman's USB Power Patching Guide :-


Cheers
Jay
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,902
Motherboard
Gigabyte Z390M Gaming - Clover UEFI 5102
CPU
i5-9600K
Graphics
RX 570 8gb HDMI 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
@UtterDisbelief,

Hackintool does not generate the SSDT-EC.aml file which is used is to fake an Embedded Controller (EC) to satisfy MacOS USB Power Delivery on systems that do not have an active EC correctly defined in the DSDT. Without a AHCI device called "EC" the AppleBusPowerController module will not load.

It's use and a code example are available in Rehabman's USB Power Patching Guide :-


Cheers
Jay

Sorry, I just meant that the two *.aml files are a part of the package Hackintool drops on your desktop to configure USB ports. I believe my instructions were correct. Happy to be corrected if I was wrong. If Hackintool does not generate the SSDT-EC.aml how does it appear in the files generated? Is it intended as an ACPI patch and just copied from elsewhere - by Hackintool?

I've read the code within it and understand that. I wasn't offering an explanation for its use, by the way.

This Beginner's Guide is a specific method (mostly for XHC and EHC, not UHC) that does not include SSDT-EC.aml nor create one.

As I said earlier, it would be rude to offer support here for someone else's work and method. Having said that, I really do like what @headkaze is doing :thumbup:
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,854
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
  1. MacBook Air
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
If Hackintool does not generate the SSDT-EC.aml how does it appear in the files generated? Is it intended as an ACPI patch and just copied from elsewhere - by Hackintool?


@UtterDisbelief,

Hackintool only generates SSDT-UIAC.aml and SSDT-USBX.aml, it does not generate SSDT-EC.aml.

SSDT-UIAC.aml defines Active USB ports and port types for USBInjectAll
SSDT-USBX.aml alternate method of defining USB Power Delivery values (Depends on SMBIOS)

With regards to SSDT-EC.aml ..... in order for MacOS to correctly manage USB Power delivery from Sierra onwards the AppleBusPowerController module needs to load, it will only load against a ACPI device called "EC" (can easy be checked by looking in the IOREG). If a systems DSDT does not have a native ACPI "EC" device or one that can be renamed to "EC" (Usually H_EC or EC0) then the solution is to fake the "EC" device using SSDT-EC.aml.

If the AppleBusPowerController module is not loaded then power deliver to USB ports wont work as expected.

However the above is not true for all cases as depending upon which type of SMBIOS is used dictates which type of USB power delivery method is used by MacOS. The safest solution to ensure proper USB Power Delivery is to implement both and let MacOS choose the appropriate method based on the SMBIOS used.
  • Ensure PC's Embedded Controller is named "EC" (or in very rare cases use a fake one via SSDT-EC.aml)
  • Ensure that ACPI Device "USBX" is defined using SSDT-USBX.aml
Hope that helps to clarify things ...

Cheers
Jay
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,902
Motherboard
Gigabyte Z390M Gaming - Clover UEFI 5102
CPU
i5-9600K
Graphics
RX 570 8gb HDMI 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
@UtterDisbelief,

Hackintool only generates SSDT-UIAC.aml and SSDT-USBX.aml, it does not generate SSDT-EC.aml.

SSDT-EC.aml should only be used in very select circumstances as detailed in Rehabmans USB Power Management guide.

In essence in order for MacOS to correctly manage USB Power delivery from Sierra onwards the AppleBusPowerController module needs to load, it will only load against a AHCI device called "EC" (can easy be checked by looking in the IOREG). If a systems DSDT does not have a native AHCI "EC" device or a one that can be renamed to "EC" (eg: H_EC or EC0) then the solution is to fake the "EC" as detailed in RehabMans USB Power Management guide.

If AppleBusPowerController is not loaded then power deliver to USB ports wont work as expected.

Hope this clarifies things for you ...

Cheers
Jay

Okay ... But that doesn't match what's happening -

A.jpg


B.jpg


Is all I was saying really... Because an SSDT-EC.aml is included in the zip file the OP has posted above, along with SSDT-UIAC.aml.

I guess it must work differently for different folk and their hardware and the SMBIOS System Definition you mention in the paragraph about power-delivery etc.

:)
 
Last edited:
Top