Clock loses 5 hrs after a suspend/resume
Bug #12514 reported by
Tim Hull
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Fix Released
|
Medium
|
Thom May |
Bug Description
I suspended my laptop by uncommenting the ACPI_SLEEP line in
/etc/default/
pressing the suspend button. While all went well (except for the battery
drainage issue that plagues all Linux distros on my laptop), on resume my clock
lost 5 hrs. I think it is specifically 5 hrs because that is how much I am
behind GMT -
and the hardware clock (which is set to UTC) is being set to the system clock
time (which is local time).
To post a comment you must log in.
I did some looking around, and I've found the source of the problem.
hwclock, when invoked, does not detect whether the hardware clock is set to UTC
or local time. If one isn't specified,
and hwclock wasn't invoked before with either --utc or --localtime, hwclock
assumes localtime. Something should
be done so that resume.sh looks at /etc/default/rcS and invokes hwclock with
either --utc or --localtime based
on how this is set in that file.