Can a PC be set up not to shut down when unplugged?

12

I have a laptop now, and I love that when the power goes out accidentally (blackout from a storm, accidentally gets unplugged...), the laptop does not shutdown on me, it just switches to battery supply. I don't lose any unsaved work, don't have to start up again...

I am about to buy a new computer - a desktop, and I want to know if there is any way to configure the computer to have a backup battery supply like a laptop.

Thanks

esther h

Posted 2012-03-11T07:44:39.087

Reputation: 231

14

get a UPS

– Sathyajith Bhat – 2012-03-11T07:47:02.967

1Not really what i'd class as a 'Super User' grade question lol... – HaydnWVN – 2012-03-16T10:06:47.580

Answers

36

Usually, people don't try to unplug a desktop PC when it's running. Desktop PCs are not meant to be portable, so there are no battery-driven power supplies for them. You might be able to jerry-rig a car battery into a full-tower, but you'd have to convert the 12V DC power into mains-equivalent 120V AC that your computer's PSU can then transform back into 12V and 5V, 3.3V, etc.

However, if you just want your computer to stay on during a blackout, then you can simply buy a UPS unit. Your computer still has to be plugged into the UPS, and most consumer-grade UPSs don't offer much more than 5-15 minutes of on-battery time, but it's usually enough to save your documents and power down safely. And like surge protectors, you're usually insured up to $X for damages if the UPS fails and your equipment is damaged.

For more sustained off-grid usage, people usually rely on emergency power systems. These are backup generators that automatically kick in when the regular mains power is down. These systems can either run on gasoline or diesel and can be sustained indefinitely as long as you don't run out of fuel. They can be used to keep the lights on in your entire building, or they can be used to supply power only to select devices/outlets (e.g. in many hospitals, they have color-coded outlets so that life-critical machinery can be kept on when there's an outage).

Lèse majesté

Posted 2012-03-11T07:44:39.087

Reputation: 3 129

2@estherh: An additional use for a UPS is that a lot of them come with over and underload protection as well, which is useful if your power supply is dodgy, which is probable if you're worried about outages. – Matthew Scharley – 2012-03-11T09:05:20.803

good point. makes me wonder why desktops today don't come with a small battery built in to handle power supply issues. – esther h – 2012-03-11T12:58:15.640

@estherh: Simple answer - it would make the PC more expensive, and most people who care buy a UPS. – sleske – 2012-03-11T16:09:39.477

1There are standard ATX form factor power supplies with included UPS. While they generally last only a few minutes, you avoid having an extra box around, and these are generally cheaper. – Simon Richter – 2012-03-12T08:39:22.947

@Simon: You're indeed right about such PSU w/ built-in UPS existing. However, all the ones I've come across are designed as "medical grade" PSUs and cost $400+. I'm curious as to how much on-battery time they can provide since the available space for the battery is much smaller than most external UPS units. – Lèse majesté – 2012-03-12T09:22:59.133

I just wanted to add another tidbit for those learning about UPSes for the first time. You can set up your computer to automatically shut down when the UPS is triggered. In linux this is typically done using upsd (a daemon that retrieves UPS status) and upsmon (client process that can shut down the computer or launch other notifications/processes during power events).

– Lèse majesté – 2012-04-03T03:28:36.433

1@Lèsemajesté Good point, but you "should" set this up (instead of "can") because when the UPS runs out, you have all the same problems that the UPS was designed to prevent (or at least forestall.) – Joe – 2012-05-10T05:28:57.680

12

Yes, the market has anticipated your need and you can buy an uninterruptible power supply unit for your PC.

Mike Scott

Posted 2012-03-11T07:44:39.087

Reputation: 4 220

-3

Call it a hunch, but there's really no need for the typical home user to get an UPS – especially one who learned of its existence an hour ago.

Desktop computers tend to have the power cord in the rear of the unit, so that the cord can be plugged in directly to the wall, thus avoiding high-traffic areas. As for portability – the typical home PC is fairly difficult to move whilst running, i.e. you will be hard pressed to take it with you into the can to check email and Facebook while on the throne... (not to mention very few desktops have wireless adapters).

As for power outages – even if you live in a third world country – how often do you lose power without warning? Almost every program auto-saves every 5 minutes or so, if you ask it to.

Unless you have an aging relative at home on a pacemaker or respirator, I think you'll be ok without it. Take the 700 bucks that a good one would cost you and buy a laptop to go along with it.

Bad Bad Leroy

Posted 2012-03-11T07:44:39.087

Reputation: 21

5Well, UPSs aren't for portability, just power outages and under/overvoltage and under/overcurrent protection. And even though most of us living in developed areas aren't liable to suffer regular blackouts/surges, these things can still happen. And when they do, even if all your programs autosave (many don't, such as many IDEs and most content creation programs like image editors, 3D programs, video editors, audio editors, etc.), your filesystem can still be corrupted and even hardware damage can occur in extreme cases. – Lèse majesté – 2012-03-11T11:17:13.740

Not everyone will judge a UPS worthwhile, but for individuals/businesses who use electronics in vital functions (e.g. storing important data), it's a good insurance policy to have. I mean, a $30~1000 investment could save you tens of thousands of dollars or more. A $600 UPS can come with $250K in Equipment Protection Value. – Lèse majesté – 2012-03-11T11:33:53.080

6That's the thing with blackouts: they're unpredictable, and they come in all sizes. See, while your refrigerator will withstand a 200-millisecond power loss without trouble, this will power off/reboot a desktop PC; guess what can happen when you shutdown your computer abruptly? If you guessed "data corruption", you guessed right: and what good is that 5-minute-old save when the entire disk is now unreadable? (a common scenario, actually) Sort of like data backups - one rarely needs to restore them, but when (not "if") the need arises, it's too late to go back and make them yesterday. – Piskvor left the building – 2012-03-11T12:14:28.113

4Also, $700 for a home UPS? That's an absolute overkill, unless you need the thing to be gold-plated and diamond-studded ;) A decent entry-level UPS can be bought for $50. Do you value your irreplaceable digital data at least $50? I don't mean movies or music - those can be obtained again; but what about your own digital photos? Your documents? I daresay those only exist on your disk (and in backups, maybe). – Piskvor left the building – 2012-03-11T12:23:42.593

1Maybe I should have included this in the question - I do web development, so it's the pain of possible data corruption, unsaved files getting lost, my workspace getting dissolved... and I happen to get random outages a few times a year - so it is important for me... – esther h – 2012-03-11T12:56:31.960

3"even if you live in a third world country – how often do you lose power without warning?" Sounds like you have never lived in the 3rd world! Or even in the 2nd. – LarsH – 2012-03-11T13:43:40.300

2Or just L.A. during the summer when they have rolling blackouts... – Lèse majesté – 2012-03-11T14:27:29.397

1It was the brown-outs not the black-outs that "fully regulated" UPS helped me with most. I live in the fantasy world :-) Where a blackout is uncommon. But the minor surges and browns were still causing problems with the computer. – Psycogeek – 2012-03-11T15:24:37.103

2I lived in rural UK and would experience 5-10 blackouts a year, most lasting for an hour or more. Now i'm living and working inner-city i've seen less, but still 2 lasting more than an hour in the past 6 months... – HaydnWVN – 2012-03-16T10:11:54.953