System time set wrongly at resume

Bug #182249 reported by Sampo Niskanen
2
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

I have noticed a bug in acpi-support very similar to, but distinct from bug #23216. Since the system time is loaded from RTC upon resume but never written to it, any false-ticking of the RTC is always passed to the system time. As laptops are commonly suspended and resumed instead of shutdown, this offset can become quite significant. By default Ubuntu has ntpdate installed, which corrects the system time from a network time server, but this is never saved when suspending, and eventually my RTC got about 5 minutes late. Therefore, every time I resumed, the system time was set 5 minutes off.

This can be fixed by adding a similar script to suspend.d with "hwclock --systohc", so that the system time is saved when suspending. Bug #23216 (the system time being in local time instead of UTC) should probably be addressed at the same time, as they are closely related.

One other point of interest is that at least chrony (an NTP client which calculates the speed of the system clock and applies corrections to it) is evidently incompatible with other programs setting the RTC time. This is what I was told on the chrony mailing list as I first thought the problem was in chrony. Therefore the chrony package should be somehow able to disable setting the RTC clock in order to function properly. I'm not sure whether the ntp package has the same problems. (ntpdate does not use the RTC, and therefore has no problems with it.)

Revision history for this message
TerryG (tgalati4) wrote :

Triaged to Confirmed. Reporter suggests a valid fix. What prevents adding it to Hardy?

Changed in acpi-support:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.