gnodipac886 / MatebookXPro-hackintosh

Hackintosh Solution for the Huawei Matebook X Pro
https://www.tonymacx86.com/threads/guide-matebook-x-pro-2018-using-hotpatch-vituralsmc-10-14-x.278730/
257 stars 57 forks source link

created ssdt for proper USB injection; removed USBMap; added USBInjec… #70

Closed kian1991 closed 4 years ago

kian1991 commented 4 years ago

So after having the sleep issue related to USB Host Controller I decided to create a proper ssdt with only the necessary ports (tested with ioreg). So I replaced USBMap.kext with USBInjectAll.kext. Since then I had no sleep issues, but I will ofc observe it.

Some information to Note:

USB Ports Matebook X Pro - Hackintosh

Ports USB 2.0 | USB 3.0

kian1991 commented 4 years ago

Here is the uncompiled sourcecode:

// SSDT-UIAC for the Matebook X Pro
// XHC Hardware ID: 0x9d2f
// 
// Note:
// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)
// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)
// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)
//

DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "8086_9d2f", Package()  
            {
                "port-count", Buffer() { 18, 0, 0, 0 },
                "ports", Package()
                {
                    "HS01", Package() // USB C Left Back
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 1, 0, 0, 0 },
                    },
                    "HS02", Package() // USB B Right
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 2, 0, 0, 0 },
                    },
                    "HS03", Package() // USB C Left Front
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 3, 0, 0, 0 },
                    },
                    "HS05", Package() // internal Bluetooth
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS07", Package() // interneal HDCamera
                    {
                        "UsbConnector", 255,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "SS01", Package() // USB C Left Back
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 13, 0, 0, 0 },
                    },
                    "SS02", Package() // USB B Right
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 14, 0, 0, 0 },
                    },
                },
            },
        })
    }
}
//EOF
gnodipac886 commented 4 years ago

Very well done! Thanks!

hdamico commented 4 years ago

@kian1991 Tried your changes, sleep now works (it doesn't restart), but when it awakes the bluetooth stops working. Thanks for taking your time on this!

kian1991 commented 4 years ago

@hdamico I have this too occasionally, but i dont think its related to USBInjection. Its more about the BT Kext being in beta stage See #67