You are not logged in.
I'm using acpid with s2ram to have my laptop suspend to ram when I close the lid.
This works fine... 50% of the time.
Here is what happen:
If the s2ram command is commented in my /etc/acpi/actions/lid.sh, and I run an acpi_listen in a terminal, I can see that each time I close or open the lid, the last number is incremented by 1:
button/lid LID 00000080 00000001
button/lid LID 00000080 00000002
button/lid LID 00000080 00000003
button/lid LID 00000080 00000004
button/lid LID 00000080 00000005
If the s2ram is NOT commented in my /etc/acpi/actions/lid.sh and I run acpi_listen in a terminal, here is what I see (we start the test with the lid opened):
1) I close the lid. The acpi_listen shows:
button/lid LID 00000080 00000001
2) The s2ram is executed and the laptop suspends to ram. That is fine.
3) I open the lid. The laptop resumes fine. Nothing happens in the acpi_listen output.
4) The /proc/acpi/button/lid/LID/state shows "open"
Here after is where the problem is:
5) I close the lid. The acpi_listen DOES NOT SHOW ANYTHING :-( => The /etc/acpi/actions/lid.sh will not be launched and the laptop will not be suspended
6) The /proc/acpi/button/lid/LID/state shows "close"
7) I open the lid. The acpi_listen shows:
button/lid LID 00000080 00000002 => As one can see the last number is now 00000002 which shows that the acpid daemon never received anything for the second lid closure :-(
8) I close the lid. The acpi_listen shows:
button/lid LID 00000080 00000003
2) The s2ram is executed and the laptop suspends to ram. That is fine.
So in fact it works the first time then I need to close/open/close the lid to have it suspend.
Any idea ?
Thanks in advance,
Offline
I remember seeing this problem about a year ago, and just concluded that acpid sucks at catching acpi events, sorry I can't be of more help, I'd love to hear another solution.
Offline
Sorry for bumping the thread, but I've stumbled upon the same problem and found the solution here.
Offline
Idosh,
Thank you for posting.
The problem you solved is the laptop needing 2 resume after an hibernate.
In my case, I need to close twice the lid to have it taken into account and get the laptop hibernate.
Dis I missunderstand you?
Pierre
Offline
I believe this solution also solves your problem, did you try it? You problem is due to the fact that the ACPI signal doesn't differentiate between the opening and closing of the lid and this solution doesn't relay on it, but on this file: /proc/acpi/button/lid/LID0/state (which changes accordingly).
Offline
What happens if you restart acpid after closing/opening the lid for the first time, and then close/open it once again?
Offline
Solved it by adding a file to /etc/pm/sleep.d/80-acpid with:
#!/bin/sh
case "$1" in
hibernate|suspend)
;;
thaw|resume)
/etc/rc.d/acpid restart
;;
*) exit $NA
;;
esacYou have to call pm-suspend or hibernate followed by an ampersand (&) otherwise the acpid restart fails.
EDIT: Sorry for the necro. Thought it was 2012. Either way I solved my problem with this so someone else might find it useful.
Last edited by Revolt (2012-02-28 22:49:53)
Offline