Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Hi @RehabMan

I spoke with you yesterday re my system and following that discussion decided to install 10.13.2 which I have now done (HFS-J)

I would like to get USB working correctly but I would need help if you are prepared to do that. The guides are above my level of understanding, so I hope you will indulge me, I can follow instructions accurately and I have rudimentary knowledge, willing to learn.

I have set in BIOS XHCI mode to enabled as suggested.

Re port discovery, I went through this previously when you helped me with an injector Kext (For El Capitan). I identified the ports as below

View attachment 307582
I may be asking a stupid question, but I identified these I believe when on EHC so do I need to do the whole thing again while on XHC? Hope that makes sense

EDIT, ATTACHED FILES

Your ioreg shows that you forgot to use the port limit patch.
As per post #1, you must use the port limit patch during port discovery as without it, you will not be able to accurately record the ports which are used.
 
well, i cant. i tried this code :

// Disabling EHCI #1

DefinitionBlock("", "SSDT", 2, "hack", "D-EHCI", 0)
{
External(_SB.PCI0, DeviceObj)
External(_SB.PCI0.EH01, DeviceObj)
External(_SB.PCI0.LPCB, DeviceObj)

// registers needed for disabling EHC#1
Scope(_SB.PCI0.EH01)
{
OperationRegion(RMP1, PCI_Config, 0x54, 2)
Field(RMP1, WordAcc, NoLock, Preserve)
{
PSTE, 2 // bits 2:0 are power state
}
}
Scope(_SB.PCI0.LPCB)
{
OperationRegion(RMP1, PCI_Config, 0xF0, 4)
Field(RMP1, DWordAcc, NoLock, Preserve)
{
RCB1, 32, // Root Complex Base Address
}
// address is in bits 31:14
OperationRegion(FDM1, SystemMemory, (RCB1 & Not((1<<14)-1)) + 0x3418, 4)
Field(FDM1, DWordAcc, NoLock, Preserve)
{
,13, // skip first 13 bits
FDE2,1, // should be bit 13 (0-based) (FD EHCI#2)
,1,
FDE1,1, // should be bit 15 (0-based) (FD EHCI#1)
}
}
Scope(_SB.PCI0)
{
Device(RMD2)
{
Name(_HID, "RMD20000")
Method(_INI)
{
// disable EHCI#1
// put EHCI#1 in D3hot (sleep mode)
^^EH01.PSTE = 3
// disable EHCI#1 PCI space
^^LPCB.FDE1 = 1
}
}
}
}

now I dont have usb2.0 ports, which seems obvious. but now how do they work now ?
i found ths code in one of your files:

External(_SB.PCI0.XHC, DeviceObj)

// inject properties for XHCI
Method(_SB.PCI0.XHC._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Local0 = Package()
{
"RM,pr2-force", Buffer() { 0, 0, 0, 0 },
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },
"AAPL,current-available", Buffer() { 0x34, 0x08, 0, 0 },
"AAPL,current-extra", Buffer() { 0x98, 0x08, 0, 0, },
"AAPL,current-extra-in-sleep", Buffer() { 0x40, 0x06, 0, 0, },
"AAPL,max-port-current-in-sleep", Buffer() { 0x34, 0x08, 0, 0 },
}
// force USB2 on XHC if EHCI is disabled
If (CondRefOf(\_SB.PCI0.RMD2) || CondRefOf(\_SB.PCI0.RMD3) || CondRefOf(\_SB.PCI0.RMD4))
{
CreateDWordField(DerefOf(Local0[1]), 0, PR2F)
PR2F = 0x3fff
}
Return(Local0)
}

but it didnt work.

what about Mux extension? should it be deleted from SLE? i did and nothing change, so i deleted.

Your ioreg shows no EH01. Therefore it is either disabled by the code in SSDT-NOEHCI.aml or disabled in BIOS.
Why do you think it is not working?
 
you recommended to disable ehci. so, now i dont have usb2 ports, thats what im asking you? whats next? it is disabled by ssdt-noehci.aml i know that.

why i think its not working? simply because if i connect anything to the usb2 port, it doesnt work . no webcam either.

i apreciate you're are trying to help me, but you're are no been too helpful since you dont propose more specific solutions.

i dont know anything about acpi programming.

i'm trying to find out and fix why a specific usb3 device doesnt work in sierra, while it works in windows and ubuntu in the same computer. it get detected and mounted using usb2 port. other usb3 devices are working ok.
thank you anyway
 
Last edited:
you recommended to disable ehci. so, now i dont have usb2 ports, thats what im asking you? whats next? it is disabled by ssdt-noehci.aml i know that.

Read post #1 for how to rediscover all ports and create custom SSDT for USBInjectAll.kext.
 
Your ioreg shows that you forgot to use the port limit patch.
As per post #1, you must use the port limit patch during port discovery as without it, you will not be able to accurately record the ports which are used.
Sorry, this is the port discovery I did previously when you helped me back when running El Capitan, same hardware, just now new OS. I used the port limit patch at that time. I may not understand this but with the ports identified, can I use this going forward or do I need to do the discovery all over again?
 
Sorry, this is the port discovery I did previously when you helped me back when running El Capitan, same hardware, just now new OS. I used the port limit patch at that time. I may not understand this but with the ports identified, can I use this going forward or do I need to do the discovery all over again?

Port discovery results will be completely different with EHCI disabled and FakePCIID_XHCIMux removed.
 
Port discovery results will be completely different with EHCI disabled and FakePCIID_XHCIMux removed.
OK so just to check, before I start the port discovery, I have BIOS XHCI set to enabled, correct?
Then I need to use the USB Inject All kext to show all the ports and then I can identify each one. Is this correct so far?
 
OK so just to check, before I start the port discovery, I have BIOS XHCI set to enabled, correct?

Yes... if you set xHCI mode to "Enabled", BIOS typically disables the EHCI controllers.
All USB will be handled on XHC in that scenario.

Then I need to use the USB Inject All kext to show all the ports and then I can identify each one. Is this correct so far?

Yes.
And you'll likely need the appropriate port limit patch.
 
Hey @RehabMan , I recently updated to High Sierra on my laptop and my system wasn't booting with my old ACPI patches, so I'm trying to redo everything. I can't get some of my USB ports working (bluetooth/audio aren't working). I've updated USBInjectAll to the latest one and added the port limits patch (prior to updating I had everything working with the SSDT that I've attached and am no longer using), but for some reason I'm missing, IOReg doesn't show full injection. I've attached problem reporting files. Thank you so much for your help!
 

Attachments

  • debug_8598.zip
    1.9 MB · Views: 67
  • SSDT-UIAC.aml
    427 bytes · Views: 111
Last edited:
Hey @RehabMan , I recently updated to High Sierra on my laptop and my system wasn't booting with my old ACPI patches, so I'm trying to redo everything. I can't get some of my USB ports working (bluetooth/audio aren't working). I've updated USBInjectAll to the latest one and added the port limits patch (prior to updating I had everything working with the SSDT that I've attached and am no longer using), but for some reason I'm missing, IOReg doesn't show full injection. I've attached problem reporting files. Thank you so much for your help!

Your ioreg shows SMBIOS truncation. Very common with certain Dell laptops.

You need config.plist/KernelAndKextPatches/DellSMBIOSPatch=true
 
Back
Top