Time drifting when set to update Automatically from Internet

Bug #1178933 reported by Colin Law
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

On Ubuntu 12.04 desktop, in System Settings > Time & Date, when the time is set to update Automatically from Internet it syncs once but then drifts out over a period of days.

In Syslog I can see that ntpdate is called on boot but is never called again.

I have seen suggestions that it should re-sync if the DHCP lease is renewed, but as I have fixed IP address then the lease is not being renewed.

I expected to see ntpdate called from cron.daily (or similar) but it does not appear to be there.
I seem to remember on an older version of Ubuntu that ntp was automatically installed when I selected update from internet, but this did not happen on this occasion.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-control-center 1:3.4.2-0ubuntu0.11
ProcVersionSignature: Ubuntu 3.2.0-41.66-generic 3.2.42
Uname: Linux 3.2.0-41-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.2
Architecture: amd64
Date: Sat May 11 09:17:41 2013
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)
usr_lib_gnome-control-center:
 activity-log-manager-control-center 0.9.4-0ubuntu3.2
 deja-dup 22.0-0ubuntu4
 gnome-bluetooth 3.2.2-0ubuntu5
 indicator-datetime 0.3.94-0ubuntu2

Revision history for this message
Colin Law (colin-law) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. gnome-control-center is only providing a configuration UI, the actual behaviour is from ntpdate, it should sync every time you connect

affects: gnome-control-center (Ubuntu) → ntp (Ubuntu)
Revision history for this message
Colin Law (colin-law) wrote :

@Sebastien, two points:
Firstly ntp is not installed so I am not sure how it can be a bug in ntp
Secondly it does re-sync when I connect, but since the machine is on continuously the time drifts out over a period of days.

Changed in ntp (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Colin Law (colin-law) wrote :

@Yolanda, could you explain the reason why this is an issue with ntp since ntp is not installed, and also why it has been changed to Wishlist?
Many Thanks.

Revision history for this message
Simon Lyall (simon-darkmere) wrote :

I just saw the same problem. I'm on a static IP on the local network and thus ntpdate never runs.

Via the desktop config I had to force it to run by changing from automatic to manual setting. Checking syslog this was the first time it had run in at least 7 days and my clock was 19 seconds out.

# zgrep ntp /var/log/syslog*
/var/log/syslog:Mar 13 18:01:34 gold ntpdate[9450]: step time server 91.189.94.4 offset -19.442177 sec
#

Perhaps a backup cron task could be added to run ntpdate daily for people with stable networks.

Revision history for this message
C de-Avillez (hggdh2) wrote :

@Colin Law: ntpdate and ntp are both provided by the same source package -- ntp.

Frankly, I do not know why we still spend time with ntpdate -- this program has been deprecated by the NTP maintainers. Additionally, for machines that stay on, ntp is required (otherwise time will indeed slowly drift). ntpdate was useful when most users would disconnect when done; nowadays a LOT of users keep the machines on.

Also, ntp should be installed by default on Ubuntu Server. It is not.

Quick solution: sudo apt-get install ntp. Then disregard ntpdate (both will be installed, but ntp trumps ntpdate).

@Yolanda Robla: please always explain, in a comment, why you are changing status, importance, or affected packages. It makes life much more easier for all.

Revision history for this message
Colin Law (colin-law) wrote :

@C de-Avillez Are you sure ntpdate is in the package ntp? I don't see it in [1], and it /is/ in the package ntpdate

However the point of this bug is that it is misleading to have a selection "Update [time] Automatically from Internet" which does not, in fact, update automatically.

[1] http://packages.ubuntu.com/saucy/i386/ntp/filelist

Revision history for this message
C de-Avillez (hggdh2) wrote :

@Colin Law: ndtpdate is provided by the same *source* package (which is what I wrote above ;-). You are looking at the *binary* NTP package (which is also provided by source package ntp).

Although a bit pedantic, with ntpdate time *is* automatically updated. The problem is that it does not keep on updating (unless the network interfaces are cycled). But I agree with you, it is, at least, misleading.

The complete solution is to abandon ntpdate usage. Everybody gets to use ntp. There are a few bugs on ntp/ntpdate about that. One day we will get it done.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I know it's a long time, but I'm cleaning up old NTP bugs atm.

Looking at the current state:
- If ntpdate is installed (no more default) it sets time on any ifup by a hook.
- general ntp time keeping is default via a systemd service, your system should stay on good time by default.
- looking at the comments ntpdate doesn't seem to be preferred anyway

On a recent install you might look at "timedatectl status" for a starter on the systemd based time syncing.

That said for any recent release (in todays point of view) we can consider the bug "invalid".
Please that shall not be any offense, but cleaning up old bugs that no more apply - in case you want/need a solution in todays environments please reopen so that it can be taken into consideration.

Changed in ntp (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.