You are not logged in.

#1 2024-02-14 10:06:25

pigeonsownme
Member
Registered: 2024-02-14
Posts: 2

RTC gets set wrong every time I shutdown

It seems like whenever I shutdown (usually with "shutdown now"), my RTC gets advanced by one hour.

I'm on a laptop with only arch installed, my hardware clock is in UTC.

This is what I get when I run timedatectl immediately after startup (ran at 9:49 UTC), before my laptop connects to the internet.

               Local time: Wed 2024-02-14 11:49:11 CET
           Universal time: Wed 2024-02-14 10:49:11 UTC
                 RTC time: Wed 2024-02-14 10:49:11
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

This is after I connect to the internet (ran at 10:02 UTC).

               Local time: Wed 2024-02-14 11:02:19 CET
           Universal time: Wed 2024-02-14 10:02:19 UTC
                 RTC time: Wed 2024-02-14 10:02:19
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

If I'm not wrong, my hardware clock is set correctly here by the NTP service, and yet when I reboot, it's back to being one hour off.

What could be causing this/what did I miss ?

Offline

#2 2024-02-14 10:22:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Offline

#3 2024-02-14 10:26:26

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: RTC gets set wrong every time I shutdown

pigeonsownme wrote:

I'm on a laptop with only arch installed, my hardware clock is in UTC.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2024-02-14 10:38:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: RTC gets set wrong every time I shutdown

Well, something™ aligns the RTC to CET - if absolutely not windows maybe the pre-boot system?
Does the RTC also come up in CET when booting some live distro?
After syncing the time, what's the output of

sudo hwclock -r

Offline

#5 2024-02-15 10:02:02

pigeonsownme
Member
Registered: 2024-02-14
Posts: 2

Re: RTC gets set wrong every time I shutdown

I'm using a Microsoft Surface Laptop, so maybe it is the "pre-boot system", as you say...

Tried booting from my arch install USB, and the RTC was in CET (according to timedatectl).

After syncing the time at 9:57 UTC,

willow@~$ sudo hwclock -r
2024-02-15 10:57:36.017590+01:00

I tried setting the RTC to localtime, and that makes it behave like normal (when I reboot, the time is as I left it, rather than advancing by one hour). So that's one solution... But I don't understand why that works ?

Offline

#6 2024-02-15 10:29:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: RTC gets set wrong every time I shutdown

The RTC gets properly written.
If anything else insist on setting the RTC in localtime and you cannot alter that, you'll have to treat it as such.

You could try to stop and disable any time sync'ing daemons (systemd-timesyncd, ntpd, …) use hwclock to set the rtc slightly, but notably off (like 30 minutes in the future, increasing the gap to much increases the risk to run into some timestamp issues), reboot (ideally into the rescue.target, 2nd link below) and see whether RTC was "magically" corrected by anything.

Offline

Board footer

Powered by FluxBB