https://github.com/trulyspinach/SMCAMDProcessor kernel cause my problem. Disable it can manual sleepUsually an USB device misbehaving and blocking transition into low power state.
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200110 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLLROC6Y.aml, Tue Jun 2 23:30:47 2020
*
* Original Table Header:
* Signature "SSDT"
* Length 0x0000007B (123)
* Revision 0x02
* Checksum 0x9D
* OEM ID "APPLE "
* OEM Table ID "XHC"
* OEM Revision 0x00001000 (4096)
* Compiler ID "INTL"
* Compiler Version 0x20200110 (538968336)
*/
DefinitionBlock ("", "SSDT", 2, "APPLE ", "XHC", 0x00001000)
{
External (_SB_.PCI0.GP13, DeviceObj)
External (_SB_.PCI0.GP13.XHC0, DeviceObj)
If (_OSI ("Darwin"))
{
Scope (\_SB.PCI0.GP13.XHC0)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (Zero)
}
}
}
}
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200110 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLa7UBoh.aml, Tue Jun 2 23:12:41 2020
*
* Original Table Header:
* Signature "SSDT"
* Length 0x000001A4 (420)
* Revision 0x02
* Checksum 0x7E
* OEM ID "Slav"
* OEM Table ID "SHC0"
* OEM Revision 0x00000000 (0)
* Compiler ID "INTL"
* Compiler Version 0x20200110 (538968336)
*/
DefinitionBlock ("", "SSDT", 2, "Slav", "SHC0", 0x00000000)
{
External (_SB_.PCI0.GPP2, DeviceObj)
External (_SB_.PCI0.GPP2.PTXH, DeviceObj)
External (DTGP, MethodObj) // 5 Arguments
Scope (\_SB.PCI0.GPP2)
{
Scope (PTXH)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (Zero)
}
Else
{
Return (0x0F)
}
}
}
Device (SHC1)
{
Name (_ADR, Zero) // _ADR: Address
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If ((Arg2 == Zero))
{
Return (Buffer (One)
{
0x03 // .
})
}
Local0 = Package (0x1B){}
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (_OSI ("Darwin"))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
{
Return (Package (0x02)
{
0x6D,
0x03
})
}
Device (POT1)
{
Name (_ADR, One) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
0x03,
Zero,
Zero
})
}
Device (POT5)
{
Name (_ADR, 0x05) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
Zero,
Zero,
Zero
})
}
Device (POT2)
{
Name (_ADR, 0x02) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
0x03,
Zero,
Zero
})
}
Device (POT6)
{
Name (_ADR, 0x06) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
Zero,
Zero,
Zero
})
}
Device (POT9)
{
Name (_ADR, 0x09) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
Zero,
Zero,
Zero
})
}
Device (PO10)
{
Name (_ADR, 0x0A) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
Zero,
Zero,
Zero
})
}
Device (PO12)
{
Name (_ADR, 0x0C) // _ADR: Address
Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities
{
0xFF,
Zero,
Zero,
Zero
})
}
}
}
}
Hi,
The workaround I found is to disable XHC0 with a SSDT and disconnect all USB devices from the "PRT" ports before triggering sleep.
USB-MAP.kext on XHC0 or PTXH does not resolve the sleep issue.
I cannot use the USB-Map.kext only anyway because the PO12 port used by the bluetooth module is not active in the DSDT, so I had to define the ports in a SSDT too.
My config: MSI B450i Gaming Plus AC (7A40vAB)| R9 3900X | BCM94352Z NGFF Wireless card |RX 5700XT | MacPro7,1 | OC 0.5.9 | macOS 10.15.5
I tried so many different approaches: SSDTs+USB-MAP, USB-Map just for XHC0, changing the voltage values in SSDT-USBX or the USB-MAP.kext, I could not get the Hack to sleep as long as XHC0 appears in IOReg.
On the MSI B450i Gaming Plus AC, the XHC0 controller handles the internal USB headers and the to ports on the same block as the Ethernet connector.
SSDT-disable-XHC0.aml
SSDT-PTXH_to_SHC1.amlCode:/* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20200110 (64-bit version) * Copyright (c) 2000 - 2020 Intel Corporation * * Disassembling to symbolic ASL+ operators * * Disassembly of iASLLROC6Y.aml, Tue Jun 2 23:30:47 2020 * * Original Table Header: * Signature "SSDT" * Length 0x0000007B (123) * Revision 0x02 * Checksum 0x9D * OEM ID "APPLE " * OEM Table ID "XHC" * OEM Revision 0x00001000 (4096) * Compiler ID "INTL" * Compiler Version 0x20200110 (538968336) */ DefinitionBlock ("", "SSDT", 2, "APPLE ", "XHC", 0x00001000) { External (_SB_.PCI0.GP13, DeviceObj) External (_SB_.PCI0.GP13.XHC0, DeviceObj) If (_OSI ("Darwin")) { Scope (\_SB.PCI0.GP13.XHC0) { Method (_STA, 0, NotSerialized) // _STA: Status { Return (Zero) } } } }
Code:/* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20200110 (64-bit version) * Copyright (c) 2000 - 2020 Intel Corporation * * Disassembling to symbolic ASL+ operators * * Disassembly of iASLa7UBoh.aml, Tue Jun 2 23:12:41 2020 * * Original Table Header: * Signature "SSDT" * Length 0x000001A4 (420) * Revision 0x02 * Checksum 0x7E * OEM ID "Slav" * OEM Table ID "SHC0" * OEM Revision 0x00000000 (0) * Compiler ID "INTL" * Compiler Version 0x20200110 (538968336) */ DefinitionBlock ("", "SSDT", 2, "Slav", "SHC0", 0x00000000) { External (_SB_.PCI0.GPP2, DeviceObj) External (_SB_.PCI0.GPP2.PTXH, DeviceObj) External (DTGP, MethodObj) // 5 Arguments Scope (\_SB.PCI0.GPP2) { Scope (PTXH) { Method (_STA, 0, NotSerialized) // _STA: Status { If (_OSI ("Darwin")) { Return (Zero) } Else { Return (0x0F) } } } Device (SHC1) { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method { If ((Arg2 == Zero)) { Return (Buffer (One) { 0x03 // . }) } Local0 = Package (0x1B){} DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Method (_STA, 0, NotSerialized) // _STA: Status { If (_OSI ("Darwin")) { Return (0x0F) } Else { Return (Zero) } } Method (_PRW, 0, NotSerialized) // _PRW: Power Resources for Wake { Return (Package (0x02) { 0x6D, 0x03 }) } Device (POT1) { Name (_ADR, One) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, 0x03, Zero, Zero }) } Device (POT5) { Name (_ADR, 0x05) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, Zero, Zero, Zero }) } Device (POT2) { Name (_ADR, 0x02) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, 0x03, Zero, Zero }) } Device (POT6) { Name (_ADR, 0x06) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, Zero, Zero, Zero }) } Device (POT9) { Name (_ADR, 0x09) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, Zero, Zero, Zero }) } Device (PO10) { Name (_ADR, 0x0A) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, Zero, Zero, Zero }) } Device (PO12) { Name (_ADR, 0x0C) // _ADR: Address Name (_UPC, Package (0x04) // _UPC: USB Port Capabilities { 0xFF, Zero, Zero, Zero }) } } } }
Note: The port types values might change from Mobo to Mobo.
Note 2: After disabling XHC0, the ports are still show-up in IOReg and are still functional. I just can't let anything plugged before sleep.
Note 3: Another cause of the sleep issue for me was the SMCAMDProcessor.kext. Thanks @kokokobe for that!
Note 4: I'm no ACPI patching expert, and I'm eager to learn. So if you spot an error in the code, please let me know what and why.
I hope it helps until someone figures out the code to support the AMD controllers.
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Sleep current (mA): 500
I looked into the /System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns/AppleUSBHostPlatformProperties.kext/Contents/Info.plistYou might think that you could also override the values provided by IOUSBHostFamily.kext/Contents/Info.plist in the case a supported SMBIOS is being used. But unfortunately, that is not the case... the values in IOUSBHostFamily.kext/Contents/Info.plist override those that are provided by USBX.