acpi: use the original way to suspend

zzz is not shipped with acpid package by default anymore
This commit is contained in:
Hoang Nguyen 2022-09-14 22:27:52 +07:00
parent 302b3d2946
commit 7bc355fef6
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
1 changed files with 3 additions and 3 deletions

View File

@ -13,17 +13,17 @@ button/power:PWRF:* | button/power:PBTN:*)
button/sleep:SLPB:*)
log 'Sleep button pressed'
# Suspend to RAM.
zzz
echo mem > /sys/power/state
;;
button/lid:*:close:*)
log 'Lid closed'
# Suspend to RAM if AC adapter is not connected.
[ "$(power-supply -d adapter -s)" = "offline" ] && zzz
[ "$(power-supply -d adapter -s)" = "offline" ] && echo mem > /sys/power/state
;;
ac_adapter:*:*:*0)
log 'AC adapter unplugged'
# Suspend to RAM if notebook's lid is closed.
lid-state -c && zzz
lid-state -c && echo mem > /sys/power/state
;;
esac