Technical Anshu
Tutorials Blog
🕐 CMOS Battery

Ubuntu Clock Resets to Old Date After Shutdown Dead CMOS Battery Signs

The date says 2009. Again. You fix it, the PC works all day, and after the next full shutdown it is 2009 once more. Software does not forget like this - hardware does. This is the honest test for the little battery that keeps your clock alive while the power is off.

✍️ Technical Anshu🐧 Ubuntu⏱️ 6 minute read
🎥 Watch the full video - every Ubuntu time fix shown live, step by step

While your PC is unplugged, one thing keeps time: the CMOS battery, a coin cell (usually a CR2032) that powers the hardware clock and holds your BIOS settings. It lasts years, not forever. When it dies, the RTC resets to a factory date every time power fully leaves the machine - and because NTP repairs the clock once Ubuntu is online, many people live with the fault for months without naming it. Name it properly, confirm it, and the fix costs less than a cup of tea.

Terminal - the hardware clock read before any internet sync can hide the fault
$ sudo hwclock --show 2009-01-01 00:00:47.483829+05:30
A hardware clock holding a years-old factory date right after a cold boot is the battery's signature. Read yours the same way - immediately after boot, before sync corrects it. Example values.
1

The Signature Pattern - Learn to Recognise It

  1. The clock is wrong after a full shutdown, especially after the PC sat unplugged or switched off at the wall
  2. The wrong date is a fixed old date - the same factory-era value every time, not random drift
  3. Within a minute of connecting to the internet, NTP steps the clock right and everything looks normal
  4. Simple sleep or a warm reboot often does not trigger it - the battery only matters when real power is gone
  5. On many machines the BIOS settings also quietly reset, or a CMOS checksum style message appears at boot

If your error is minutes of drift instead, that is a different fault - sync or RTC ageing. A dead battery does not do "slightly wrong"; it does "decades wrong".

2

Confirm It Before You Open the Machine

  1. Shut the PC down fully. If it is a desktop, switch it off at the wall for a few minutes too
  2. Boot Ubuntu and before the network corrects things, read the hardware clock directly: sudo hwclock --show
  3. A years-old date there is the RTC itself confessing - no software setting makes the hardware hold 2009
  4. Cross-check in timedatectl: the RTC time line will show the same wrong value at that moment
  5. Note whether BIOS settings (boot order, fan profiles) also reset - a second symptom from the same dying battery

Confirmed this way, you are not guessing - you measured the hardware before the software cleaned up the evidence.

3

Rule Out the Two Software Lookalikes First

Honesty before hardware - two software faults dress up as this one:

  1. Dual-boot RTC fight - the error is exactly your zone offset (5:30 in India) and flips depending on which OS ran last. A battery fault is off by years, not hours
  2. Sync never succeeding - time drifts while the PC runs and timedatectl says synchronized: no even after hours online. A battery fault shows correct time all day once NTP has repaired it
  3. Check both with timedatectl in one minute; only then blame the coin cell

Replacing a battery to fix a settings argument is the kind of repair this series exists to prevent.

4

Replace the Battery - Easy on Desktops, Graded on Laptops

  1. Most desktop motherboards use a CR2032 coin cell in an open holder - power off, unplug, pop the old cell out, click the new one in, plus side up
  2. Laptops vary honestly: some use the same cell under a panel; others hide a wrapped cell on a cable, and a few have it effectively built in - for those, treat it as a service job, not a kitchen-table project
  3. Touch something metal first to discharge static, and never force a holder that does not want to open
  4. The battery is cheap; the diagnosis was the valuable part

Do not throw the old cell in household trash if your area collects batteries separately - most electronics shops take them.

5

Set the Clock Right Once After the Swap

  1. Boot up and either set the date and time once in the BIOS setup, or simply let Ubuntu boot and NTP correct it
  2. Once Ubuntu shows the right time with timedatectl reporting synchronized: yes, store it into the hardware: sudo hwclock --systohc
  3. Re-apply any BIOS settings the dying battery had been erasing (boot order is the usual one)
  4. Prove it: full shutdown, wall power off for ten minutes, boot, and read the clock - it should be right before the network even connects

If a brand-new battery does not hold the time either, the fault is the RTC circuit on the board itself - rare, and at that point an old board has told you its age honestly. NTP on every boot becomes the practical way to live with it.

🕐 Why the fault hides: NTP is a good citizen - it repairs the clock silently every boot, so a dead CMOS battery can masquerade as 'Ubuntu is slow to set the time' for a year. Read the hardware clock before sync, and the disguise falls off.

Watch the Complete Video Guide

Watch the video for the cold-boot hardware clock test and the battery swap, including the BIOS settings the dead battery had been wiping.

Watch Full Video
❓ Common Questions (FAQ)

How long does a CMOS battery normally last?

Typically several years - often three to seven, depending on the board and how much time the machine spends unplugged. Machines that sit switched off at the wall drain it faster, because the battery is doing all the work the whole time.

My laptop time resets too. Is it the same battery?

Often yes, but laptop designs vary: some use a standard CR2032 inside, some a small wrapped cell on a lead. If the machine is under warranty or the cell is not user-accessible, treat it as a service job. The diagnosis - hardware clock showing a factory date after full power loss - is identical.

Time is correct all day but wrong for the first minute after boot. Battery?

That is the classic mild presentation: the RTC lost time while powered off, then NTP repaired it. Confirm with sudo hwclock --show immediately after a cold boot with the network off. A factory-era date confirms the battery; being right means your delay is just slow sync, not hardware.

This guide is based on the Technical Anshu Ubuntu time fix video - stuck on any step, ask in the video comments and you will get an answer.