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

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



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

Are you sure? My laptop has bios time set to GMT as well, and it behaves
differently! I just checked:

Jun 12 13:59:30 bird apmd[142]: Version 2.4 (APM BIOS 1.1, Linux driver 1.1)
Jun 12 13:59:30 bird apmd[142]: Charge: * * * (-1% 0:01)
Jun 12 14:03:49 bird apmd[142]: Resume after 00:01:43 (-1% 0:01)
Jun 12 14:04:53 bird in.rlogind[289]: connect from miles.econ.queensu.ca    

I booted the laptop at 13:59, called 'apm --suspend' around 14:01, pressed
the power button to get back from suspension --- and my clock is allright.
Note that my /etc/init.d/boot is set to preserve GMT.

# Set GMT="-u" if your system clock is set to GMT, and GMT=""
# if not.
GMT="-u"
# Set and adjust the CMOS clock.
clock -s $GMT
if [ ! -f /etc/adjtime ]
then
  echo "0.0 0 0.0" > /etc/adjtime
fi
clock -a $GMT              

I had checked the -S and -s behaviour when I released apmd-2.4. I had left
the machine suspended for several hours, and had no problem whatsoever. Could
it be something else?

--
Dirk Eddelb"uttel                             http://qed.econ.queensu.ca/~edd


Reply to: