Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Jun 1, 2010
Messages
60
Motherboard
Gigabyte Designare Z390
CPU
I9-9900K
Graphics
RX 580
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?
 
Joined
May 25, 2018
Messages
10
Motherboard
Z87
CPU
i5-4690K
Graphics
HD4600
Mac
iMac, MacBook Air
Mobile Phone
iOS
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?
 
Joined
Oct 30, 2018
Messages
222
Motherboard
GIGABYTE Z370 AORUS Gaming 7
CPU
i7-8700K
Graphics
RX 580
Mac
iMac, MacBook, MacBook Pro, Mac mini, Mac Pro
Classic Mac
eMac, iMac, Performa
Mobile Phone
Android, iOS
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:
Joined
Sep 22, 2011
Messages
243
Motherboard
Thinkpad T61-Clover
CPU
T9300/ICH8M
Graphics
Quadro NVS 140m, 1280x800
Mac
MacBook Pro
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

Feartech

Moderator
Joined
Aug 3, 2013
Messages
11,180
Motherboard
Asus N752VX-Clover
CPU
i7-6700HQ / HM170
Graphics
HD530 + GTX 950m 1920 x 1080
Mac
iMac
Mobile Phone
Android
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
 
Joined
Sep 22, 2011
Messages
243
Motherboard
Thinkpad T61-Clover
CPU
T9300/ICH8M
Graphics
Quadro NVS 140m, 1280x800
Mac
MacBook Pro
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

Last edited:
Joined
Sep 22, 2011
Messages
243
Motherboard
Thinkpad T61-Clover
CPU
T9300/ICH8M
Graphics
Quadro NVS 140m, 1280x800
Mac
MacBook Pro
@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

Last edited:
Joined
Sep 22, 2011
Messages
243
Motherboard
Thinkpad T61-Clover
CPU
T9300/ICH8M
Graphics
Quadro NVS 140m, 1280x800
Mac
MacBook Pro
@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!
 
Joined
Dec 16, 2016
Messages
69
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
iMac, MacBook Pro, Mac mini
Mobile Phone
Android
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
 
Top