Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I install USBInjectAll.kext, FakePCIID.kext + FakePCIID_XHCIMux.kext, XHCI-200-series-injector.kext to the system volume, and only find USBInjectAll.kext is loaded.
IOReg.app is short for IORegistryExplorer.app.
Now, there is still no any device under XHC in IORegistryExplorer.
As per guide, FakePCIID_XHCIMux.kext does not apply to 100-series chipset and later (no EHCI controller).
And your laptop is not 200-series (no 200-series mobile yet).

You failed to attach any problem reporting files. Please read FAQ, "Problem Reporting" carefully.
 
Joined
Apr 1, 2018
Messages
39
Motherboard
Dell OptiPlex 3050-Clover
CPU
i5-7500/B250
Graphics
HD630
Mac
iMac
As per guide, FakePCIID_XHCIMux.kext does not apply to 100-series chipset and later (no EHCI controller).
And your laptop is not 200-series (no 200-series mobile yet).

You failed to attach any problem reporting files. Please read FAQ, "Problem Reporting" carefully.
I know what's wrong, because I use search to find XHC. When I use my mouse, everything works well.
BTW, cause I don't have a USB3.0 device on hand, I can just use 2.0 device to test. The result is HS01 02 04 05 is USB3.0 port, so the SS01 02 04 05 is USB3.0 port, too. Right?
屏幕快照 2018-05-09 下午11.17.35.png
 
Joined
Feb 18, 2014
Messages
58
Motherboard
Gigabyte H370 HD3
CPU
i5-8400
Graphics
GTX 1080
Mac
MacBook Pro
Classic Mac
LC, Power Mac, PowerBook
Mobile Phone
Android, iOS
Thanks for the guide, now I have my custom SSDT in place and ioreg shows me only the correct USB devices as I put them into the SSDT.
For my (new) system, sleep doesn't work. I'm not sure if its related to USB in any way, but I do get these ACPI messages:
Screenshot_20180509-175628.jpg
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
BTW, cause I don't have a USB3.0 device on hand, I can just use 2.0 device to test. The result is HS01 02 04 05 is USB3.0 port, so the SS01 02 04 05 is USB3.0 port, too. Right?
Not possible to know in advance. There is not necessarily a numeric correlation between SSxx and HSxx.
As per post #1, USB3 device is required.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thanks for the guide, now I have my custom SSDT in place and ioreg shows me only the correct USB devices as I put them into the SSDT.
For my (new) system, sleep doesn't work. I'm not sure if its related to USB in any way, but I do get these ACPI messages:
View attachment 330426
Sleep/other ACPI issues are off-topic here.
 
Joined
Feb 19, 2016
Messages
210
Motherboard
ASUS ZenBook UX430UA-DH74
CPU
i7-8550U
Graphics
Intel 620 1920x1080
Since you're using the EHCI controller, you need also "EH01", "EH02", "HUB1", "HUB2".
I had USB2 results on HP13,HP14,HP15,HP16,HP17,HP18 in EH01/PR11 and HP21,HP22,HP25 on EH02/PR21. And USB 3 results on SSP3,SSP4,SSP5,SSP6.

So I have trimmed the data to eliminate unused ports in EH01, EH02, HUB1, HUB2. I am confused about entry 8086_8xxx in SSDT-UIAC-ALL which matches my device ID but all ports are labelled with HS, I didn't have HS results, only HP and SSP?


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-ALL", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "HUB1", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "HP13", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HP14", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP15", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HP16", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HP17", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HP18", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                },
            },
            "HUB2", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "HP21", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP22", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP25", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                },
            },
            "EH01", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "PR11", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                },
            },
            "EH02", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "PR21", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                },
            },
            "8086_8xxx", Package()
            {
                "port-count", Buffer() { 21, 0, 0, 0 },
                "ports", Package()
                {
                    "HS01", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HS02", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HS05", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS07", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HS08", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                    "HS09", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 9, 0, 0, 0 },
                    },
                    "HS10", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },
                    "HS11", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 11, 0, 0, 0 },
                    },
                    "HS12", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 12, 0, 0, 0 },
                    },
                    "HS13", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 13, 0, 0, 0 },
                    },
                    "HS14", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 14, 0, 0, 0 },
                    },
                    //HS15 is phantom port (port address 15 not used)
                    "SSP3", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 18, 0, 0, 0 },
                    },
                    "SSP4", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 19, 0, 0, 0 },
                    },
                    "SSP5", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 20, 0, 0, 0 },
                    },
                    "SSP6", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 21, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I had USB2 results on HP13,HP14,HP15,HP16,HP17,HP18 in EH01/PR11 and HP21,HP22,HP25 on EH02/PR12. And USB 3 results on SSP3,SSP4,SSP5,SSP6.

So I have trimmed the data to eliminate unused ports in EH01, EH02, HUB1, HUB2. I am confused about entry 8086_8xxx in SSDT-UIAC-ALL which matches my device ID but all ports are labelled with HS, I didn't have HS results, only HP and SSP?


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-ALL", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "HUB1", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "HP13", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HP14", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP15", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HP16", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HP17", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HP18", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                },
            },
            "HUB2", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "HP21", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP22", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP25", Package()
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                },
            },
            "EH01", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "PR11", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                },
            },
            "EH02", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "PR21", Package()
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                },
            },
            "8086_8xxx", Package()
            {
                "port-count", Buffer() { 21, 0, 0, 0 },
                "ports", Package()
                {
                    "HS01", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HS02", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HS03", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HS04", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HS05", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS07", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HS08", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                    "HS09", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 9, 0, 0, 0 },
                    },
                    "HS10", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },
                    "HS11", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 11, 0, 0, 0 },
                    },
                    "HS12", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 12, 0, 0, 0 },
                    },
                    "HS13", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 13, 0, 0, 0 },
                    },
                    "HS14", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 14, 0, 0, 0 },
                    },
                    //HS15 is phantom port (port address 15 not used)
                    "SSP3", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 18, 0, 0, 0 },
                    },
                    "SSP4", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 19, 0, 0, 0 },
                    },
                    "SSP5", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 20, 0, 0, 0 },
                    },
                    "SSP6", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 21, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF
You had no HSxx ports on XHC because FakePCIID_XHCIMux is routing them to EHCI.
 
Joined
Feb 19, 2016
Messages
210
Motherboard
ASUS ZenBook UX430UA-DH74
CPU
i7-8550U
Graphics
Intel 620 1920x1080
You had no HSxx ports on XHC because FakePCIID_XHCIMux is routing them to EHCI.
I should redo my port discovery without fakePCIID_XHCIMux? Or can I just remove the fakePCIID_XHCIMux now and try my SSDT?

thanks man, this stuff a bit over my head.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,028
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
I should redo my port discovery without fakePCIID_XHCIMux? Or can I just remove the fakePCIID_XHCIMux now and try my SSDT?

thanks man, this stuff a bit over my head.
The use or non-use of FakePCIID_XHCIMux.kext is really your decision. If you read post #1, you will see how with my u430 I did it both ways.

Personally, I like to keep everything on XHC (means not using XHCIMux) and disable the EHCI controller (desktops usually have an option for this: xHCI mode = "Enabled").
 
Joined
Feb 19, 2016
Messages
210
Motherboard
ASUS ZenBook UX430UA-DH74
CPU
i7-8550U
Graphics
Intel 620 1920x1080
The use or non-use of FakePCIID_XHCIMux.kext is really your decision. If you read post #1, you will see how with my u430 I did it both ways.

Personally, I like to keep everything on XHC (means not using XHCIMux) and disable the EHCI controller (desktops usually have an option for this: xHCI mode = "Enabled").
Ok I removed FakePCIID_XHCIMux.kext and redid my port discovery, now everything appears under XHC and this is what I found:

Not used; HS01, HS02, HS07, HS08, HS12,
Used: HS03/SSP3, HS04/SSP4, HS05, HS06, HS09/SSP5, HS10/SSP6, HS11, HS13, HS14,

Below is my edited SSDT-UIAC-ALL.

Do I need to remove the rename of XHC1 to XHX or XHCI to XHC in my config.plist?

Lastly to disable the EHCI controller using xHCI mode = "Enabled".... is this in bios or in clover configurator?

thanks man,

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-ALL", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "8086_8xxx", Package()
            {
                "port-count", Buffer() { 21, 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 },
                    },
                    "HS05", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS09", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 9, 0, 0, 0 },
                    },
                    "HS10", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },
                    "HS11", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 11, 0, 0, 0 },
                    },
                    "HS13", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 13, 0, 0, 0 },
                    },
                    "HS14", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 14, 0, 0, 0 },
                    },
                    //HS15 is phantom port (port address 15 not used)
                    "SSP6", Package()
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 21, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF
 
Top