You are not logged in.
Pages: 1
Hi,
On boot, my system time is way-way (few months!) out of sync from my RTC (the RTC time is correct). That's not a problem when there is a network connection - NTP fixes that, but when there is no network, I'd like my system time to be the same as the RTC on boot (ignoring the timezone for now).
I know I can run `hwclock --hctosys` on boot, and it works, but shouldn't the kernel do this automatically?
I have the following in my kernel config:
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
(And it's indeed `rtc0`)
Offline
Maybe the device shows up too late?
dmesg | grep -i rtc
lsmod | grep -i rtc
Online
dmesg | grep -i rtc lsmod | grep -i rtc
Hmm... strange - both are empty!
However:
find /sys/ -name rtc0
-----------------------------
/sys/class/rtc/rtc0
/sys/devices/platform/rtc_cmos/rtc/rtc0
For comparison, on another machine where it does work, `dmesg | grep -i rtc` gives:
[ 0.518815] PM: RTC time: 07:51:30, date: 2020-04-02
[ 2.592682] rtc_cmos 00:02: RTC can wake from S4
[ 2.592967] rtc_cmos 00:02: registered as rtc0
[ 2.592988] rtc_cmos 00:02: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[ 2.621789] rtc_cmos 00:02: setting system clock to 2020-04-02T07:51:33 UTC (1585813893)
...and `lsmod | grep -i rtc` is empty as well.
Last edited by blochl (2020-04-02 15:42:26)
Offline
Pages: 1