Page 1 of 1

RTC:The time is incorrect after each restart

Posted: 08 Jan 2020, 03:26
by huanghuapan
Hi Sir:
We use the Revpi core3+,but we find the time is incorrect after each restart,the system is stretch 9.8.Now we cannot access the hardware clock.read time faild: Invalid argument.
Do you know the reason?

Re: RTC:The time is incorrect after each restart

Posted: 09 Jan 2020, 14:42
by zhan
Hi Huanghuapan,

this happens while linux is trying to read the time on the rtc device.
It might be caused by the damage of the devicetree, or fault of hardware.
Could you please post the output of following commands for the further debugging:
cat /proc/devices
cat /proc/driver/rtc
ls -l /dev/rtc*
sudo timedatectl
dmesg # executed after timedatectl and cat
tree /proc/device-tree/

Re: RTC:The time is incorrect after each restart

Posted: 16 Nov 2022, 10:39
by KarimS
Hi Simon,

I think I have a somewhat related issue with the hwclock. I cannot discern whether it is a software or hardware issue.

This I get when trying to access the hwclock:

Code: Select all

pt_linux@RevPi35313:~ $ sudo hwclock --verbose
hwclock from util-linux 2.33.1
System Time: 1668522779.433151
Trying to open: /dev/rtc0
Trying to open: /dev/rtc
Trying to open: /dev/misc/rtc
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
The kernel buffer has the following entries:

Code: Select all

pt_linux@RevPi35313:~ $ sudo dmesg | grep rtc
[    2.199580] rtc-pcf2127-i2c 1-0051: pcf2127_rtc_read_time: read error
[    2.201225] rtc-pcf2127-i2c 1-0051: rtc core: registered rtc-pcf2127-i2c as rtc0
[    2.204321] rtc-pcf2127-i2c 1-0051: pcf2127_rtc_read_time: read error
[    2.205838] rtc-pcf2127-i2c 1-0051: hctosys: unable to read the hardware clock
[    2.209365] rtc-pcf2127-i2c: probe of 1-0051 failed with error -121
And running the suggested commands from the previous post yields the following:
https://support.plassertheurer.com/ws/? ... c24f5fd374

Re: RTC:The time is incorrect after each restart

Posted: 16 Nov 2022, 12:53
by nicolaiB
Does this error persist, after the system was powered up for a while? If not this is probably because of the super capacitor was not charged fast enough (mostly due to longer time off).

Nicolai