This morning I woke up to my phone using mobile data and my home assistant automations not working. Initially I thought it the power was out, but I could turn on the lights just fine. I checked my UniFi app and saw that the server was not connected to the network at all. This meant that the cable got unplugged, the switch isn’t working, or the server isn’t working. It said the switch was connected and another device was connected to the switch so that narrows it down to just 2 cases. So I opened my server closet in the basement and immediately noticed something was wrong. I couldn’t figure out what was wrong but I just felt like something was wrong. Everything was plugged in, the network switch lights were blinking like normal, my raspberry pi was running just fine, even the server indicator lights were on. My main server is an old gaming PC so it has a glass side panel so I looked inside and I could see the fan spinning, but I could not hear it. Usually I have it set to full speed and I can hear full speed very well. I tried rebooting the server with the power button and the fans didn’t go to full speed. As a last resort, I brought down a keyboard and monitor. As soon as I plugged in the monitor, I saw that there was a prompt to set the time on the BIOS! Picture of the prompt In my opinion, this was the stupidest reason for an outage.
Further investigations
I dug a little deeper and discovered that the BIOS had been reset during a power outage right before all of this happened. So far I have consulted the motherboard manual and found absolutely nothing about this. After a bit of research, I think it could have been that the CMOS battery has died. This is a really simple fix but I don’t have the replacement battery right now. This means that I will have the same exact issue after the next power outage unless I replace the battery.
Preventing this in the future
From what I can see, I just need to replace the CMOS battery. But this computer has been running for over 4 years, so what is stopping this from happening again around 2028? The most effective solution is going to be preventing power outages in the first place. This can be done using a battery backup or a standby generator. Standby generators will last longer during a power outage but are typically more expensive and harder to setup than a simple battery backup.
- Replace CMOS battery.
- Get small UPS.
- Discover that small UPS’s fail regularly, usually with cooked batteries.
- Add maintenance routine for UPS battery.
- Begin to wonder if this is really worth it when the rest of the house has no power during an outage.
- Get small generator.
- Discover that small generators also need maintenance and exercise.
- Decide to get a whole house battery backup a-la Tesla Powerwall topped off by solar and a dedicated generator.
- Spend 15 years paying this off while wondering if the payback was really worth it, because you can count on one hand the number of extended power outages in that time.
- In the end times a roving band of thugs comes around and kills you and strips your house of valuable technology, leaving your homelab setup behind and - sadly - without power. Your dream of unlimited availability has all been for nought.
Conclusion: just replace the CMOS battery on a yearly basis during planned system downtime.
CMOS batteries last a lot longer than a year. Unless the system has been unplugged for a long time, they should be good for several years. I’m sure there’s actual data out there somewhere.
But yeah, a lot of people think “oh I’ll just put a UPS on it”. They don’t consider that unless you get a really big UPS, they’re only good for very short outages, seconds or minutes, to bridge the gap between the outage and your generator coming on (or the mains power coming back if it was just a flicker).
Also, the batteries in them need to be replaced every 3-5 years.
Yeah , it’s really a little strange in OPs case, I can’t really recall changing a CMOS battery in ages, like decades of computer use.
hey, AI defense turrets sound like a cool and totally not dangerous project. hope you have a decent GPU in your setup, good luck.
You can deflect rain while you’re at it too.
The only real solution is to make this an extended maintenance task. The batteries are cheap so an alert every 4 years is likely sufficient to replace the battery before it dies. You could do it every 2 or 3 years instead at your discretion.
The only real solution is to make this an extended maintenance task.
This is the correct answer. No matter how reliable your power feed is you still need to reboot the server at some point for whatever reason and if CMOS battery is dead by then you’ll have the very same issue and you’ll need monitor and keyboard again. And even if you don’t mind about the RTC on board you’ll still lose the settings.
I wonder why manufacturers haven’t switched over to supercapacitors or something else than a coin cell battery, but perhaps there’s a valid reason for it. I think that supercaps can’t hold charge as long as a coin cell, but if your board is completely cold for a year or so maybe losing bios settings isn’t that big of a deal.
What about all those fancy new laptops that are built like smartphone that can never be opened do they have CMOS batteries? Ive never thought if this till now.
If the main battery isn’t “meant to be replaced”, it will often act as the CMOS battery (e.g. MacBooks have been doing this since roughly 2008).
Some BIOS manufacturers allow you to disable all halts on errors. As soon as you connect to the network your system should be able to sync its internal clock.
Some BIOS manufacturers allow you to disable all halts on errors.
That will be reset to default if the CMOS battery is dead and power is removed though.
Not on a flash based motherboard (so basically almost everything recent). On modern systems usually the only thing the battery powers is the clock, which is why they have a separate reset to defaults header/button/switch.
(The CMOS memory of old is replaced with flash memory, al la SD Card or flash drive)