Bug 3744
Summary: | APMD losing time | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Piet E Barber <pietbarber> |
Component: | apmd | Assignee: | Erik Troan <ewt> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1999-10-18 14:27:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Piet E Barber
1999-06-26 16:20:02 UTC
You can't expect xntpd -- a program that requires a running cpu to keep track of time -- if you run another program apmd that stops the cpu from running. You don't get the time warp in Windows because Windows just reads the battery backed up hardware clock and uses that as the system time. You also don't get a system time on windows that is usually within 10 ms of a primary reference clock on windows either; that's the funxtion that xntpd performs that requires a running cpu. Umm. Perhaps you misunderstood. After screen blanks out from APMd, I lose an half an hour! More than once!! With striking regularity! The ntpdate shows how much drift is being caused by the apm daemon. The example I showed had 2000 seconds. THAT'S SIGNIFICANT! The clock isn't busted, I just spent hours in 95, and no time drift. it apmd. I know it. I'm re-opening the bug. Umm. Perhaps you misunderstood. After screen blanks out from APMd, I lose an half an hour! More than once!! With striking regularity! The ntpdate shows how much drift is being caused by the apm daemon. The example I showed had 2000 seconds. THAT'S SIGNIFICANT! The clock isn't busted, I just spent hours in 95, and no time drift. it apmd. I know it. I'm re-opening the bug. I have similar APMD problems, and I'm not running xntpd. Here's what I've found. Sometimes, when my laptop wakes up, the time is set wrong. Not reliably, tough. I store my time in real time (not UTC), and there seems to be some problems with that. The following is the output of repeated executions of "date" when I put the machine to sleep and then wake it up. snapdragon: init.d $ while true; sleep 1; do date; done Sat Aug 28 12:46:38 PM EDT Sat Aug 28 12:46:39 PM EDT Sat Aug 28 12:46:40 PM EDT Sat Aug 28 12:46:41 PM EDT Sat Aug 28 12:46:42 PM EDT Sat Aug 28 12:46:43 PM EDT Sat Aug 28 12:46:44 PM EDT Sat Aug 28 8:47:16 AM EDT Sat Aug 28 8:47:18 AM EDT Sat Aug 28 12:47:18 PM EDT Sat Aug 28 12:47:19 PM EDT In other words, when it wakes up, it temporarily restores the time as if it was stored in UTC, and then immediatly (within 2 seconds) switches it back. THis is the "good" outcome, since the date finally reaches the right value. But it's still weird. And sometimes, I'm not sure why or when, I leave it for a while and find it set on the wrong time, that is, set to the time it would be if I stored the date in UTC. This is really a bit weird. I fixed a similar problem on my desktop some time ago by changing /etc/sysconfig/clock so that instead of reading: UTC="yes" ARC=false it read: UTC=true ARC=false That fixed some problems, but I did the same thing on my laptop to no avail. I'm running Linux on a Dell Solo 2500. (lovely machine, btw.;) Running APM and xntp makes no sense since the xntpd requires periodic time stamps every 1-60 seconds while apmd turns off the cpu. Run ntpdate every 5 mins from cron to synchronize with a server if you wish to work around the problem. I'm not sure if the above response from jbj@redhat is to my post, but let me reiterate: I am NOT using xntpd. I find similar problems even so. So whether or not it's a good idea to use xntpd on a laptop is irrelevant. ------- Additional Comments From 08/30/99 10:01 ------- After reading recent comments, I went in and recompiled my kernel -- I set the setting that time is local instead of UTC (it's in the Power Management settings section), and now every time the apm daemon launches, I don't lose 4 hours anymore. That was it, you see. When apm started, I would be losing around 14,400 seconds -- about 4 hours. It never made much sense to me as to why I was losing about the same amount of time with each apm suspend. The apm daemon *should* be able to figure out the difference between which mode the system is in, without requiring a recompilation of the kernel. |