liiir1985 7f62dcda9f | ||
---|---|---|
.. | ||
README.md | ||
control | ||
power_WakeSources.py |
README.md
Wake sources testing
[TOC]
Introduction
On Chrome device, several wake sources are expected to wake the system from sleep. Not all wake sources will turn the display back on after resume (if Dark Resume is enabled). Only wakes that are triggered by input devices will cause a full Resume (turn the display on).
This test thus makes sure that wakes from input devices cause a Full Resume. This test also makes sure that RTC triggers a Dark Resume.
Steps to run the test
The steps below describe how to run the test with a Servo V4. The steps should be similar for other Servos too.
- Make sure that servo has the latest firmware.
$ sudo servo_updater
- This test depends on the Servo's USB HID emulator capability. Please run firmware_FlashServoKeyboardMap Autotest to install the latest keyboard.hex onto Servo.
- Make sure that the USBC charger is plugged into Servo before running the test.
- Run the test.
$ test_that ${DUT_ipaddr} power_WakeSources
- Once run, the test publishes a keyval with test results similar to the list below.
BASE_ATTACH=SKIPPED
BASE_DETACH=SKIPPED
INTERNAL_KB=PASS
LID_OPEN=PASS
PWR_BTN=PASS
RTC=PASS
TABLET_MODE_OFF=PASS
TABLET_MODE_ON=PASS
USB_KB=FAIL
- If any of the wake source did not result in expected behavior, the results
file will indicate it as
FAIL
. For exampleUSB_KB
in the above result did not trigger a full wake. - If any of the valid wake sources for a given platform is
SKIPPED
, please test it manually. - If you see a valid wake source for a given platform missing from the list, please test it manually. For example internal trackpad is missing from the above list.
Testing wake source manually
The steps below describe how to test wake sources manually.
- Make sure dark resume is disabled.
- Suspend the device using the following command.
$ powerd_dbus_suspend --print_wakeup_type
- Once the device suspends, trigger the wake using the specific wake source.
- For full wake sources, you should see output similar to
[0916/110326.423855 :INFO:powerd_dbus_suspend.cc(57)] Wakeup type : input
. - For dark wake sources, you should see output similar to
[0916/110326.423855 :INFO:powerd_dbus_suspend.cc(57)] Wakeup type : other
.