From 229cc3edf22bc6031b3103f743d0583d2701b581 Mon Sep 17 00:00:00 2001 From: rickwu4444 Date: Wed, 29 Jun 2022 10:58:10 +0800 Subject: Change: Change suspend method if using rtcwake Due to rtcwake is calling kernel power states directly to put system into suspend. That will cause userspace services didn't been handle. Therefore, using systemd to handle suspend would be better for handle the userspace services. --- units/suspend/suspend.pxu | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'units/suspend') diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 1225d90..9d905da 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -202,9 +202,11 @@ command: else echo "Calling rtcwake" if [ -z "$RTC_DEVICE_FILE" ]; then - rtcwake -m mem -s 30 + rtcwake -m on -s 30 & + systemctl suspend else - rtcwake -d "$RTC_DEVICE_FILE" -m mem -s 30 + rtcwake -d "$RTC_DEVICE_FILE" -m on -s 30 & + systemctl suspend fi fi else @@ -285,9 +287,11 @@ command: else echo "Calling rtcwake" if [ -z "$RTC_DEVICE_FILE" ]; then - rtcwake -m mem -s 30 + rtcwake -m on -s 30 & + systemctl suspend else - rtcwake -d "$RTC_DEVICE_FILE" -m mem -s 30 + rtcwake -d "$RTC_DEVICE_FILE" -m on -s 30 & + systemctl suspend fi fi estimated_duration: 90.000 -- cgit v1.2.3