System Time Resets

My system time resets every time I boot by about 1 hour and 15 minutes. Once I connect to Wifi, the time adjusts. I already tried various suggestions that I found on the web but nothing helps.

Here the output of timedatectl:

               Local time: Thu 2024-07-18 10:54:09 JST
           Universal time: Thu 2024-07-18 01:54:09 UTC
                 RTC time: Thu 2024-07-18 01:54:09
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

and from hwclock:

hwclock from util-linux 2.40.2
System Time: 1721267821.355448
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1705941311 seconds after 1969
Last calibration done at 1705941311 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2024/07/18 01:57:02
Hw clock time : 2024/07/18 01:57:02 = 1721267822 seconds since 1969
Time since last adjustment is 15326511 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2024-07-18 10:57:01.360799+09:00

It seems that everything looks perfect, so I am at a complete loss what could be wrong. There are only two ideas I have. 1) my bootmanager is rEFInd, maybe this messes with the time (but why?) and 2) I am running the linux-surface kernel and maybe MS is making my life hard.

Welcome @rommeswi! :wave: :sunglasses: :enos_flag:

Two thoughts come to my mind.

  • Do you dual boot? The other OS may be adjusting the time standard.
  • How old is your system?

You mentioned “linux-surface”, so presumably this is a laptop? Have you noticed any other settings being reset in your BIOS/UEFI?

I would check the CMOS battery as modern computers typically only use it to power the system clock and whenever power is completely cut with the battery removed, the time will need to re-synced while other BIOS settings should stick. This recently started to happen on my AMD X570 system and I first noticed during an extended power outage where I had to turn off the UPS. Checking the VBAT voltage reading in HWINFO64 under Windows confirmed only 0.9 volts instead of 3-3.3V. I also had weird time offsets like you from time to time.

My mind was going the same way (hence the age question), however it would seem @rommeswi’s issue is on a laptop, specifically a Microsoft Surface. I’m not sure this would have a CMOS battery like desktops do.
Also, in my experience at least (gen 1 Surface Book), it’s not possible to open these without destroying the device, or extreme risk of.

@rommeswi
Are you dual booting with Windows?

Edit: I usually set the correct time in Windows and then boot into EOS and run

timedatectl set-local-rtc 1

Although I have two systems set up (Manjaro and EndeavourOS), I only ever start EndeavourOS. My system is 2 years old and I have this issue ever since I installed linux. I am fairly sure it is not some battery issue because the offset is so consistent (I get startled regularly: what, it’s already an hour later than I thought!). Here is also what is saved in /etc/adjtime:

0.000000 1705941311 0.000000
1705941311
UTC

…but I have no clue what this means.

Is this a Surface Pro? I have a 7 which loses time when it sleeps/powered off.

1 Like

Yes, it is a Surface Pro 8!
However, it is strange because while it does lose time, the offset is consistent. So it somehow does still track time. But perhaps this is better discussed in the linux-surface community if this is just an issue with the Surface Pro!

This might be a long shot but you mentioned the time resets as soon as you connect to your wifi.

Is it possible that your router reset your computer time? It might be possible that your router is set up to a different time zone or different time?

Will fire it up when I get home. If I try to use at work, the ntp servers are blocked and I have to set manually, so I don’t carry around anymore. At home it syncs almost immediately with an ntp server and corrects.