Contribute
Register

Wake from sleep using lid doens't work

Status
Not open for further replies.
Joined
Dec 10, 2013
Messages
159
Motherboard
Huawei Matebook D 2017
CPU
i5-7200U
Graphics
HD 620
I have this problem:
Wake from sleep using lid doesn't work.

If i use Apple-> Sleep everything is working as it should. The laptop goes to sleep. After some minutes i can wake without issues.

If i close the laptop lid and i wait some minutes (to be sure the laptop went in sleep mode) and open the lid again the laptop power up but the screen is black. Brightness keys don't work. The laptop is on for sure because i can hear sound when i press keys on my keyboard. It's just the screen that is black.
I saw this is a quite common issue but not sure which solution i could apply.

Thanks
 

Attachments

  • debug_7467.zip
    1.9 MB · Views: 55
i've done some more research :
tried to inject EDID without success.
tried various versions of WhateverGreen.
It seems like the internal video card is not powered up during the wake process but i can't understand why....
 
New update :
After sleep using the lid and opening it again i connected an external monitor. The laptop screen was still black but the external monitor had signal and i was able to login. Looking in IOREG i saw that there wasn't an AppleDisplayBacklight entry like there was before the sleep. It seems to me that when i close the lid the internal monitor is like disconnected. Is this possible ?
 
New update :
After sleep using the lid and opening it again i connected an external monitor. The laptop screen was still black but the external monitor had signal and i was able to login. Looking in IOREG i saw that there wasn't an AppleDisplayBacklight entry like there was before the sleep. It seems to me that when i close the lid the internal monitor is like disconnected. Is this possible ?

Attach ioreg that represents that scenario.
 
Attach ioreg that represents that scenario.
Attached you will find my PR file and the 2 ioreg named before and after.
It was not easy to take the after ioreg because even if the external display is switched on the laptop try to go back to sleep so from the wake and the login screen i've few seconds before the laptop goes sleep again.
 

Attachments

  • debug_20882.zip
    2 MB · Views: 48
  • IOreg.zip
    1.6 MB · Views: 51
Attached you will find my PR file and the 2 ioreg named before and after.
It was not easy to take the after ioreg because even if the external display is switched on the laptop try to go back to sleep so from the wake and the login screen i've few seconds before the laptop goes sleep again.

AppleBacklightDisplay disconnecting/disappearing across sleep/wake.
Might be something ACPI (DSDT) is doing.
 
AppleBacklightDisplay disconnecting/disappearing across sleep/wake.
Might be something ACPI (DSDT) is doing.
Could you point me in the right direction ? I tried to have a look at the _LID method for example but i don't have enough knowledge to fully understand what's going on or how to procede step by step and debug my dsdt.
Thanks

Mattia
 
Could you point me in the right direction ? I tried to have a look at the _LID method for example but i don't have enough knowledge to fully understand what's going on or how to procede step by step and debug my dsdt.
Thanks

Mattia

Since this happens only when you initiate sleep with lid, look at code related to lid status.
Sorry, I do not have time to do such a time consuming analysis for you.
 
Since this happens only when you initiate sleep with lid, look at code related to lid status.
Sorry, I do not have time to do such a time consuming analysis for you.

There is no need for apoligize, i know you're a busy man ! I just update this thread because i've found the solution to my problem (i was lucky searching this forum). You already helped a guy back in 2017 with the same problem :

The _LID method was identical to mine :
Code:
Method (_LID, 0, NotSerialized)  // _LID: Lid Status
                {
                    If (ECOK)
                    {
                        UPDL ()
                        Store (Zero, LDRT)
                    }
                    Return (LIDS)
                }
I just added as he did this line before the Return(LIDS) :
Code:
UPDL ()
and the sleep using lid is working great!
Now after that discovery you suggested him to find out what UPDL method is doing but this is out of my knowledge. In my DSDT here is the UPDL Method code :
Code:
Method (UPDL, 0, NotSerialized)
            {
                If (\_SB.PCI0.LPCB.EC0.LSTE)
                {
                    Store (Zero, LIDS)
                }
                Else
                {
                    Store (One, LIDS)
                }
            }
Looking at the \_SB.PCI0.LPCB.EC0 here is what i've found but that doesn't mean anything to me :
Code:
Offset (0x16),
                RGC6,   1,
                IGC6,   1,
                ENSG,   1,
                    ,   1,
                MIMT,   1,
                LSTE,   1,

I'm happy to have solved my issue i'm just updating the thread to report my discover and let you know what i've found.
Thanks again for the help!
Mattia

P.S. If you want me to further investigate just tell me what to do and i will.
 
There is no need for apoligize, i know you're a busy man ! I just update this thread because i've found the solution to my problem (i was lucky searching this forum). You already helped a guy back in 2017 with the same problem :

The _LID method was identical to mine :
Code:
Method (_LID, 0, NotSerialized)  // _LID: Lid Status
                {
                    If (ECOK)
                    {
                        UPDL ()
                        Store (Zero, LDRT)
                    }
                    Return (LIDS)
                }
I just added as he did this line before the Return(LIDS) :
Code:
UPDL ()
and the sleep using lid is working great!
Now after that discovery you suggested him to find out what UPDL method is doing but this is out of my knowledge. In my DSDT here is the UPDL Method code :
Code:
Method (UPDL, 0, NotSerialized)
            {
                If (\_SB.PCI0.LPCB.EC0.LSTE)
                {
                    Store (Zero, LIDS)
                }
                Else
                {
                    Store (One, LIDS)
                }
            }
Looking at the \_SB.PCI0.LPCB.EC0 here is what i've found but that doesn't mean anything to me :
Code:
Offset (0x16),
                RGC6,   1,
                IGC6,   1,
                ENSG,   1,
                    ,   1,
                MIMT,   1,
                LSTE,   1,

I'm happy to have solved my issue i'm just updating the thread to report my discover and let you know what i've found.
Thanks again for the help!
Mattia

P.S. If you want me to further investigate just tell me what to do and i will.

You might want to investigate why ECOK is not set non-zero.
Typically, it is set in _REG upon activation of the EC host driver.
 
Status
Not open for further replies.
Back
Top