Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

Hello, I was told I was in the wrong thread, so I hope I am in the right one now.

I must be the biggest idiot of all times. Because I don't know how to use these instructions to make my USB 3.0 ports work. And I am really really lost, I have no idea of what I'm seeing.

I downloaded the Hackintool and It helps me to see these info:

These are my Kexts, I don't know if they work or they are just laying around in the ssd

Screen Shot 2019-06-27 at 5.40.25 PM.png

This is my bootloader

Screen Shot 2019-06-27 at 5.37.56 PM.png

And these are my usb ports.

Screen Shot 2019-06-27 at 5.29.53 PM.png

Now, at the front I have two 2.0 USB ports (HS11 and HS12) and 1 USB 3.0 Port (HS04)

This is the rear of my motherboard:

Screen Shot 2019-06-27 at 5.32.07 PM.png

However IORegistryExplorer Shows me this:

Screen Shot 2019-06-27 at 7.43.15 PM.png

According to this image, none of my ports are detected as 3.0 or 3.1.

So, what is the next step? I'm very lost in this.

Thanks a lot in advance for any suggestions.
 
You are not dumb, this is straightforward but not simple. There can be a big difference.

Looking at your IOreg screen shot, you see the ports listed HS01-HS14 + USR1. Because of the port limit in MacOS, you will only see 15 total ports there. Each of the blue USB 3.1 gen-1 jacks on your board need two different software ports to function in both USB 2/1.1 and USB 3.1 modes. The USB 3 ports have numbers that start with SS and so would be SS01-SS14. You don't see these in IOreg because of the 15 port limit. The list only goes to 15.

Looking at the motherboard rear panel photo, the ports HS04,05,06,09,10 provide the USB2 functionality to the blue jacks. You need to assign ports SS04, SS05, SS06, SS09, and SS10 to provide the USB3 functionality. If you want to add USB3 to the HS06 jack, you add the SS06 port and configure the port for USB3. This process involves removing some of the HS ports (the ones that aren't associated with a physical jack or you don't need) to make room for the additional USB3 ports while keeping under the 15 port limit.

In general, in order to stay under the limit you will probably have to pick some jacks that will not have both USB2 and USB3 functionality. You need to create a custom SSDT the will specify which ports are associated with which jacks and skip the port values (HSxx, SSxx) you are leaving out. The SSDT is based on the template provided in the .dsl file mentioned on the first page.

SSDT-USB-Template.dsl
https://www.tonymacx86.com/attachments/ssdt-usb-template-dsl.163422/

You need to figure out which of the different template sections in this file matches the hardware id in the XHC@14 item in IO reg. Then you can remove the part of the template that doesn't apply to your hardware and configure the port IDs you need. I can help you with this tomorrow if you are still having trouble.

LMHmedchem
 
Last edited:
What I am doing wrong? I want compile this but I always get error.


Code:
// SSDT-UIAC-ALL.dsl
//
// This SSDT can be used as a template to build your own
// customization for USBInjectAll.kext.
//
// This SSDT contains all ports, so using it is the same as without
// a custom SSDT.  Delete ports that are not connected or ports you
// do not need.
//
// Change the UsbConnector or portType as needed to match your
// actual USB configuration.
//
// Note:
// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)
// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)
// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)
//

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

        Name(RMCF, Package()
        {
            "EH01", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "PR11", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP15", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP16", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                },
            },
            "EH02", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "PR21", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP21", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP22", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HP23", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP24", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HP25", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                },
            },
            "8086_1e31", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                   },                     
                    "HS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "SS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "SS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                     },
                },
            },
        })
    }
}
//EOF

Screenshot 2019-07-07 at 16.30.44.png
 
What I am doing wrong? I want compile this but I always get error.


Code:
// SSDT-UIAC-ALL.dsl
//
// This SSDT can be used as a template to build your own
// customization for USBInjectAll.kext.
//
// This SSDT contains all ports, so using it is the same as without
// a custom SSDT.  Delete ports that are not connected or ports you
// do not need.
//
// Change the UsbConnector or portType as needed to match your
// actual USB configuration.
//
// Note:
// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)
// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)
// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)
//

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

        Name(RMCF, Package()
        {
            "EH01", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "PR11", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP15", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP16", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                },
            },
            "EH02", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "PR21", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP21", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP22", Package()
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HP23", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP24", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HP25", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                },
            },
            "8086_1e31", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                   },                  
                    "HS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "SS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "SS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                     },
                },
            },
        })
    }
}
//EOF

View attachment 415217

Hi there.

Well you did not create this using the guide here ...

However the compile error tells you what the problem is. Remove the " , " at the end of line 113.

As this looks okay there must be something elsewhere that is unbalancing the code.

:)
 
Last edited:
No, I used template in Rehabman's guide.

You have done well with the template ...

Okay, as you are having problems, here's my best hint: check line 91 :thumbup:

I think you have one curly bracket and one comma too many.
 
can someone look at my template and tell me why USB 3 is not working please....usb 2 is working fine..
 

Attachments

  • SSDT-USB-Template.dsl
    3.9 KB · Views: 65
can someone look at my template and tell me why USB 3 is not working please....usb 2 is working fine..

Changes:

1) Line 11 - "8086_0xa12f" probably safer as "8086_a12f"

2) Line 89 - missing " }, " so add it.

3) Lines 101, 102 & 103 - Remove these three.

Save. Test Compile. Generate *.aml. Save. Done.

:)
 
@UtterDisbelief

OK... Just... THANK YOU for this guide. I found it to be extremely well assembled and very coherent. I finally understand what I have been doing wrong for the last few days.

I like what one poster said about the 'minimum of rabbit holes'. It is SO true!
Sometimes, a comprehensive guide covering all the possibilities is just too much information to make sense of. I literally spent 10 minutes and two re-boots with this one and now my custom SSDT I made is working as designed. (my issue was the confusion between patches and not knowing about the new USBInjectAll version)

I'm a fan of this guide.
 
Back
Top