Time sync problem


#41

Hi,
Just installed on my Lenovo ideapad 310 laptop. Same problem with the time.

What I did:-

  1. vi /etc/rc.conf. Updated as per vit and bsdtester.
  2. Went into console/terminal mode, type in: sudo date 1630(local time(allow you to update the time only))
    Worked for me. My time is now local and up-to-date.

#42

Thanks, I’ll try it. At this point however, I don’t seem to even have rc.conf installed (If that is possible).


#43

I had to boot from ‘initial boot env’ as system stopped booting. Updated to current version. Time problem still there. However, for now I changed my timezone to Anchorage, AK. It now shows correct time for me. When I do a clean install of next version, the last one before the migration, I plan to check the box for universal time, as my cmos is set to that. Hopefully that will solve it. Otherwise, I’ll have to continue pretending I’m in Alaska.


#44

I had an issue with ntpd not syncing. I found that the ntpd.drift file was empty and that ntpd did not seem able to create the file.

%  sudo ntpd -s
Password:
/var/db/ntpd.drift is empty

Create the file with the content 0.0.
% sudo echo 0.0 > /var/db/ntpd.drift

Try synching again
% sudo ntpd -s

Hopefully the following outputs the correct date and time.
% date

After doing this time has synced on startup.


#45

Thanks for the suggestion, but at this point I’m OK with being in a different time zone, if it gives me correct time. I’m planning on a clean install when the next version comes out, and hoping to solve the problem at that point.


#46

I had same issue with clock not being synced. Weird, but using sudo did not work, I had to su, to enable changes:

samob@trueos:~ % sudo echo 0.0 > /var/db/ntpd.drift
/var/db/ntpd.drift: Permission denied.
samob@trueos:~ % sudo ntpd -s
/var/db/ntpd.drift is empty
samob@trueos:~ % su -
Password:
root@trueos:~ # echo 0.0 > /var/db/ntpd.drift
root@trueos:~ # ntpd -s
root@trueos:~ # date
Mon Jul  9 17:43:27 CEST 2018
root@trueos:~ # less /var/db/ntpd.drift
0.000

#47

Well, suddenly today my time is correct. I did not do anything. Was it an update perhaps?


#48

i can almost guarantee there has been NO update in a while :wink:


#49

Oh well, It’s 4 hours off again. Guess I’ll have to move back to Alaska.


#50

Someone asked how does thelog look like, here is mine:

ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime adjusted frequency by -4.019989ppm
ntp engine ready
could not parse "www.google.com": Non-recoverable failure in name resolution
could not parse "si.pool.ntp.org": Non-recoverable failure in name resolution
could not parse "time.ijs.si": Non-recoverable failure in name resolution
no reply received in time, skipping initial time setting
pipe write error (from main): No error: 0
ntp engine exiting
Terminating
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime adjusted frequency by -4.019989ppm
ntp engine ready
could not parse "www.google.com": Non-recoverable failure in name resolution
could not parse "si.pool.ntp.org": Non-recoverable failure in name resolution
could not parse "time.ijs.si": Non-recoverable failure in name resolution
no reply received in time, skipping initial time setting
pipe write error (from main): No error: 0
ntp engine exiting
Terminating
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime adjusted frequency by -4.019989ppm
ntp engine ready
could not parse "www.google.com": Non-recoverable failure in name resolution
could not parse "si.pool.ntp.org": Non-recoverable failure in name resolution
could not parse "time.ijs.si": Non-recoverable failure in name resolution
no reply received in time, skipping initial time setting
pipe write error (from main): No error: 0
ntp engine exiting
Terminating
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime returns frequency of 0.000000ppm
ntp_adjtime adjusted frequency by -4.019989ppm
ntp engine ready
could not parse "www.google.com": Non-recoverable failure in name resolution
could not parse "si.pool.ntp.org": Non-recoverable failure in name resolution
could not parse "time.ijs.si": Non-recoverable failure in name resolution
no reply received in time, skipping initial time setting
(END)

I haven’t had this system up for a while, but I noticed 2,8 sec lag:

So I ran what @kezkankrayon suggested and my clock is working ok:

# echo 0.0 > /var/db/ntpd.drift
# ntpd -s

timeIsOK

Running system:
# about

===================
General information
===================

boot environment now (N) … 12.0-CURRENT-up-20180806_100705 NR 2018-08-06
       after restart (R) … 12.0-CURRENT-up-20180806_100705 NR 2018-08-06
boot loader …………………………………… BSD
            type ……………………… EFI
CPU ………………………………………………………… Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    number of cores ……………… 8
host ……………………………………………………… trueos.rula.org
memory ………………………………………………… 16384 MB available, 13299 MB free
OS git branch ……………………………………………………………………………………… trueos-stable-18.03
OS git revision ………………………………………………………………………………… fa797a5a3
OS kernel build time ………………………………………………………… Mon 2018 Mar 26 00:24:47 UTC
OS kernel identity …………………………………………… (uname -i) GENERIC
OS platform (architecture) ……………………… (uname -m) amd64
OS release level ………………………………………………… (uname -r) 12.0-CURRENT
OS version and patch level …… (freebsd-version) 12.0-CURRENT
TrueOS package set ………………… STABLE
TrueOS version …………………………… TrueOS-Desktop-201803131015
uptime ………………………………………………… 42 mins
user  …………………………………………………… root

More (TrueOS Desktop):

    desktop environment …… Xfce Session
    sound card driver ………… pcm0: <Realtek ALC1150 (Rear Analog 5.1/2.0)> (play/rec) default
    wireless driver ……………… 
    X11 drivers ………………………… nvidia_drv.so