tree: d5869919c32a8c7cd0d6264d4096964bbadbaad7 [path history] [tgz]
  1. control

Wake sources testing


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.

  1. Make sure that servo has the latest firmware.
    • $ sudo servo_updater
  2. This test depends on the Servo's USB HID emulator capability. Please run firmware_FlashServoKeyboardMap Autotest to install the latest keyboard.hex onto Servo.
  3. Make sure that the USBC charger is plugged into Servo before running the test.
  4. Run the test.
    • $ test_that ${DUT_ipaddr} power_WakeSources
  5. Once run, the test publishes a keyval with test results similar to the list below.
  1. If any of the wake source did not result in expected behavior, the results file will indicate it as FAIL. For example USB_KB in the above result did not trigger a full wake.
  2. If any of the valid wake sources for a given platform is SKIPPED, please test it manually.
  3. 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.

  1. Make sure dark resume is disabled.
  2. Suspend the device using the following command.
    • $ powerd_dbus_suspend --print_wakeup_type
  3. Once the device suspends, trigger the wake using the specific wake source.
  4. For full wake sources, you should see output similar to [0916/110326.423855] Wakeup type : input.
  5. For dark wake sources, you should see output similar to [0916/110326.423855] Wakeup type : other.