Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Great post about usb 3, but this is way too crazy for me to get in to....
 
Dear all,

Would it be possible to disable a specific port of an internal MB USB2.0 hub?
I'm trying to disable port with location ID = 0x14930000 under HS13 (H150i because it breakes sleep) - see ioreg attached, while still using the other ones (e.g. BRCM20702).
One option would be to simply disconnect the cable to the cooler but I still want to use it in Windows...

Thanks!

Is this possible?
 
Code:
//
// Disabling EHCI #1
//
    External(_SB.PCI0, DeviceObj)
    External(_SB.PCI0.LPCB, DeviceObj)
    External(_SB.PCI0.EH01, DeviceObj)
    Scope(_SB.PCI0)
    {
        // registers needed for disabling EHC#1
        Scope(EH01)
        {
            OperationRegion(PSTS, PCI_Config, 0x54, 2)
            Field(PSTS, WordAcc, NoLock, Preserve)
            {
                PSTE, 2  // bits 2:0 are power state
            }
        }
        Scope(LPCB)
        {
            OperationRegion(RMLP, PCI_Config, 0xF0, 4)
            Field(RMLP, DWordAcc, NoLock, Preserve)
            {
                RCB1, 32, // Root Complex Base Address
            }
            // address is in bits 31:14
            OperationRegion(FDM1, SystemMemory, Add(And(RCB1,Not(Subtract(ShiftLeft(1,14),1))),0x3418), 4)
            Field(FDM1, DWordAcc, NoLock, Preserve)
            {
                ,15,    // skip first 15 bits
                FDE1,1, // should be bit 15 (0-based) (FD EHCI#1)
            }
        }
        Device(RMD1)
        {
            //Name(_ADR, 0)
            Name(_HID, "RMD10000")
            Method(_INI)
            {
                // disable EHCI#1
                // put EHCI#1 in D3hot (sleep mode)
                Store(3, ^^EH01.PSTE)
                // disable EHCI#1 PCI space
                Store(1, ^^LPCB.FDE1)
            }
        }
    }
}
//EOF

I have a Z87 using iMac15,1. It has both EH01 and EH02 but there are no used ports so I removed EH01/02/HUB1/2 from my UIAC.dsl and configured the XHCI ports.

Since no ports are in use on EH01/02/HUB1/2 the system sleeps fine however, I was wondering if it would be better to remove the EHCI as you have and if so, how would I modify this to also disable EH02?
 
ASUS TUF Z390 PRO GAMING.

Trying to set up SSDT following the guide. After several attempts, I realize that I am missing something important somewhere. But, cannot find what it is.

Can anyone spot my error(s) or point me in the right direction?
Solved by referring to the guide posted by @UtterDisbelief - covers recent developments.
 
Last edited:
IORegistryExplorer indicates that the portType for Port 5 of my EHC1 Hub (EH01.PR11.HP15) is 0x00. According to Rehabman's USBInjectAll guide for creating a custom UIAC-SSDT, portType 0 is "a normal external USB2 port" even though this port is used by an internal Bluetooth device. I'd like to set this port to internal (portType=2) to see if it resolves the sleep issue on my Dell Latitude E6410. Is it possible to set the port type of USB ports on the EHCx hubs? My custom SSDT-UIAC.dsl is also attached.

Thank you.
 

Attachments

  • Screen Shot 2019-07-12 at 12.51.54 PM.png
    Screen Shot 2019-07-12 at 12.51.54 PM.png
    25.5 KB · Views: 70
  • SSDT-UIAC.zip
    1.2 KB · Views: 68
IORegistryExplorer indicates that the portType for Port 5 of my EHC1 Hub (EH01.PR11.HP15) is 0x00. According to Rehabman's USBInjectAll guide for creating a custom UIAC-SSDT, portType 0 is "a normal external USB2 port" even though this port is used by an internal Bluetooth device. I'd like to set this port to internal (portType=2) to see if it resolves the sleep issue on my Dell Latitude E6410. Is it possible to set the port type of USB ports on the EHCx hubs? My custom SSDT-UIAC.dsl is also attached.

Thank you.
should be 255 if it is internal and your bluetooth card is attached to is
 
should be 255 if it is internal and your bluetooth card is attached to is
EDIT - @Feartech - I agreed too quickly. I believe that usbConnector value for the hub should be 255 and the portType of each port (on the hub) should be either 0 or 2 (for external and internal respectively). In Rehabman's SSDT-UIAC-ALL.dsl example, he uses values of 0 and 255 for UsbConnector and portType = 0 (although his notes at the top of the file indicate portType value of 2 is Internal).

Rehabman's SSDT-UIAC template does not provide an example for setting the portType of USB ports on the EHCx hub (it only provides a way to set the portType of the hub itself). See attached screen shot showing that the EHC1 hub does in fact have a portType of 2. All USB ports off of the hub have portType = 0.
 

Attachments

  • Screen Shot 2019-07-12 at 1.41.32 PM.png
    Screen Shot 2019-07-12 at 1.41.32 PM.png
    32.8 KB · Views: 71
Last edited:
@Feartech I figured out how to set the portType for ports off of the EHCx hub. Rehabman's SSDT-UIAC-ALL.dsl file includes portTypes for HUB1 and HUB2 at the beginning of the file. I never realized that these defined the portType for ports off of the EHCx hubs. My revised SSDT-UIAC.dsl (attached) changes the internal ports to portType=2 as shown in the screenshot.

EDIT: I uncommented the UsbConnector values for the HUB1 USB ports and see that each of the USB ports on USB hub EHC1 now has a USB Connector value. I set the USB connector value to 0 for external USB 2.0 ports and 255 for internal ports (like the Bluetooth USB port). The updated IORegistryExplorer screen shot and SSDT-UIAC.dsl is attached.
 

Attachments

  • Screen Shot 2019-07-12 at 3.54.41 PM.png
    Screen Shot 2019-07-12 at 3.54.41 PM.png
    47.8 KB · Views: 64
  • SSDT-UIAC.zip
    1.3 KB · Views: 72
Last edited:
@RehabMan Would it be possible to request the addition of MacBookPro5,1 to USBInjectAll.kext/Contents/Info.plist? I am running High Sierra 10.13.6 (and Mojave 10.14.5) on my Thinkpad T61 emulating a MacBookPro5,1 (using CLOVER -no_compat_check). CPU Performance Management is better as a MacBookPro5,1 than it was as a MacBookPro6,1 or MacBookPro7,1. I have modified the Info.plist in my version of USBInjectAll.kext by duplicating the entries for MacBookPro7,1 and replacing "MacBookPro7,1" with "MacBookPro5,1".

I don't mind manually editing the Info.plist this way, but if you believe it makes sense to add the MacBookPro5,1 , that would be great. Thanks for all the great work you do!
 
I need help to create my ssdt file.
I have a msi z370 gaming pro carbon motherboard
I have tested all the doors and this is the result:
Internal doors 2.0
HS07 - HS08
HS11 - HS12
Internal doors 3.1
HS05 / SS01 - HS06 / SS02
HS03 / SS03 - HS04 / SS04
External doors only 2.0
HS09
HS10
External doors 3.1
HS01 / SS07
HS02 / SS08
HS13 / SS06
HS14 / SS05
3.1 external ports connected to ASMedia-ASM3142:
RP05 ----> SSS2 / HSS2 Type A
RP05 ----> SSS1 / HSS1 Type C

As I have to proceed, my processor is an 8700K. My main question is with the ports connected to the ASMedia chipset even if it is detected in the PCI0 tree. And a correct file for my ID.

P.s. my XHC device- ID is <af a2 00 00>
Hi did you solve it? I am facing the same problem with z270 pro carbon
 
Back
Top