Hi,
I am using a Jetson TX2 and I am not able to get an ntp server running. I know that this question has already been asked https://devtalk.nvidia.com/default/topic/919341/jetson-tk1/date-and-time-on-jetson-are-reset-at-every-boot/# but the solutions proposed did not work for me.
My TX2 is connected in Ethernet to a laptop computer on which ntp is running flawlessly.
If I run on my laptop
sudo service ntp status
I get
* NTP server is running
On my TX2 I have, in the
/etc/ntp.conf
file the following (where 10.42.1.1 is the IP of the Laptop I am connected through ethernet):
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
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
# Specify one or more NTP servers.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst
# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.com
server 10.42.1.1
pool 10.42.1.1
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Needed for adding pool entries
restrict source notrap nomodify noquery
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
#Changes recquired to use pps synchonisation as explained in documentation:
#http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3918
#server 127.127.8.1 mode 135 prefer # Meinberg GPS167 with PPS
#fudge 127.127.8.1 time1 0.0042 # relative to PPS for my hardware
#server 127.127.22.1 # ATOM(PPS)
#fudge 127.127.22.1 flag3 1 # enable PPS API
When I do, on the TX2,
sudo service ntp status
I get:
nvidia@tegra-ubuntu:~$ sudo service ntp status
â—Ź ntp.service - LSB: Start NTP daemon
Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
Active: active (running) since Tue 2018-04-24 23:47:34 CEST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 4160 ExecStop=/etc/init.d/ntp stop (code=exited, status=0/SUCCESS)
Process: 4172 ExecStart=/etc/init.d/ntp start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/ntp.service
└─4183 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 122:128
Apr 24 23:47:34 tegra-ubuntu ntp[4172]: ...done.
Apr 24 23:47:34 tegra-ubuntu systemd[1]: Started LSB: Start NTP daemon.
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: proto: precision = 0.128 usec (-23)
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen and drop on 0 v6wildcard [::]:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen and drop on 1 v4wildcard 0.0.0.0:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen normally on 2 lo 127.0.0.1:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen normally on 3 eth0 10.42.1.10:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen normally on 4 lo [::1]:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listen normally on 5 eth0 [fe80::6ba6:b029:830a:516a%3]:123
Apr 24 23:47:34 tegra-ubuntu ntpd[4183]: Listening on routing socket on fd #22 for interface updates
Anyway, if I remove power from my TX2 and then plug it in again I have always the wrong time set .
Someone can help me please?