- Joined
- Jun 13, 2012
- Messages
- 152
- Motherboard
- Lenovo Ideapad Y510P
- CPU
- i7 4700MQ
- Graphics
- HD4600
- Mobile Phone
Hi,
I'm trying to fix sleep on LID close and wake on LID open. There are many threads/posts online about similar issues so I tried to gather as much information to get a wider idea on the problem. My system appears in my signature and almost everything is working. Especially I note power management, sleep, brightness control (so backlit works), and graphics.
Before I go on, I am aware of the patch that remove LID0._PRW. I tried it and was able to get sleep on LID close but of course wake on LID open will not work in this case at all as my understanding and also as stated in the patch. So I consider this patch as a workaround for those who can't actually fix LID+sleep/wake issues. And what I'm after is to fix both ways (if possible) without this patch.
In my DSDT, I find the _PRW returns 0x1F which corresponds to a method _L1F in _GPE so I guess this is where my attempts to fix should be. I patched my DSDT with debug methods, instrument EC queries, instrument GPE queries, instrument LID0._LID, and instrument _WAK/_PTS too.
This is the code for LID0:
And this is the code for method _GPE._L1F:
I'm not sure where to start from since without Remove LID0._PRW patch both ways are broken. But as a start here's a scenario:
1. I booted without Remove LID0._PRW patch
2. I put the system to sleep manually (while closing the LID before it sleeps completely)
3. System went to sleep but automatically woke up because of the LID:
4. After system woke up backlit did not work
5. I put it to sleep again using keyboard shortcut then woke it up with a keystroke. Backlit worked this time.
This is the logs for the whole process:
I see no mention here for GPE _L1F but no much of work with LID happened in the scenario anyway. When I apply the Remove LID0._PRW patch I see GPE _L1F enter but not exit and of course no wake on LID open.
EDIT:
I tried with the poll for LID changes patch (and ACPIPoller.kext). The system was able to sleep on LID close but immediately woke up and wake reason was LID0. I think this is better than removing _PWR as it allows a working sleep with the possibility to fix wake on LID, if I'm not wrong though.
I'm attaching the IOREG and my native DSDT ..
Thanks in advance
I'm trying to fix sleep on LID close and wake on LID open. There are many threads/posts online about similar issues so I tried to gather as much information to get a wider idea on the problem. My system appears in my signature and almost everything is working. Especially I note power management, sleep, brightness control (so backlit works), and graphics.
Before I go on, I am aware of the patch that remove LID0._PRW. I tried it and was able to get sleep on LID close but of course wake on LID open will not work in this case at all as my understanding and also as stated in the patch. So I consider this patch as a workaround for those who can't actually fix LID+sleep/wake issues. And what I'm after is to fix both ways (if possible) without this patch.
In my DSDT, I find the _PRW returns 0x1F which corresponds to a method _L1F in _GPE so I guess this is where my attempts to fix should be. I patched my DSDT with debug methods, instrument EC queries, instrument GPE queries, instrument LID0._LID, and instrument _WAK/_PTS too.
This is the code for LID0:
Code:
Scope (_SB)
{
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) // _HID: Hardware ID
Method (LIDX, 0, NotSerialized) // _LID: Lid Status
{
Notify (^^PCI0.PEG0.PEGP, 0xDB)
Return (GP15)
}
Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake
{
0x1F,
0x03
})
Method (_LID, 0, NotSerialized)
{
\rmdt.p1("LID0._LID enter")
Store(LIDX(), Local0)
\rmdt.p2("LID0._LID returning", Local0)
Return(Local0)
}
}
}
And this is the code for method _GPE._L1F:
Code:
Method (_L1F, 0, NotSerialized) // _Lxx: Level-Triggered GPE
{
\rmdt.p1("GPE _L1F enter")
If (GP15)
{
Or (GIV1, 0x80, GIV1)
}
Else
{
And (GIV1, 0x7F, GIV1)
}
If (IGDS)
{
If (\_SB.PCI0.IGPU.GLID (LAnd (GIV1, 0x80)))
{
Or (0x80000000, \_SB.PCI0.IGPU.CLID, \_SB.PCI0.IGPU.CLID)
}
}
Notify (\_SB.LID0, 0x80)
\rmdt.p1("GPE _L1F exit")
}
I'm not sure where to start from since without Remove LID0._PRW patch both ways are broken. But as a start here's a scenario:
1. I booted without Remove LID0._PRW patch
2. I put the system to sleep manually (while closing the LID before it sleeps completely)
3. System went to sleep but automatically woke up because of the LID:
Code:
12/04/2015 21:35:53.000 kernel[0]: Wake reason: LID0
5. I put it to sleep again using keyboard shortcut then woke it up with a keystroke. Backlit worked this time.
This is the logs for the whole process:
Code:
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "_PTS enter", 0x3, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "_PTS enter", 0x3, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "_PTS exit"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "_PTS exit"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "_WAK enter", 0x3, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "_WAK enter", 0x3, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "_WAK exit"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "_WAK exit"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "LID0._LID enter"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "LID0._LID returning", 0x1, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "LID0._LID enter"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: { "LID0._LID returning", 0x1, }
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "GPE _L1E enter"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "EC _Q25 enter"
12/04/2015 21:36:45.000 kernel[0]: ACPIDebug: "GPE _L1E enter"
12/04/2015 21:36:47.000 kernel[0]: ACPIDebug: "EC _Q25 exit"
I see no mention here for GPE _L1F but no much of work with LID happened in the scenario anyway. When I apply the Remove LID0._PRW patch I see GPE _L1F enter but not exit and of course no wake on LID open.
EDIT:
I tried with the poll for LID changes patch (and ACPIPoller.kext). The system was able to sleep on LID close but immediately woke up and wake reason was LID0. I think this is better than removing _PWR as it allows a working sleep with the possibility to fix wake on LID, if I'm not wrong though.
I'm attaching the IOREG and my native DSDT ..
Thanks in advance