RTC in JP 5.x

This is a memo how we fix the RTC issue of JP 5.1.1.

Step 1. Change the Kerenl with the below Settings

# build/.config
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

# Reference:
# https://forums.developer.nvidia.com/t/rtc-cant-hold-time-the-after-system-rebooted-in-l4t-35-1/231889/14

Step 2. Update rootfs/lib/udev/rules.d/50-udev-default.rules

# Open the file
sudo gedit rootfs/lib/udev/rules.d/50-udev-default.rules 

# Make sure the following two lines is as the below
SUBSYSTEM=="rtc", ATTR{hctosys}=="0", SYMLINK+="rtc"
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc"

Then, make sure your system has the following settings, which is our default settings in pre-built system image.

# Using Network Clock
# $ sudo timedatectl set-local-rtc 0
$ sudo timedatectl
               Local time: Wed 2023-09-06 01:12:38 UTC
           Universal time: Wed 2023-09-06 01:12:38 UTC
                 RTC time: Wed 2023-09-06 01:12:37
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Step 3. Test the RTC clock

  • Make sure you have the current time set

  • Make sure you have the Ethernet cable unplugged

  • Shutdown the computer and unplugged the DC input for 60 seconds

  • Boot the computer on and test the RTC clock with the below commands

Another approach to test the internal hardware clock is to use sudo dmesg | grep -i rtc

Last updated