NTP setting the system time failed on drive os 5.1.6

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
[√] NVIDIA DRIVE™ Software 10.0 (Linux)

Target Operating System
[√] Linux

Hardware Platform
[√] NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version
[√] other

Host Machine Version
[√] native Ubuntu 18.04

Hello,
We can not synchronize the time via NTP on pegasus/drive os 5.1.6.

We enabled the NTP service to the synchronize the time and it can get the last time, but the system time will be set to the “2019.xx.xx. …” soon. It seems that another service or process will set the system time periodically.

So we want to know how to fixed the time changed issue to make our time synchronization work properly.

test log:

nvidia@tegra-ubuntu:~$ timedatectl set-ntp 1
==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp ===
network time synchronization shall be enabled.
Authenticating as: , (nvidia)
Password:
==== AUTHENTICATION COMPLETE ===

nvidia@tegra-ubuntu:~$ timedatectl
Local time: Tue 2021-10-19 14:09:59 CST
Universal time: Tue {color:#4c9aff}2021-10-19 06:09:59 UTC{color}
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no

nvidia@tegra-ubuntu:~$ timedatectl
Local time: Tue 2021-10-19 14:10:02 CST
Universal time: Tue {color:#4c9aff}2021-10-19 06:10:02 UTC{color}
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no

nvidia@tegra-ubuntu:~$ timedatectl
Local time: Tue 2021-10-19 14:10:04 CST
Universal time: Tue {color:#4c9aff}2021-10-19 06:10:04 UTC{color}
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no

nvidia@tegra-ubuntu:~$ timedatectl
Local time: Sun 2019-09-22 14:27:31 CST
Universal time: Sun {color:#de350b}2019-09-22 06:27:31 UTC{color}
RTC time: n/a
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no

Thank you in advance for your help.

Dear @ying.chen7,
Is this happening on a freshly installed DRIVE SW 10? Could you check if reflashing fixes? I don’t see this issue happening on latest release(DRIVE OS 5.2.6). Also, please see https://www.linuxuprising.com/2019/07/how-to-set-timezone-and-enable-network.html if it helps

Hi, @ying.chen7

Please refer to Clock setting issue on Drive AGX Xavier upon set up. Thanks.

Hello @ VickNV & @SivaRamaKrishnaNV,
Thank you for your replay.

Finally we resolved the issue:
we found that the ptp service will be started on pegasus XA(nv_ptp_master.service)&XB(nv_ptp_slave.service). The ptp service will update the system time periodically so the NTP update the system time failed. After I stopped PTP service on XA&XB the NTP worked properly.

So my new question is: why the ptp service will be started after drive os startup? Can I disable the ptp service? (Because we will use another ptp device to sync time for XA&XB.)

Thanks

Yes,my system was freshly installed,pls refer to my new reply.

Dear @ying.chen7,
Please check if sudo systemctl stop nv_ptp_master/slave && sudo systemctl disable nv_ptp_master/slave works for you. Please file a new topic for future queries to avoid cluttering

Hello @ SivaRamaKrishnaNV

The command “sudo systemctl stop & disable …” works now.I have stopped the service currently, I’ll create a new topic later if this solution has new problems.

Thanks.