[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#3261: apmd incorrectly sets clock for some systems.



>>>>> "Dirk" == Dirk Eddelbuettel
<Dirk.Eddelbuettel@qed.econ.queensu.ca> writes:

    Brian> Those APM users who have their system clocks set to GMT
    Brian> will notice an annoying problem with apmd.  When resuming
    Brian> from suspension mode, the daemon uses "clock -s" to reset
    Brian> the internal clock, which is incorrect for clocks set to
    Brian> GMT (unless the user is in Greenwich).  The "-u" flag must
    Brian> be used to inform the clock utility that the CMOS clock is
    Brian> set to Universal Time.

    Dirk> Are you sure? My laptop has bios time set to GMT as well,
    Dirk> and it behaves differently!

    Dirk> Could it be something else?

I think that I know what's going on.  The APM in my computer is
somewhat screwed up.  When you suspend, the apmd daemon does a normal
suspend, and I am guessing that your internal clock continues to run
during the suspended state.  When you resume, the kernel's time does
not need to be reset since the internal clock has been running.
However, when I suspend my laptop, everything shuts down, including
the internal clock.  Thus, when I resume, the apmd daemon receives an
APM_CRITICAL_RESUME event.  This event resets the kernel's time, which
is still set to the time when the computer entered the suspended
state, by executing the clock program.

Thus, your computer has never encountered this problem because your
apmd daemon has never received an APM_UPDATE_TIME or
APM_CRITICAL_RESUME event.

--
Brian <brian@debian.org>


Reply to: