tylernguyen / x1c6-hackintosh

READMEs, OpenCore configurations, patches, and notes for the Thinkpad X1 Carbon 6th Gen 2018 Hackintosh
https://tylernguyen.github.io/x1c6-hackintosh/
The Unlicense
628 stars 110 forks source link

Cannnot wake up by keyboard #145

Closed ytlmike closed 3 years ago

ytlmike commented 3 years ago

I'm using your newest efi and it's runing just fine, i appreciate that. The only question i have is when it fall asleep, i can wake it only by pressing the power button or open the lid. How can i wake it by keyboard? Thanks if anyone could help. System: Mojave 10.14.6

tylernguyen commented 3 years ago

@ytlmike

That's the intended behavior, it's done to avoid instant wake issues and sleep isues.

You may wish to experiment by removing lines 264-287 from https://github.com/tylernguyen/x1c6-hackintosh/blob/main/patches/SSDT-Sleep.dsl

Remove those lines should allow you to wake via USB. However, in my experience, it also causes instant wake and random USB wake events during sleep. See https://dortania.github.io/OpenCore-Post-Install/usb/misc/instant-wake.html

Of course, those were the past and I haven't tested it again for a while. So let me know how it goes for you.

ytlmike commented 3 years ago

I think i've found something to resolve this, edit the dsl file :

Method (GPRW, 2, Serialized)
        {
            If (OSDW ())
            {
                Local0 = Package (0x02)
                {
                    0x00, 
                    0x00
                }

                Local0[0x00] = Arg0

                If (Arg0 == 0x6D)
                {
                    Local0[0x01] = 0x03
                    Return (Local0)
                }

                If (Arg1 >= 0x04)
                {
                    // Debug = Concatenate ("SLEEP: GPRW patched to 0x00: ", Arg1)

                    Local0[0x01] = 0x00
                }

                Return (Local0)
            }

            Return (ZPRW (Arg0, Arg1))
        }

I added a judgement, when arg0=0x6D, change Arg1 to 0x03,this may let external usb device can wake in s3 mode, it works fine yet, still testing.

tylernguyen commented 3 years ago

@ytlmike

Right, but as I've said. Not being able to wake by USB was done on purpose. There's sleep problems when it's enabled. See https://github.com/tylernguyen/x1c6-hackintosh/issues/84 and https://dortania.github.io/OpenCore-Post-Install/usb/misc/instant-wake.html

Edit: With your edit. please test some sleep cycles (short and long) and paste the output of pmset -g log | grep -e "Sleep.*due to" -e "Wake.*due to"

ytlmike commented 3 years ago

There are indeed some problems. it works fine sometimes, but it will instant wake or fail to wake the other times. it's so difficult 🙉