You need either of:

1) a battery backup for the real-time clock so that it starts at a reasonable time.
2) Use -w option to phc2sys so that it waits until ptp4l is synchronized.
3) Use the -S option to phc2sys so that it steps the clock if the offset is above some threshold.

By default, phc2sys will step the clock only once at startup, but here the clock has jumped from the epoch after phc2sys started. It would take a very long time (530 years in this case) to adjust for that without stepping the clock.

- Ed

On 6/15/23 19:06, Nemo Crypto wrote:
Hi LinuxPTPUsers,

I have this weird problem sometimes with phc2syc. Please look at the log below, ptp4l service is perfectly okay. But the phc2sys is stuck (although it measures the offset correctly) and not adjusting the system time for some reason. Why would this happen? Waiting for more than 30 minutes didn't fix this problem.

Several reboots fixes the issue.

1970-01-01T00:05:09.600718+00:00 phc2sys: [304.725] CLOCK_REALTIME phc offset 
-1686774497008453238 s2 freq -100000000 delay   1372

1970-01-01T00:05:09.628181+00:00 ptp4l: [304.752] master offset        198 s3 
freq  -35590 path delay       323

1970-01-01T00:05:10.611304+00:00 phc2sys: [305.735] CLOCK_REALTIME phc offset 
-1686774496916583694 s2 freq -100000000 delay   1372

1970-01-01T00:05:10.728644+00:00 ptp4l: [305.853] master offset        -63 s3 
freq  -35792 path delay       323

1970-01-01T00:05:11.618971+00:00 phc2sys: [306.743] CLOCK_REALTIME phc offset 
-1686774496824974153 s2 freq -100000000 delay   1373

1970-01-01T00:05:11.829106+00:00 ptp4l: [306.953] master offset       -121 s3 
freq  -35869 path delay       323

1970-01-01T00:05:12.717043+00:00 phc2sys: [307.841] CLOCK_REALTIME phc offset 
-1686774496725151408 s2 freq -100000000 delay   1408

1970-01-01T00:05:12.929540+00:00 ptp4l: [308.054] master offset        111 s3 
freq  -35673 path delay       323

1970-01-01T00:05:13.721458+00:00 phc2sys: [308.846] CLOCK_REALTIME phc offset 
-1686774496633835940 s2 freq -100000000 delay   1373

1970-01-01T00:05:14.030032+00:00 ptp4l: [309.154] master offset       -112 s3 
freq  -35863 path delay       323



Thanks,
Nemo






_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to