Xavier system time is unstable

Hi,

Our new Xavier system time seems unstable. It automatically jump from current network time to another manually set time. Under such a situation, when open the browser, it will remind me to set the time firstly. I choose to set the time automatically from the internet. However, the system time will jump from internet time to previous wrongly manually set time.

How to make the system time stable? Thanks

Best regards,
Ray

It’s hard to say…lots of things can get in the way of NTP, e.g., firewalls, invalid proxy settings, so on. Then there are manually configured settings to consider on top of that. What do you see for these, and are they correct for your case?

ls -l /etc/localtime
cat /etc/timezone

Also, see this:
https://help.ubuntu.com/community/UbuntuTime

You might mention if the value is changing after reboot only, or changing during the middle of running, along with whether there is any kind of proxy or firewall involved.

I just checked the localtime and timezone according to your recommended commands. The displayed results shown as below:

  1. ls -l /etc/localtime
    lrwxrwxrwx 1 root root 39 Dec 19 16:03 /etc/localtime → /usr/share/zoneinfo/America/Los_Angeles

2.cat /etc/timezone
America/Los_Angeles

Today is Dec 27. And the time is wrong.

This would imply NTP is failing. Do you have a regular router appliance, or is the PC acting as router? Is there any kind of proxy or firewall involved? Does the rest of networking appear to be ok, e.g., does “host nvidia.com” work?

For the corresponding concerns, I can confirm that the router is a regular one. There should be no firewall involved. The nvidia.com seems Ok. I am confused why the manually set time can’t keep constant (It sometimes jump). Thanks for your reply.

Well…it can depend on which NTP server you are talking to. Delayed availability of networking would cause NTP to fail due to requesting a time update prior to networking being up. Even a slow DNS reply to a named address would be a possible reason it failed…the system moves on without NTP if it doesn’t receive a timely reply (I don’t know what the time limit is though). Sometimes people don’t even realize that DNS itself is not working (see if “host nvidia.com” works).

What do you see from:

timedatectl

If you check the selected current time zone via “cat /etc/timezone”, does that time zone show up as available from:

timedatectl list-timezones
# Example for North American time zones:
timedatectl list-timezones | grep -i 'america'

If the service just isn’t enabled, try:

sudo timedatectl set-ntp on

When typing: timedatectl, the results show as follows:

  Local time: Thu 2018-12-27 18:05:38 PST                                   

Universal time: Fri 2018-12-28 02:05:38 UTC
RTC time: n/a
Time zone: America/Los_Angeles (PST, -0800)
Network time on: no
NTP synchronized: yes
RTC in local TZ: no

It is totally wrong. Today is January 04, 2019.

When trying: timedatectl list-timezones

I can find the timezone in the results list. The timezone which I set is Los Angeles.

There is an “underscore” (‘_’) between “Los” and “Angeles”. What do you see from:

timedatectl list-timezones | grep 'Los<b>_</b>Angeles'

You should see:

America/Los<b>_</b>Angeles

Currently I’m just using UTC, but I just now ran “sudo timedatectl set-timezone America/Los_Angeles”:

# timedatectl
                      Local time: Sat 2019-01-05 12:12:55 PST
                  Universal time: Sat 2019-01-05 20:12:55 UTC
                        RTC time: Sat 2019-01-05 20:12:55
                       Time zone: America/Los_Angeles (PST, -0800)
       <b><i>System clock synchronized</i>: yes</b>
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

Your output format is different than what I see. Which release are you using? See:

head -n 1 /etc/nv_tegra_release

The highlighted line is where yours looks different. I’m using R31.1.

After your system is fully booted and you know the network is correct, what happens if you manually switch to UTC and then back to “America/Los_Angeles”:

sudo timedatectl set-timezone UTC
sudo timedatectl set-timezone America/Los<b>_</b>Angeles
# reboot...then check output again for "timedatectl" and "date" commands.

Once I reboot (I set to MST though) I see:

# timedatectl
                      Local time: Sat 2019-01-05 13:20:16 MST
                  Universal time: Sat 2019-01-05 20:20:16 UTC
                        RTC time: Sat 2019-01-05 20:20:16
                       Time zone: America/Denver (MST, -0700)
       System clock synchronized: no
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

So it is interesting to see “System clock synchronized: no”, and yet the time is accurate (of course there was no time between reboots and the power was never removed…I’ll check again later after power has been off for some time). What I’m more interested in is that it seems you are using a completely different set of software since the wording changed.

When using: timedatectl list-timezones | grep ‘Los_Angeles’

I can see: America/Los_Angeles

When using: timedatectl

The results shown below:

  Local time: Thu 2018-12-27 18:21:21 PST                                   

Universal time: Fri 2018-12-28 02:21:21 UTC
RTC time: n/a
Time zone: America/Los_Angeles (PST, -0800)
Network time on: no
NTP synchronized: yes
RTC in local TZ: no

The result is wrong since today is January 10, 2019

After running the following commands:
sudo timedatectl set-timezone UTC
sudo timedatectl set-timezone America/Los_Angeles

reboot…then check output again for “timedatectl” and “date” commands.

Rebooting the system. Then type the commands: timedatectl
The result shows below:

  Local time: Tue 2018-10-02 20:43:50 PDT                                   

Universal time: Wed 2018-10-03 03:43:50 UTC
RTC time: n/a
Time zone: America/Los_Angeles (PDT, -0700)
Network time on: no
NTP synchronized: no
RTC in local TZ: no

It is wrong since today is January 10, 2019.

When I set the time from “Manually” to “Automatically from the Internet”, I can get the correct time and date. However, when I reboot the system, it will change back to “Manually” again.

I haven’t had that issue, but how are you setting for automatic? Maybe this can be reproduced. Also, which account are you logged in to when setting this? Also, which release are you using? See “head -n 1 /etc/nv_tegra_release”.