wakealarm

Firmware Test Suite - wakealarm test

This test sanity checks if the ACPI Real Time Clock (RTC) wakealarm works. Note that this test does not check if it works over suspend or hibernate.

Every ACPI platform has a mc146818 compatible CMOS RTC, which theoretically should be programmable to generate wakeup events some time in the future. This test programmes the wakealarm and checks if it is triggerable and also if it triggers. The test takes a few seconds to complete as it exercises the wakealarm a few times.

Theoretically, the RTC wakealarm should wake machines up when suspended or hibernated. The ACPI Fixed ACPI Description Table (FADT) contains a flags field that should be set to 1 if the system is capable of this form of wakeup. This can be checked by using:

sudo fwts acpidump - | grep "RTC can wake system from S4"

Alternatively, one can see if the kernel believes that the system is capable waking up when suspended by using:

dmesg | grep "RTC can wake from S4"

See section 4.7.2.4 "Real Time Clock Alarm" from the ACPI specification for more details.

Typical output from the wakealarm test is as follows:

Test ACPI Wakealarm.
--------------------------------------------------------------------------------
Test 1 of 4: Check existence of /sys/class/rtc/rtc0/wakealarm.
PASSED: Test 1, /sys/class/rtc/rtc0/wakealarm found.

Test 2 of 4: Trigger wakealarm for 1 seconds in the future.
Trigger wakealarm for 1 seconds in the future.
PASSED: Test 2, RTC wakealarm was triggered successfully.

Test 3 of 4: Check if wakealarm is fired.
PASSED: Test 3, RTC wakealarm triggered and fired successfully.

Test 4 of 4: Multiple wakealarm firing tests.
Trigger wakealarm for 1 seconds in the future.
Trigger wakealarm for 2 seconds in the future.
Trigger wakealarm for 3 seconds in the future.
Trigger wakealarm for 4 seconds in the future.
PASSED: Test 4, RTC wakealarm triggered and fired successfully.

Example:

sudo fwts wakealarm - 

..runs the wakealarm test on your machine and dumps the output to stdout.

Explanation of test results

Certain test results may require a little more explanation. This section will try and give some context to specific test failures.

Error ID

Explanation

NoWakeAlarmTest1

The RTC wakealarm interface was not found. An ACPI compliant system should have this interface.

WakeAlarmNotTriggeredTest2

The RTC wakealarm did not trigger.

WakeAlarmNotTriggeredTest3

Failed to trigger and fire wakealarm.

WakeAlarmNotTriggeredTest4

Failed to trigger and fire wakealarm multiple times.

FirmwareTestSuite/Reference/wakealarm (last edited 2016-01-11 07:23:49 by anthonywong)