time drifting, jumps ahead, with/without ntp server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
No matter which ntp server I choose, the time jumps ahead after a day or so for 10 to 20 minutes. It looks as if the timer is not correct when counting.
I'll try without the ntp synchronizing, just to see if this relies to the time/date panel in gnome-panel.
Edit: the problem looks to be the clock applet itself, it does not keep a steady timer, it jumps ahead 10-20 minutes after several hours.
Update:
This problem is called "systematic time drift", it seems to happen a lot and it is explained in the manual page:
http://
http://
One solution is to install package: adjtimex
Update 2: I disabled spread spectrum and some overclocking options in BIOS. Now the clock skew / time difference is only minimal!
Please read comments #11 and #12 from another bug:
https:/
https:/
Savvas Radevic (medigeek) wrote : | #1 |
Shirish Agarwal (shirishag75) wrote : | #2 |
It is happening to me too, although I am using local time, no UTC stuff.
Shirish Agarwal (shirishag75) wrote : | #3 |
re-confirming, it has happened again so its reproducible
Sebastien Bacher (seb128) wrote : | #4 |
Thanks for taking the time to report this bug. Unfortunately we can't fix it, because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" <http://
We have instructions on debugging some types of problems. <http://
Changed in gnome-panel: | |
assignee: | nobody → desktop-bugs |
importance: | Undecided → Low |
status: | Unconfirmed → Needs Info |
Shirish Agarwal (shirishag75) wrote : | #5 |
Hi Sebastian,
Savvas Radevic (medigeek) wrote : | #6 |
Same situation here.
Can you be a bit more specific of what you require and possibly some steps to debug the clock applet? The clock applet seems to go ahead 20 minutes in time after 5-6 hours or after 24 hours have passed since the last resynchronization (manual or by ntp).
Disable any ntp server syncs and I guess you'll see it as well.
description: | updated |
Sebastien Bacher (seb128) wrote : | #7 |
The bug lacks informations like the version of Ubuntu you are using. The gnome-panel runs in user space and can't change the clock, why do you think it's due to it? Does it happen if you don't use the desktop? It could be your computer clock shifting. Does it happen if you don't log into GNOME or use an another environment?
Savvas Radevic (medigeek) wrote : | #8 |
I checked the time on windows xp, everything was ok for two days (not even a second shifted)
Also, here's:
- hwclock output: Thu 12 Apr 2007 04:18:20 PM CEST -0.738322 seconds
- date output: Thu Apr 12 16:22:50 CEST 2007
The shifting is less these days, after some big upgrades in ubuntu 7.04 (sorry, didn't keep record). It gained only 5 minutes after a day of uptime, whereas it used to shift the time about a lot more after only 5-6 hours of uptime
The clock applet follows the date output. I was told in #gnome (irc.gnome.org) that if date and clock applet output match, then it's probably something else wrong. Since the gnome-panel and gnome is logically out of the picture, maybe it's the kernel image?
I don't know if it happens when i'm not logged in, I'll surely check it out one of these days.
Shirish Agarwal (shirishag75) wrote : | #9 |
[quote]
The bug lacks informations like the version of Ubuntu you are using. The gnome-panel runs in user space and can't change the clock, why do you think it's due to it? Does it happen if you don't use the desktop? It could be your computer clock shifting. Does it happen if you don't log into GNOME or use an another environment? [/quote]
The version of Ubuntu used, Feisty Fawn 7.04 . Ok I do not hink forger meant the clock applet is due to the panel but he did not know where to categorize it. Ok I have not tried not using the desktop. As far as the computer clock shifting is concerned, checked both in BIOS & XP and things are cool.
shirish@ubuntu:~$ hwclock
Friday 13 April 2007 12:04:38 AM IST -0.927913 seconds
shirish@ubuntu:~$ date
Fri Apr 13 00:04:41 IST 2007
Sebastien Bacher (seb128) wrote : | #10 |
not a GNOME bug
Changed in gnome-panel: | |
assignee: | desktop-bugs → nobody |
status: | Needs Info → Unconfirmed |
Sam Liddicott (sam-liddicott) wrote : | #11 |
I get the computer time lagging behind 10-15 ninutes.
It's nothing to do with the clock applet.
I left my computer turned on all night and now it is 15 minutes behind even though it should be syncing to 4 time servers.
I'd say it was missing interrupts except for the people who are running ahead.
anne@rattle:~$ date ; hwclock
Mon Apr 23 08:13:31 BST 2007
Mon 23 Apr 2007 08:31:21 BST -0.391136 seconds
ntpdate seems to KNOW that it is out:
see /var/log/
My ntp.conf is below,
# /etc/ntp.conf, configuration for ntpd
driftfile /var/lib/
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com
# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/
restrict default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1 nomodify
# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth
#broadcastclient
server ntp2.ja.net
server ntp.demon.co.uk
server ntp2a.mcc.ac.uk
server ntp2b.mcc.ac.uk
Sam Liddicott (sam-liddicott) wrote : | #12 |
I'm using feisty and enabled ntp from the "Administration
Since I reset my clock this morning, my /var/log/
54213 28122.920 82.211.81.145 9014 0.084361261 0.094846198 7.937503096 0.000000954
...
54213 65161.924 82.211.81.145 9014 456.429896177 0.093862087 0.003818384 1.983832515
ntp darn well KNOWs it is out, and my clock strangely is about 7 minutes 35 seconds out.
So the actual bug is something to do with the ntp configuration that is stopping ntp from adjusting the clock.
Sam Liddicott (sam-liddicott) wrote : | #13 |
Maybe I don't have the same bug;
The time lag seems to occur when booted from a low-latency SMP kernel but when one of the processors hasn't come up, see bug #97554
I'll try reproducing in i386 kernel, and other smp tests and report more when I have it.
Savvas Radevic (medigeek) wrote : | #14 |
please do, as I'm not familiar with these procedures
Savvas Radevic (medigeek) wrote : | #15 |
- ntpstats_ntpdrift_ntpconf.tar.gz Edit (288.4 KiB, application/x-tar)
Ok here are my logs and ntp stats:
$ hwclock && date
Mon 28 May 2007 05:06:26 PM CEST -0.164175 seconds
Mon May 28 17:24:50 CEST 2007
my /etc/ntp.conf:
### PASTE START ###
# /etc/ntp.conf, configuration for ntpd
driftfile /var/lib/
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/
restrict default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1 nomodify
# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth
#broadcastclient
server 0.europe.
server 1.europe.
server 2.europe.
server 3.europe.
### PASTE END ###
(Yes, I do not use ntp.ubuntu.com, but it does create the same problem)
attached are:
/var/lib/
/var/log/
/var/log/
I hope this is enough :)
P.S. If it matters, I haven't upgraded to the new 2.6.20.16.28.1 kernel yet.
joehack (jochen-gatternig) wrote : | #16 |
Thank god I'm not the only one with this problem.
After an uptime of 14 min, the Linux clock lags 15 minutes behind the hardware clock!
Jochen
Savvas Radevic (medigeek) wrote : | #17 |
well.. if no-one responds in a month with a fix, I'll try format it completely (including my /home/ partition), which I hope will solve the case
Savvas Radevic (medigeek) wrote : | #18 |
Case solved temporarily, the thing I did was to put the "good" ntp servers:
$ hwclock && date
Tue 29 May 2007 07:57:28 PM CEST -0.175399 seconds
Tue May 29 19:27:30 CEST 2007
ntp servers used (in this order in /etc/ntp.conf):
server chronos.csr.net
server ntp2a.mcc.ac.uk
server ntp2b.mcc.ac.uk
The server doesn't have to be the closest to you, as long as it's precise, i.e. belongs to the so called "Stratum One" (closer to *precision*) group, you can find them here:
http://
http://
Most servers (if not all) in the "select ntp server" list in ubuntu are stratum one, but i believe ntp.ubuntu.com brakes that.
europe.pool.ntp.org wasn't a good idea either.
That's all I changed, and restarted the ntp daemon:
$ sudo /etc/init.d/ntp restart
Savvas Radevic (medigeek) wrote : | #19 |
The problems still show... the problem still seems to be software, i.e. something in ubuntu feisty 7.04
This is not a low priority by the way, it screws up my log messages
I wondered if my system info might show up something, hence I attached a system information report
Savvas Radevic (medigeek) wrote : | #20 |
- clock.log.tar.gz Edit (1001 bytes, application/x-tar)
I've attached a logfile. I disabled ntp and used: hwclock && date (every 5 minutes as root /etc/crontab)
I used ntpdate right before enabling it.
Notice how time in "date" gradually increases? That's my problem. That didn't and does not happen in edgy/dapper drake (tested 3 times with a clean format) nor in windows xp.
Savvas Radevic (medigeek) wrote : | #21 |
It's fixed in Ubuntu Gutsy Gibbon :)
phirestalker (firestalker1-deactivatedaccount) wrote : | #22 |
yes I removed all ntp servers in the clock applet except for the ones mediageek mentioned and the time difference corrected itself mine was 10 minutes behind. I'm not sure which one cause the problem, however I also had the ubuntu.com ntp server selected. maybe this one is the problem?
Savvas Radevic (medigeek) wrote : | #23 |
Uncheck ubuntu, it seemed unstable. I have in my /etc/ntp.conf these:
server time.nist.gov
server ntp.nasa.gov
The only servers I've been using and that provide me an accurate time.
phirestalker (firestalker1-deactivatedaccount) wrote : | #24 |
ok actually it seems that it doesn't matter what servers for me after a while it lags behind, and the act of choosing any other server will update the time. I will try with only the 2 time.nist.gov and ntp.nasa.gov. if that doesn't work I will try with only one
phirestalker (firestalker1-deactivatedaccount) wrote : | #25 |
nope it does it even with just time.nist.gov checked. what gives?
phirestalker (firestalker1-deactivatedaccount) wrote : | #26 |
ok so it's not a gnome bug you say so is this bug gonna be recategorized to the correct place? or has anyone else found the solution maybe?
Savvas Radevic (medigeek) wrote : | #27 |
Are you sure it's the same bug? Are you using Feisty or Gutsy beta?
do:
hwclock && date
either way do the following, it will update your clock every 2 hours:
sudo apt-get install ntpdate
sudo touch /etc/ntpdatey
gksu gedit /etc/ntpdatey
There paste:
#!/bin/bash
ntpdate time.nist.gov ntp.nasa.gov
Save & close, then do:
gksu gedit /etc/crontab
Add a line:
0 */2 * * * /etc/ntpdatey
Save & close, then do:
/etc/ntpdatey
Savvas Radevic (medigeek) wrote : | #28 |
sorry, forgot the chmod part :)
sudo apt-get install ntpdate
sudo touch /etc/ntpdatey
sudo chmod +x /etc/ntpdatey
gksu gedit /etc/ntpdatey
There paste:
#!/bin/bash
ntpdate time.nist.gov ntp.nasa.gov
Save & close, then do:
gksu gedit /etc/crontab
Add a line:
0 */2 * * * /etc/ntpdatey
Save & close, then do:
sudo /etc/ntpdatey
phirestalker (firestalker1-deactivatedaccount) wrote : | #29 |
phire@phirestal
Mon 01 Oct 2007 08:28:09 PM CDT -0.629160 seconds
phire@phirestal
Mon Oct 1 20:20:27 CDT 2007
phire@phirestal
I realize it's in the opposite direction than everyone elses problem but seems to have the same symptoms. I do not intend to install something new to do what is supposed to already be done by something that is installed, I will just wait for this bug to be fixed
phirestalker (firestalker1-deactivatedaccount) wrote : | #30 |
I am using fiesty
nostromo (roelgielen) wrote : | #31 |
I've got exactly the same problem problem slowly the time difference gets bigger and bigger. In the weekend i wasn't home and left the computer on the time difference was 2 hours and 12 minutes...
Well thats a big problem because mythtv doesn't start recording on the right time.
I am using 7.10 gutsy gibbon.
Only thing i installed after a fresh Ubuntu install was mythtv.
It all runs on a fairly new computer, duo core 2. and a gigabyte motherboard with p35 chip set.
The bios time is correct, checked it a few time.
Same as phirestalker above, I don't like it to install an other program while something that should do the same right out of the box is already installed.
My Linux knowledge isn't great, but if someone needs more info or if I can help in anyway let it know.
Hope that some advanced Linux users can resolve this problem...
Willem Ligtenberg (wligtenberg) wrote : | #32 |
Other people have confirmed this bug.
Although it is still unclear where the error comes from.
It is however clear that quite a few people are experiencing time shifting.
Savvas Radevic (medigeek) wrote : | #33 |
I think this is recurring in Intrepid Ibex 8.10 alpha
$ apt-cache policy linux-generic
linux-generic:
Installed: 2.6.27.4.4
Candidate: 2.6.27.4.4
Version table:
*** 2.6.27.4.4 0
500 http://
100 /var/lib/
$ apt-cache policy ntp
ntp:
Installed: 1:4.2.4p4+
Candidate: 1:4.2.4p4+
Version table:
*** 1:4.2.4p4+
500 http://
100 /var/lib/
I'm not sure, I'll monitor it
$ sudo hwclock; sudo date
Wed 24 Sep 2008 07:47:14 PM CEST -0.721641 seconds
Wed Sep 24 19:38:45 CEST 2008
Savvas Radevic (medigeek) wrote : | #34 |
Something is definitely wrong..
$ sudo hwclock; sudo date
Thu 25 Sep 2008 07:17:48 PM CEST -0.544369 seconds
Thu Sep 25 19:36:19 CEST 2008
$ cat /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
# Access control configuration; see /usr/share/
# details. The web page <http://
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
server time.nist.gov
server ntp.nasa.gov
Savvas Radevic (medigeek) wrote : | #35 |
Anyone still having the problem?
$ sudo hwclock;date
Fri 23 Jan 2009 13:00:33 CET -0.910121 seconds
Fri Jan 23 13:00:50 CET 2009
I'm going to disable ntpdate, just to see if this is fixed.
(ntp server off)
Shirish Agarwal (shirishag75) wrote : Re: [Bug 104091] Re: time jumps ahead 10-20 minutes no matter the ntp server | #36 |
Reply in-line :-
On Fri, Jan 23, 2009 at 17:30, Savvas Radevic <email address hidden> wrote:
> Anyone still having the problem?
> $ sudo hwclock;date
> Fri 23 Jan 2009 13:00:33 CET -0.910121 seconds
> Fri Jan 23 13:00:50 CET 2009
Still on Intrepid, still its off by some.
~$ sudo hwclock;date
[sudo] password for shirish:
Friday 23 January 2009 06:11:18 PM IST -0.561178 seconds
Fri Jan 23 18:11:24 IST 2009
> I'm going to disable ntpdate, just to see if this is fixed.
> (ntp server off)
I couldn't get this command :(
$ ntp server off
bash: ntp: command not found
> --
> time jumps ahead 10-20 minutes no matter the ntp server
> https:/
> You received this bug notification because you are a direct subscriber
> of the bug.
--
Regards,
Shirish Agarwal
My quotes in this email licensed under CC 3.0
http://
http://
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17
Savvas Radevic (medigeek) wrote : | #37 |
> $ ntp server off
> bash: ntp: command not found
It wasn't a command, I'm using ntpdate in /etc/crontab instead of ntp. :)
To disable ntp sync you can use System > Adminstration > Time and Date
> Set "Configuration" to "Manual".
Shirish Agarwal (shirishag75) wrote : | #38 |
Reply in-line :-
On Fri, Jan 23, 2009 at 19:00, Savvas Radevic <email address hidden> wrote:
<snip>
> It wasn't a command, I'm using ntpdate in /etc/crontab instead of ntp. :)
> To disable ntp sync you can use System > Adminstration > Time and Date
>> Set "Configuration" to "Manual".
Set to Manual but still its off.
$ sudo hwclock;date
[sudo] password for shirish:
Friday 23 January 2009 07:25:17 PM IST -0.880970 seconds
Fri Jan 23 19:25:24 IST 2009
As can be seen it seems to have grown.
> --
> time jumps ahead 10-20 minutes no matter the ntp server
> https:/
> You received this bug notification because you are a direct subscriber
> of the bug.
--
Regards,
Shirish Agarwal
My quotes in this email licensed under CC 3.0
http://
http://
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17
Savvas Radevic (medigeek) wrote : | #39 |
$ sudo hwclock; date
Sat 24 Jan 2009 07:33:43 CET -0.248479 seconds
Sat Jan 24 07:40:41 CET 2009
Well, the difference isn't that visible, but I can still confirm this.
Savvas Radevic (medigeek) wrote : Re: time jumps ahead 10-20 minutes no matter the ntp server | #40 |
I think this is fixed, ntp support in System > Administration > Time and date seems to be fixed in ubuntu karmic 9.10
Changed in ubuntu: | |
status: | Confirmed → Incomplete |
Savvas Radevic (medigeek) wrote : | #41 |
I take that back, the problem is still visible, time seems to shift a whole hour, even with ntp updating on.
ntpdate and crontab combination is the only temporary fix so far
Changed in ubuntu: | |
status: | Incomplete → Confirmed |
affects: | ubuntu → linux (Ubuntu) |
summary: |
- time jumps ahead 10-20 minutes no matter the ntp server + time drifting, jumps ahead, with/without ntp server |
Savvas Radevic (medigeek) wrote : | #42 |
This problem is called "systematic time drift", it seems to happen a lot and it is explained in the manual page:
http://
http://
[quote]
Automatic Hardware Clock Synchronization By the Kernel
You should be aware of another way that the Hardware Clock is kept
synchronized in some systems. The Linux kernel has a mode wherein it
copies the System Time to the Hardware Clock every 11 minutes.
This is a good mode to use when you are using something sophisticated
like ntp to keep your System Time synchronized. (ntp is a way to keep
your System Time synchronized either to a time server somewhere on the
network or to a radio clock hooked up to your system. See RFC 1305).
This mode (we'll call it "11 minute mode") is off until something
turns it on. The ntp daemon xntpd is one thing that turns it on. You
can turn it off by running anything, including
hwclock --hctosys,
that sets the System Time the old fashioned way.
To see if it is on or
off, use the command
adjtimex --print
and look at the value of "status". If the "64" bit of this number
(expressed in binary) equal to 0, 11 minute mode is on. Otherwise, it
is off.
If your system runs with 11 minute mode on, don't use
hwclock --adjust
or
hwclock --hctosys.
You'll just make a mess. It is acceptable to use a
hwclock --hctosys
at startup time to get a reasonable System Time until your system is
able to set the System Time from the external source and start 11
minute mode.
[/quote]
Savvas Radevic (medigeek) wrote : | #43 |
Hm... I just installed adjtimex, I think this package is the answer:
$ sudo apt-get install adjtimex
[...]
Unpacking adjtimex (from .../adjtimex_
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up adjtimex (1.27.1-3) ...
update-rc.d: warning: adjtimex start runlevel arguments (S) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: adjtimex stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
Regulating system clock...done.
Comparing clocks (this will take 70 sec)...^Tdone.
Adjusting system time by -865.451 sec/day to agree with CMOS clock...done.
Savvas Radevic (medigeek) wrote : | #44 |
woohoo! adjtimex was the answer to my problems!
description: | updated |
Savvas Radevic (medigeek) wrote : | #45 |
Update: I disabled spread spectrum and some overclocking options in BIOS. Now the clock skew / time difference is only minimal!
Please read comments #11 and #12 from another bug:
https:/
https:/
description: | updated |
Savvas Radevic (medigeek) wrote : | #46 |
Setting this as invalid. If you still see problems, I suggest you use "ntpdate time.nist.gov" as a cron job. :)
Changed in linux (Ubuntu): | |
status: | Confirmed → Invalid |
Theory confirmed, the timer jumped ahead 10 minutes, it should be 19:18, whereas it is 19:28
Looks like the internal timer of the time&date panel is faulty or something.