Boot has wrong time 5 times out of 24

Hello, I’ve installed a battery and patched the kernel like in Jetson Orin RTC It seems to work fine most of the time but about 21% of the time, it boots with the wrong time and is later corrected. can i get it to boot with the correct time stored in rtc0 every time? can i disabled rtc1 somehow?

here’s a couple of lines from syslog when it boots with the right time:

Nov 21 06:23:42 hostname kernel: [    4.593245] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 21 06:23:42 hostname kernel: [    4.764994] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 21 08:08:31 hostname kernel: [    4.595118] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 21 08:08:31 hostname kernel: [    4.731952] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 21 22:04:06 hostname kernel: [    4.595863] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 21 22:04:06 hostname kernel: [    4.767095] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 21 22:52:18 hostname kernel: [    4.597458] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 21 22:52:18 hostname kernel: [    4.768827] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 00:02:11 hostname kernel: [    4.597255] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 00:02:11 hostname kernel: [    4.731126] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 01:37:14 hostname kernel: [    4.594226] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 01:37:14 hostname kernel: [    4.731408] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 04:02:41 hostname kernel: [    4.595258] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 04:02:41 hostname kernel: [    4.729847] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 04:47:40 hostname kernel: [    4.594870] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 04:47:40 hostname kernel: [    4.727064] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 06:27:13 hostname kernel: [    4.593582] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 06:27:13 hostname kernel: [    4.730064] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 06:33:27 hostname kernel: [    4.594521] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 06:33:27 hostname kernel: [    4.731575] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 22 23:11:23 hostname kernel: [    4.594006] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 22 23:11:23 hostname kernel: [    4.727237] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 23 00:11:08 hostname kernel: [    4.597962] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 23 00:11:08 hostname kernel: [    4.735285] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 23 03:09:35 hostname kernel: [    4.595179] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 23 03:09:35 hostname kernel: [    4.766229] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 23 21:45:30 hostname kernel: [    4.597177] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 23 21:45:30 hostname kernel: [    4.734548] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 23 23:27:22 hostname kernel: [    4.593688] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 23 23:27:22 hostname kernel: [    4.728489] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 24 00:16:25 hostname kernel: [    4.600161] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 24 00:16:25 hostname kernel: [    4.771166] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 24 02:12:10 hostname kernel: [    4.597892] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 24 02:12:10 hostname kernel: [    4.733768] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 24 03:40:21 hostname kernel: [    4.593542] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 24 03:40:21 hostname kernel: [    4.728382] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Nov 24 04:30:08 hostname kernel: [    4.595732] tegra_rtc c2a0000.rtc: registered as rtc1
Nov 24 04:30:08 hostname kernel: [    4.767308] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0

and here’s the same lines when it boots with the wrong time.

Aug 31 15:27:34 hostname kernel: [    4.600478] tegra_rtc c2a0000.rtc: registered as rtc1
Aug 31 15:27:34 hostname kernel: [    4.738242] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Aug 31 15:27:34 hostname kernel: [    4.599206] tegra_rtc c2a0000.rtc: registered as rtc1
Aug 31 15:27:34 hostname kernel: [    4.772486] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Aug 31 15:27:34 hostname kernel: [    4.599392] tegra_rtc c2a0000.rtc: registered as rtc1
Aug 31 15:27:34 hostname kernel: [    4.734232] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Aug 31 15:27:35 hostname kernel: [    4.592865] tegra_rtc c2a0000.rtc: registered as rtc1
Aug 31 15:27:35 hostname kernel: [    4.728841] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
Aug 31 15:27:34 hostname kernel: [    4.610423] tegra_rtc c2a0000.rtc: registered as rtc1
Aug 31 15:27:34 hostname kernel: [    4.781104] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0

rtc0 is the one with the correct time but /dev/rtc is linking to rtc1

user@hostname:/dev$ ls -l rtc*
lrwxrwxrwx 1 root root      4 Aug 31 15:27 rtc -> rtc1
crw------- 1 root root 250, 0 Aug 31 15:27 rtc0
crw------- 1 root root 250, 1 Aug 31 15:27 rtc1

Hi,

Please refer to RTC can't hold time the after system rebooted in L4T 35.1 - #17 by barryhung

and modify the tegra_defconfig to set CONFIG_RTC_HCTOSYS_DEVICE to rtc0.

1 Like