RTC time&date are correct but system time&date are reset after reboot

Hi there,

I’ve been reading through all the previous post related to this issue, but I am not sure oh how to solve the problem.
As the title says, I connected a RTC battery to my Jetson Orin AGX Dev Kit and when executting $sudo hwclock I get the correct time and date. However, the system time is reset to 15/03/2023 after every reboot. If I run $ sudo hwclock -s the system time is correctly set to the RTC time. My question is how to call this command on every reboot (I’d like to know also if there’s a smarter solution). I am quite a noob on Ubuntu systems and I have read something about creating a rc-local.service file that executes this command, but I am not sure how to do that and I do not want to mess my system, since I’ve spent a while installing all the required libraries.
I have read also something about modifying the tegra_defconfig, although I think that procedure requires building the kernel and I do not know how to do that or if by doing so I will have to reinstall all the libraries.

My configuration is:
NVIDIA Jetson AGX ORIN Dev Kit
Jetpack 5.1.1
Tegra release 35.3.1

Thank you in advance.

So it seems the solution was quite simple after all. I will answer my own post instead of deleting it just in case someone faces my same problem.

I followed the procedure explained here.
Just some minor modifications: I created the hwclock.service file directly in /etc/systemd/system and inside it, I pointed the adjtime path to /etc/adjtime.
I tried restarting and powering off (unplugging the Jetson) and now the system date is kept correctly.

2 Likes

Glad to know you found the solution, thanks for your sharing!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.