[PATCH 3/3] acpi: s3: sleep for s3_min_delay after sending KEY_SLEEP
Keng-Yu Lin
kengyu at canonical.com
Fri Jul 11 08:20:55 UTC 2014
Unlike `pm-suspend` only returns to fwts when the suspending
is completed, acpi_fakekey returns immediately after sending
the keycode while the system is still in middle of suspending.
So let fwts sleep for seconds of s3_min_delay after sending
the keycode.
Also increase s3_min_delay to 10 seconds.
Signed-off-by: Keng-Yu Lin <kengyu at canonical.com>
---
src/acpi/s3/s3.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
index 69f526b..f0d3f89 100644
--- a/src/acpi/s3/s3.c
+++ b/src/acpi/s3/s3.c
@@ -36,7 +36,7 @@
#define FWTS_RESUME "FWTS_RESUME"
static int s3_multiple = 1; /* number of s3 multiple tests to run */
-static int s3_min_delay = 0; /* min time between resume and next suspend */
+static int s3_min_delay = 10; /* min time between resume and next suspend */
static int s3_max_delay = 30; /* max time between resume and next suspend */
static float s3_delay_delta = 0.5; /* amount to add to delay between each S3 tests */
static int s3_sleep_delay = 30; /* time between start of suspend and wakeup */
@@ -117,6 +117,7 @@ static int s3_do_suspend_resume(fwts_framework *fw,
if (s3_sleep_key) {
(void)fwts_exec(acpi_fakekey_sleep, &status);
+ sleep(s3_min_delay);
}
else
(void)fwts_exec(command, &status);
--
1.9.1
More information about the fwts-devel
mailing list