Kernel Bug Tracker – Bug 31202
RTC: alarm time and day wrong
Last modified: 2011-03-27 19:49:23 UTC
I have a VDR PC used for tv recording, so it has to wake up by BIOS.
To check if the next startup time is set properly after manual start, I use cat /proc/driver/rtc.
Since 2.6.38 this is not working any more. It does not show the startup time set in the BIOS, but is (re)set to 00:00:00 1970-01-01.
Joerg: Mind checking that with the following patch the issue is resolved?
Yes, with that patch it works again. Thanks a lot!
Patch : http://git.kernel.org/?p=linux/kernel/git/tip/linux-2.6-tip.git;a=patch;h=f44f7f96a20af16f6f12e1c995576d6becf5f57b
Handled-By : john stultz <email@example.com>
(In reply to comment #2)
> Yes, with that patch it works again. Thanks a lot!
Joerg: Great to hear! Thanks for validating the patch!
Just as a heads up though: In the future, there may be multiple RTC alarms queued by the kernel, so after a reboot only the earliest event will persist.
Further, there are many cases where the RTC alarm state doesn't correctly persist across reboots.
Thus, applications should not rely upon RTC alarm persistence across reboots, and should instead check the RTC and make sure it is set to the appropriate time (using persistent storage on disk) on startup.
As mentioned in the patch log, we do try to preserve the old behavior where possible, but applications expecting persistent alarms across reboots will either run into trouble on some hardware, or run into trouble when there are multiplexed alarms.
Fixed by commit f44f7f96a20af16f6f12e1c995576d6becf5f57b .