Comment 8 for bug 349768

Daniel Manrique (roadmr) wrote :

Hello, the following information should complete this bug as a valid SRU report, to hopefully upload this fix to Lucid.

Solution:

Checkbox revision 795 uses relative time for the rtcwakealarm, which seems to be more stable than absolute time, as documented in this bug's discussion and all the referred material. So instead of an absolute seconds after epoch value for the wakeup, this now specifies an increment from the current time with the "+seconds" syntax.

TEST CASE:

This is hardware-dependent so results may vary.

1- on a Lucid installation on an HP Compaq system, run:
   sudo /usr/share/checkbox/scripts/suspend_test --full

On an affected system, the old version of the script will fail to wake the system up automatically. The new version should wake the system up correctly.

Regression potential:
Both formats for the rtc wakealarm are essentially equivalent and both are supported with the Lucid kernel. Short of a system using local instead of UTC time for the RTC (where the old code wouldn't work as expected), or a kernel downgrade that removes support for rtc wakealarm (in which case even the old code would fail) this change should be completely harmless.