Why do PCs still require a CMOS battery?

31

6

Why do PCs still require a CMOS battery, given that they're already plugged in?

We are providing lots of power to the PC by plugging it into AC mains electricity, so why does it still require a CMOS battery?

Joseph Philipson

Posted 2015-04-30T04:26:47.797

Reputation: 475

30So, you are saying that a battery does not give you "electricity"? – Andreas Rejbrand – 2015-04-30T11:11:30.523

43The way you phrased your question you are implying that pc's ran on something else before, like fuel. – Marcel Burkhard – 2015-04-30T18:23:30.963

7@Marcel I believe Babbage's design would have been powered by steam. Granted it wasn't built, and wouldn't have been a PC, but it wouldn't have used electricity. – cpast – 2015-04-30T19:10:16.590

9@cpast and I thought I was offtopic. – Marcel Burkhard – 2015-04-30T19:23:49.707

7Why does a laptop need a battery, or your phone for that matter? Because they need to perform some operation when they don't have a more continuous power source. Same reason. – jpmc26 – 2015-05-01T06:45:09.727

4The CMOS battery is needed to power the clock in case the steam generator runs out of fuel. – Daniel R Hicks – 2015-05-02T14:45:28.320

LOL @ the above comments.. I would maybe consider the question being asked about laptops/notebooks. But even in that case I considered the fact that Dell probably wouldn't want a CSR being tied up over a BIOS configuration, nor the customer, even if it only comes down to a simple clock adjustment, simply because the user decided to take the external battery out. Now that I think about it, harddrives usually end up being switched out more often than batteries. Maybe laptops should start being made with easy-out harddrives again and keep all of the batteries internal. lol – Jonathan Gray – 2015-05-02T19:32:38.670

Answers

123

The CMOS battery is not there to provide power to the computer when it is in operation, it's there to maintain a small amount of power to the CMOS when the computer is powered off and unplugged. The primary function of this is to keep the clock running even when the computer is turned off. Without the CMOS battery, every time you turned on the computer you would need to reset the clock.

On older systems the CMOS battery also provided the small amount of charge required to maintain the nonvolatile BIOS memory, which remembered BIOS settings between reboots. On modern systems this information is typically stored in flash memory and does not require a charge to be maintained.

nhinkle

Posted 2015-04-30T04:26:47.797

Reputation: 35 057

Or rather "every time you unplugged the computer" - there's a standby power bus on all PSU's and motherboard, as far as I'm aware, which is powered even when the main power switch is off. – user253751 – 2015-04-30T08:22:49.113

1@user20574 he said and, which makes his statement true still – Canadian Luke – 2015-04-30T08:49:47.700

10I learned this during my first internship. We had a computer so old that it no longer kept the time between reboots. Live and learn. – Calculus Knight – 2015-04-30T12:48:51.123

10Since when are BIOS settings stored in flash memory? I don't remember any modern motherboard where I couldn't reset its settings by pulling the battery out... – Ruslan – 2015-04-30T13:23:02.863

4@user20574 AT PSUs really switched the power off. They had a real switch and sent the 230V through it. When the computer was off, it consumed zero electricity. ATX PSUs do no longer have these properties. – Alexander – 2015-04-30T13:32:14.003

11@Alexander Not entirely true. Most of my ATX PSUs do have a real switch on the back. They no longer run 230V to a switch on the front of the computer. So the power button on the front of the computer doesn't turn to PSU off completely, you have to use the one on the back to do that. – kasperd – 2015-04-30T14:10:28.663

4@kasperd Most retail ATX PSUs do, most OEM ATX PSUs don't. IIRC that switch isn't part of the ATX specs (just like the 110/220V switch some older ATX PSUs have). – Alexander – 2015-04-30T14:12:59.263

2@Alexander The main purpose of such a spec is to ensure that mechanically and electrically the components fit together. For that it doesn't need to concern itself with the switch because in its location in the back of the machine it isn't touching anything. I'm sure CE impose some requirements as well but I don't know what they say. – kasperd – 2015-04-30T14:51:39.723

2@Alexander: What ATX PSUs do or don't do is irrelevant if you have all your equipment (CPU, display, router/modem &c) plugged into a power strip/surge protector, and turn the power off & on with that switch. – jamesqf – 2015-04-30T17:40:44.787

2@Ruslan, that doesn't work on my PC. If it did a power-on password would be pretty much meaningless. – Mr. Mascaro – 2015-05-01T13:44:30.077

1@Ruslan, especially some laptops now, the BIOS password won't reset by pulling the battery. You need to short a password reset jumper specifically. – LawrenceC – 2015-05-01T20:19:53.433

Interestingly, on some older Dell Dimension and Dell Optiplex desktops, as the battery died, the clock would start to run faster, sometimes as much as 5 minutes faster per hour! Replacing the battery always brought it back to normal. – Moshe Katz – 2015-05-04T18:54:47.110

34

The CMOS battery, or RTC battery, provides power for the real-time clock so that your computer can continue to keep time when it is unplugged.

  • The name "CMOS battery" is a misnomer on modern computers. Older computers used the battery to maintain BIOS settings, which were stored in a CMOS SRAM chip that would lose its contents if disconnected from power. This setup does have the advantage of making it easy to clear the BIOS settings, either by removing the battery or by inserting or removing a jumper. Newer systems store firmware (BIOS or UEFI) settings in flash memory or EEPROM, which does not require power to maintain data. See: Wikipedia article on nonvolatile BIOS memory and How can a CMOS battery store data?

  • This battery was, and still is, used to maintain the real-time clock. As this is the sole purpose of the battery today, it is sometimes called the RTC battery. This ensures that your computer can continue to keep time even when unplugged. The battery is usually a readily-available CR2032 button cell, and is typically usable for 2 to 10 years. If your computer loses track of time when unplugged for more than a few hours, it is time to replace the battery. See: How long does CMOS battery (3V) on a motherboard last?

CMOS battery on Pico ITX motherboard
CMOS battery on Pico ITX motherboard – Image source

bwDraco

Posted 2015-04-30T04:26:47.797

Reputation: 41 701

2That's one huge battery. – Ayesh K – 2015-05-04T07:38:48.760

@AyeshK But very thin. – user11153 – 2015-05-04T08:36:47.617

How can BIOS settings be reset then if the battery only maintains the RTC? – Peter Mortensen – 2015-05-04T11:26:21.873

5@AyeshK It's more like that's one tiny mainboard. – iFreilicht – 2015-05-04T12:27:56.250

9

Think of it like your car battery. When you unplug the battery, your radio loses all of its presets and the clock resets. Orginally, the CMOS battery held a similar function, maintaining the memory that held the BIOS settings and keeping the Real-Time clock running when AC power was unavailable.

However, with modern computers the CMOS battery plays a lesser role as most BIOS firmware is smart enough to automatically detect the correct settings and those settings are stored such that they don't need power to persist. The CMOS battery is still required to maintain the RTC.

More information is available in Nonvolatile BIOS memory.

smokes2345

Posted 2015-04-30T04:26:47.797

Reputation: 250

I have a mid-00s laptop with a dead CMOS battery--unplug it and it's going to try to boot from physical drive #1. That's not the boot drive. – Loren Pechtel – 2015-04-30T21:22:42.927

7Wouldn't it be nice if cars had CMOS batteries so that we wouldn't lose presets whenever the main battery had to be replaced? – jp2code – 2015-05-01T15:45:36.557

@LorenPechtel I wouldn't consider that a modern computer first of all. Secondly, laptops are, in many ways, a special breed that don't follow convention. Third, a laptop with more than one (permanent) drive is very unusual, i would consider that an acceptable default – smokes2345 – 2015-05-01T17:12:54.470

@smokes2345 The laptop is engineered for multiple drives, the BIOS should understand that. (And the repair manual really should give some indication of where that battery is hiding!!) – Loren Pechtel – 2015-05-01T19:46:30.143

2[flippant]The world should be a better place, generally.[/flippant] – Agi Hammerthief – 2015-05-02T07:57:43.653