Why is Linux showing the wrong time before the internet is available?

0
0
Asked By MellowCedar42 On

My Linux Mint laptop often starts with the clock a few hours off, then corrects itself as soon as Wi‑Fi connects. I initially suspected the CMOS/RTC battery, but the BIOS clock is usually accurate to within about five seconds. On one boot, Mint was around ten minutes fast while the BIOS clock was still correct.

The laptop is a second-hand Dell Latitude 5320 with an 11th-generation Intel processor, roughly four or five years old. Its main battery has poor health and has already failed twice, but I have not noticed other typical signs of a dead RTC battery, such as the BIOS clock resetting to the same date and time or boot problems. The command `cat /proc/driver/rtc | grep batt` reports that the battery status is okay.

I dual-boot with Windows, although I have not used Windows for several months. Could this still be caused by the difference between Windows storing the hardware clock as local time and Linux storing it as UTC? How can I distinguish that from a failing RTC battery, and is replacing the battery worthwhile?

3 Answers

Answered By CopperFable31 On

A weak RTC battery normally causes the BIOS clock to lose time while the machine is powered off, often resetting to a predictable date or time. Compare the clock directly in BIOS after the laptop has been shut down for a while, then compare it again after another shutdown. If BIOS remains accurate but Linux is wrong only until Wi‑Fi connects, the RTC battery is probably not the main issue.

Answered By OrbitingPanda7 On

A dual-boot time-zone mismatch is the first thing to check. Windows commonly treats the motherboard’s RTC as local time, while Linux normally treats it as UTC and applies the time zone afterward. Switching between them can create an offset of several hours until network time synchronization runs. The usual fix is to configure both operating systems to use the same RTC convention, rather than replacing the battery immediately.

QuietHarbor19 -

That still seems possible even if Windows has not been started recently, especially if the RTC convention was changed during the original dual-boot setup. The Windows registry setting and Linux time configuration should agree.

Answered By NimbleQuartz8 On

The battery-status result is useful, but it is not a perfect health test because many laptops cannot measure the coin-cell voltage accurately. If the BIOS clock really drifts by minutes or resets after power has been removed, replacing the RTC battery is inexpensive and reasonable. The laptop’s failed main battery is a separate problem and does not by itself prove that the CMOS battery is bad.

BlueMango26 -

A ten-minute difference is more than the normal small drift expected from an RTC, so I would also check Linux’s time-zone and NTP configuration before opening the laptop.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.