Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | H A D | 25-Apr-2025 | 3 KiB | 71 | 57 | |
control | H A D | 25-Apr-2025 | 905 | 33 | 26 | |
power_WakeSources.py | H A D | 25-Apr-2025 | 15.5 KiB | 408 | 319 |
README.md
1# Wake sources testing 2 3[TOC] 4 5## Introduction 6 7On Chrome device, several wake sources are expected to wake the system from 8sleep. Not all wake sources will turn the display back on after resume (if 9[Dark Resume] is enabled). Only wakes that are triggered by input devices will 10cause a full Resume (turn the display on). 11 12This test thus makes sure that wakes from input devices cause a Full Resume. 13This test also makes sure that RTC triggers a Dark Resume. 14 15## Steps to run the test 16 17The steps below describe how to run the test with a Servo V4. The steps should 18be similar for other Servos too. 19 201. Make sure that servo has the latest firmware. 21 * `$ sudo servo_updater` 222. This test depends on the Servo's USB HID emulator capability. Please run 23 [firmware_FlashServoKeyboardMap] Autotest to install the latest 24 [keyboard.hex] onto Servo. 253. Make sure that the USBC charger is plugged into Servo before running the 26 test. 273. Run the test. 28 * `$ test_that ${DUT_ipaddr} power_WakeSources` 294. Once run, the test publishes a keyval with test results similar to the list 30 below. 31 32```python 33BASE_ATTACH=SKIPPED 34BASE_DETACH=SKIPPED 35INTERNAL_KB=PASS 36LID_OPEN=PASS 37PWR_BTN=PASS 38RTC=PASS 39TABLET_MODE_OFF=PASS 40TABLET_MODE_ON=PASS 41USB_KB=FAIL 42``` 43 445. If any of the wake source did not result in expected behavior, the results 45 file will indicate it as `FAIL`. For example `USB_KB` in the above result 46 did not trigger a full wake. 476. If any of the valid wake sources for a given platform is `SKIPPED`, please 48 [test it manually](#Testing-wake-source-manually). 497. If you see a valid wake source for a given platform missing from the list, 50 please [test it manually](#Testing-wake-source-manually). For example 51 internal trackpad is missing from the above list. 52 53## Testing wake source manually 54 55The steps below describe how to test wake sources manually. 56 571. Make sure [dark resume is disabled]. 582. Suspend the device using the following command. 59 * `$ powerd_dbus_suspend --print_wakeup_type` 603. Once the device suspends, trigger the wake using the specific wake source. 614. For full wake sources, you should see output similar to `[0916/110326.423855 62 :INFO:powerd_dbus_suspend.cc(57)] Wakeup type : input`. 635. For dark wake sources, you should see output similar to `[0916/110326.423855 64 :INFO:powerd_dbus_suspend.cc(57)] Wakeup type : other`. 65 66 67\[Dark Resume\]: https://chromium.googlesource.com/chromiumos/platform2/+/main/power_manager/docs/dark_resume.md <br> 68\[dark resume is disabled\]: https://chromium.googlesource.com/chromiumos/platform2/+/main/power_manager/docs/dark_resume.md#Disabling-Dark-Resume <br> 69\[keyboard.hex\]: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/refs/heads/main/servo/firmware/usbkm/KeyboardSerial/Keyboard.hex <br> 70\[firmware_FlashServoKeyboardMap\]: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/refs/heads/main/server/site_tests/firmware_FlashServoKeyboardMap/ <br> 71\[chromeos-platform-power\]: [email protected] <br>