On Thu, Dec 08, 2016 at 04:47:03AM +0000, Brian Kuschak wrote:
> I'm trying to set up something simple.  I want chrony to grab NMEA time as 
> soon as it's available, and then sync to PPS.  This system (BBB) has no 
> battery-backed RTC and no network access.
> 
> When the time is initially correct (set via NTP when connected to network), 
> chrony seems to work, and locks to PPS. But when it powers up with a default 
> date of 2000, it never syncs after getting GPS lock.
> 
> 
> It seems to step once, to the bogus RTC time.  But then it never steps to 
> NMEA time. 

>From the log it looks like it's actually the NMEA source what is wrong
and from the date (22 Aug 1998) it's probably something related to
the GPS week rollover. After the initial step there are other steps,
so maybe gpsd or GPS gets into some weird state, which breaks PPS. Do
you have the latest gpsd and GPS firmware?

It might help us to see the "-d -d" output.

If you add the -s option, chronyd should set the system time on start
to the last modification time of the driftfile, and this might avoid
the gpsd/GPS bug. But I'd be curious to know what exactly is
happening.

> root@beaglebone:~# chronyd -d
> 2000-01-01T00:01:29Z chronyd version 2.4 starting (+CMDMON +NTP +REFCLOCK 
> +RTC -PRIVDROP -SCFILTER -SECHASH +ASYNCDNS +IPV6 +DEBUG)
> 2000-01-01T00:01:29Z Setting filter length for PPS to 1
> 2000-01-01T00:01:29Z Setting filter length for NMEA to 2
> 2000-01-01T00:01:29Z Frequency -40.366 +/- 234.206 ppm read from 
> /var/lib/chrony/chrony.drift
> 2000-01-01T00:01:29Z Using right/UTC timezone to obtain leap second data
> 2000-01-01T00:01:36Z Selected source NMEA
> 2000-01-01T00:01:36Z System clock wrong by -11404807.817246 seconds, 
> adjustment started
> 1999-08-22T00:01:28Z System clock was stepped by -11404807.817246 seconds
> 1999-08-22T00:01:55Z Can't synchronise: no selectable sources
> 1999-08-22T00:02:00Z Selected source NMEA
> 1999-08-22T00:02:02Z System clock wrong by -0.029797 seconds, adjustment 
> started
> 1999-08-22T00:02:04Z System clock wrong by 0.020517 seconds, adjustment 
> started
> 1999-08-22T00:02:15Z RTC wrong by 11404807.787 seconds (step)
> 1999-08-22T00:02:15Z Could not set RTC time
> 1999-08-22T00:02:18Z Can't synchronise: no selectable sources
> 1999-08-22T00:02:36Z Selected source NMEA
> 1999-08-22T00:02:36Z System clock wrong by 361331.850290 seconds, adjustment 
> started
> 1999-08-26T04:24:48Z System clock was stepped by 361331.850290 seconds
> 1999-08-26T04:24:50Z Can't synchronise: no selectable sources
> 1999-08-26T04:25:10Z RTC wrong by 11043475.933 seconds (step)
> 1999-08-26T04:25:10Z Could not set RTC time

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

Reply via email to