Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,714
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Sorry for my English
Recently,I found an app named “FBPatcher”. it could help user to get a kext for usbport injecting.
1, Boot OSX to with USB limitedremoved kext to patch in config.plist, and usbinjectall.kext in /other

2, Open “FBPatcher” ,select “ USB” logo button,and in “genneral”,you would find usbport.

3, Use USB3.0 and USB2.0 hardware to test each USB port of your PC,and the port that had be used would be colored,Changed port connector to their real one,noticed that USB3 port having two connectors:USB2.0 and USB3.0.

4,Delete the ports that didnot be colored,click “export” logo button, you would get a kext named “USBPorts.kext” on desktop.

5, Copy “USBPorts.kext” to /other ,and delete “usbinjectall.kext‘, and reboot. Done!
Yes, the app and a USB port injector codeless kext generated by it can do the same thing as USBInjectAll + custom SSDT.
But it is not the technique employed by this guide.
 
Joined
Mar 4, 2014
Messages
264
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
If that port is directly connected to the controller, yes.
It is quite common for such ports to be connected to an internal hub, which is, in turn, connected to the controller, so of course in that case it is internal.



Same question regarding the potential for an interconnected internal hub.
If that port is directly connected to the controller, yes.
It is quite common for such ports to be connected to an internal hub, which is, in turn, connected to the controller, so of course in that case it is internal.



Same question regarding the potential for an interconnected internal hub.
Thank you. I wasn't understanding internal, think I do now. I've updated the SSDT-UIAC.aml attached and think I now have this correct. I've attached problem reporting files, would you be kind enough to tell me if you see anything I have missed in configuring my USB?
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,714
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Thank you. I wasn't understanding internal, think I do now. I've updated the SSDT-UIAC.aml attached and think I now have this correct. I've attached problem reporting files, would you be kind enough to tell me if you see anything I have missed in configuring my USB?
Why is HS07 marked internal, but nothing attached to it?
The hub at HS10 is an external (USB2) hub you plugged in?
 
Joined
Mar 4, 2014
Messages
264
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
Why is HS07 marked internal, but nothing attached to it?
The hub at HS10 is an external (USB2) hub you plugged in?
HS07/HS08 is what my Multi Card Reader is plugged into on the mobo. I cant tell you the model as it has no markings. I set as internal as I thought they usually were, if this sounds wrong, how do I determine what to set this as?

The hub at HS10 is my Anker 4 port USB 3 Hub, pictured below have I made a mistake here?

68ANHUB-02S4A_ND01.jpg
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,714
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
HS07/HS08 is what my Multi Card Reader is plugged into on the mobo. I cant tell you the model as it has no markings. I set as internal as I thought they usually were, if this sounds wrong, how do I determine what to set this as?
If it is a device that is not present until you plug something into it, it should NOT be marked internal.

The hub at HS10 is my Anker 4 port USB 3 Hub, pictured below have I made a mistake here?
It is USB2-only?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,714
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
No, it's a USB 3 hub, connected to HS10/SSP06,
Something is wrong then... your ioreg shows nothing at SSP6.
If this is a USB3 hub and HS10/SSP6 are associated, expect to see a hub also at SSP6 with that device plugged in.
Maybe it was a one-off glitch.
 
Joined
Mar 4, 2014
Messages
264
Motherboard
GA-Z87-HD3
CPU
i5-4570
Graphics
GT 640
Mac
iMac
Mobile Phone
iOS
Something is wrong then... your ioreg shows nothing at SSP6.
If this is a USB3 hub and HS10/SSP6 are associated, expect to see a hub also at SSP6 with that device plugged in.
Maybe it was a one-off glitch.
So I opened IOReg and connected/disconnected a USB 2 Stick to my 4 port Anker Hub and I saw this on HS10:

Screen Shot 2018-10-22 at 20.37.45.png


Then connected a USB 3 Stick in the same slot on the hub and saw this:

Screen Shot 2018-10-22 at 20.37.13.png


Is that as expected? Copy of IOReg these images taken from attached
 

Attachments

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,714
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
So I opened IOReg and connected/disconnected a USB 2 Stick to my 4 port Anker Hub and I saw this on HS10:

View attachment 359678

Then connected a USB 3 Stick in the same slot on the hub and saw this:

View attachment 359679

Is that as expected? Copy of IOReg these images taken from attached
Are you trying to say the hub at SSP6 doesn't show until you plug something (eg. a USB3 device) into it?
If that is the case, then it is working fine. It is probably some sort of power saving mechanism built in to the device.
 
Joined
Oct 24, 2010
Messages
110
Motherboard
X58A-UD5
CPU
i7-930
Graphics
HD 4870
Mac
iMac, Mac Pro
Mobile Phone
iOS
@RehabMan Tried again so here goes
Code:
USB LayOut Z77X-UD5H rev.1
MotherBoard Rear IO
4 USB3 Ports (Blue)
2 USB2 Ports (Red)

Case
2 Front USB3 Ports connected to USB3 Header on MB
2 Front USB2 Pors connected to USB2 Header on MB

Port Identification
USB2
2 Front USB2 Ports > EH01>PR11>HP15(Left@1d150000) | EH01>PR11>HP16(Right@@1d160000)
2 Rear USB2 Ports  > EH02>PR21>HP22(Left@1a120000) | EH02>PR21>HP21(Right@@1a110000)

USB3
2 Front USB3 Ports > XHC>SSP7(Left@14740000/Right@14730000)
4 Rear USB3 Ports > XHC>SSP8 (T.Left@14810000.T.Right@14820000) | (B.Left@14830000.B.Right@14840000)

USB3 Stick Inserted into Front USB2 Ports (Case)
EH01>PR11>HP15(Left@1d150000) EH01>PR11>HP16(Right@@1d160000)

USB3 Stick Inserted into Rear USB2 (MB)
EH02>PR21>HP22(Left@1a120000) | EH02>PR21>HP21(Right@@1a110000)

USB2 Stick Inserted into Rear USB3 (MB)
EH02>PR21>HP23(T.Left@1a130000) | EH02>PR21>HP24(T.Right@1a140000)
EH01>PR11>PRT3(B.Left@1d130000) | EH01>PR11>HP14(B.Right@1d140000)

USB2 Stick Inserted into Front USB3 Ports (Case)
EH02>PR21>HP25(Left@1a1540000) | EH02>PR21>HP25(Right@@1a1530000)
Attached is IOReg Dump with nothing plugged inland as I go along (Remote Desktop).From that dump looks like EH02>PR21>HP22/HP26 are internal Hubs so that should be 255 or left at 0?As for XHC>SSP7/SSP8 that must be 255 right?Here is what I came up with
Code:
// Initial trimmed SSDT-UIAC.dsl for Z77X-UD5H Rev.1.0
//
// Note:
// PRT1-3 Needs to be removed due to SMBIOS Definition.Edit Info.plist
// in S/L/E.IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBHub.kext
// When a USB2 Stick is Plugged into the Rear Left USB3 Port it comes up in
// PRT3.
//

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()
                {
                    "HP14", Package() // Rear Bottom Right USB3, USB2 Plugged In
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP15", Package() // Front Left USB2
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HP16", Package() // Front Right USB2
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                },
            },
            "HUB2", Package()
            {
                "port-count", Buffer() { 6, 0, 0, 0 },
                "ports", Package()
                {
                    "HP21", Package() // Rear Right USB2
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HP22", Package() // Rear Left USB2
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HP23", Package() // Rear Top Left USB3, USB2 Plugged In
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HP24", Package() // Rear Top Right USB3, USB2 Plugged In
                    {
                        //"UsbConnector", 0,
                        "portType", 0,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HP25", Package() // Front Left/Right USB3 Port, USB2 Plugged In
                    {
                        //"UsbConnector", 255,
                        "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_1e31", Package()
            {
                "port-count", Buffer() { 8, 0, 0, 0 },
                "ports", Package()
                {
                    "SSP7", Package() // Front 2USB3
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "SSP8", Package() // Rear 4USB3
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF
As for PRT3 I'm not sure which entries exactly I must remove.Is it Both entries under Ports? Remove Ports>PRT1,2,3 then remove Ports>PRT1?
View media item 191127View media item 191127
 

Attachments

Top