You are not logged in.
I want to make my laptap (lenovo) able to wake up from suspend state automatically rather than press power button.
I read many pages on Wiki about power management and others, the following is my setting as far, but it doesn't work well:
I use acpid to manage ACPI events, because I need handle ac plug event.
So I set "ignore" value in logind.conf:
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
HandleRebootKey=ignoreAnd in my handler.sh:
button/lid)
case "$3" in
close)
logger 'LID closed'
systemctl suspend-then-hibernate
;;
open)
logger 'LID opened'
;;
*)I'm sure the acpid is working since when lid close my pc suspend. I don't know what command should be used for waking up the suspended laptop.
From my searching, some people adivsed use the
echo "LID" > /proc/acpi/wakeupBut this doesn't work in my case.
And the content of
/proc/acpi/wakeupis:
LID S4 *enabled platform:PNP0C0D:00In fact, Im not very clear for this. S4 means hibernation, right? But from hibernation to wakeup, I also have to press power button (it's Ok, although), so in here the enabled or disabled value have no difference.
I want to some help. Thanks a lot.
Last edited by tea_niugnep (2021-03-07 03:14:13)
Offline
S4 implies S3
echo "LID" > /proc/acpi/wakeup requires root permissions and will toggle the enabled state.
You can eg.
echo "LID" | sudo tee /proc/acpi/wakeupYou don't have to run anything on wakeup and you *cannot* run anything to wake the system; this is done by the BIOS.
For a test: unignore the lid in login.conf, disable acpid, reboot.
Ensure that acpid is not running and the lid is enabled in /proc/acpi/wakeup
Close the lid, the notebook should got to sleep.
Then open the lid, does the system wake up?
If yes, there's perhaps systemd bug (ignoring the lid causing it to falsely disable it on sleep)
If not, the lid simply doesn't wake the system. Check for a BIOS option and BIOS update, if there's a parallel windows, see the 3rd link in my signature and as last straw, you can try to lie to the acpi:
Pass
acpi_osi=! acpi_osi="Windows 2015"as kernel parameter, https://wiki.archlinux.org/index.php/Kernel_parameters
Then I'm out of ideas :-(
Offline
Thanks.
Although I don't know what happened, after restarting the acpid service and reboot, it can handle lid open event normally
Offline