Score:0

Ntpd drifting, very fast

za flag

I have to run stop ntp/ntpdate/start ntp every day, since my Laptop (ThinkPas AMD64 Rhyzen, Ubuntu 20.04) looses half an hour a day

Here is my ntp.conf (almost the default):

driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list

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

server aragorn.groumpf.org iburst
server numenor.groumpf.org iburst

restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

restrict 127.0.0.1
restrict ::1

restrict source notrap nomodify noquery

I'm not a Linux newbie, but simply cannot see what's happening

Thanks for help

Xavier

EDIT : the requested additional info, clock has been ntpdate'd just now:

[xavier@imladris ~]$ cat /var/lib/ntp/ntp.drift
-0.189
[xavier@imladris ~]$ timedatectl status
               Local time: Wed 2021-11-03 08:58:59 CET
           Universal time: Wed 2021-11-03 07:58:59 UTC
                 RTC time: Wed 2021-11-03 08:16:53
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: no
              NTP service: n/a
[xavier@imladris ~]$ ntpq -pn
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+176.31.180.205  193.52.184.106   2 u   35   64    1   15.545  309.431 255.807
*192.168.100.144 193.52.184.106   2 u   10   64    3    0.166  490.224 445.668
FedKad avatar
cn flag
I assume you do not modify the clock manually and your timezone is correct. Also, do you see anything strange in file `/var/lib/ntp/ntp.drift`?
Christian Ehrhardt avatar
sl flag
Also NTPd isn't fully supported anymore in 20.04; I'd recommend giving systemd-timesyncd a chance (the default) or if you want/need an explicit tools/server then 'chrony' - is it any different with those?
FedKad avatar
cn flag
What are the contents of your laptop's `/var/lib/ntp/ntp.drift` file? What is the output of the command `timedatectl status`? Please, [edit] your Question to add this information. Also, from time to time, check the output of the command `ntpq -pn`; one of your ntp server's IP address should have a `*` in front of it, the other a `+` character.
Artur Meinild avatar
vn flag
Are you using `systemd-timesyncd` or `ntpd` as your intended NTP service? This is very unclear. If you use `ntpd`, this means you've changed from the default. It seems whatever NTP service you intend to use is not working. Reverting to the default `systemd-timesyncd` would make it easier for you to get help.
FedKad avatar
cn flag
I suggest you remove `ntp` and install `systemd-timesyncd`. After that, check with `systemctl status systemd-timesyncd` that is "active (running)" and with `timedatectl status` you should see `System clock synchronized: yes` in the output.
Score:0
cn flag

I suggest you remove ntp:

sudo apt remove ntp

and install systemd-timesyncd (which should be installed by default on all new installations):

sudo apt install systemd-timesyncd

After that, check with

systemctl status systemd-timesyncd

that "systemd-timesyncd.service" is "active (running)" and with

timedatectl status

you should see something like:

...
System clock synchronized: yes
              NTP service: active
...

See also this.

Score:-1
za flag

I finally gave up with ntpd, installed chrony successful

Thanks to all who helped

Cheers

Xavier

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.