Honestly, that’s a tough situation unless you plan ahead for it.
The good news is that if you can plan ahead, there are several reasonable approaches to getting that machine shut down cleanly.
Become a Patron of Ask Leo! and go ad-free!
Put the monitor on the UPS
I assume there’s some reason you can’t, but the simplest solution is to make sure the monitor is also plugged into the UPS. Then, when the power goes down, you’ll have both computer and screen running, and can see enough to shut down the computer properly.
The downside is that screens take power — sometimes a fair amount. When your computer is running on the back-up power supplied by the UPS, it won’t run as long, since the computer plus the monitor will drain the UPS’s battery faster than the computer alone.
I have at least one machine in my basement configured exactly this way: I want to maximize its run time on battery backup, so I purposely don’t plug the monitor into the same UPS.
Remote access
My approach to that machine is to connect to it using remote access from one of my other machines.
I have my local network configured to stay running during a power outage by having my routers and access points on the UPS instead of, say, that extra monitor. Then I can easily connect to the machine remotely using a laptop — which, when you think about it, has a built in UPS by virtue of its battery.
The remote access technology varies. I use Microsoft’s Remote Desktop client, or Team Viewer, or some other kind of remote access tool. I’ve even done remote shutdowns via the Windows Command Prompt.
Mobile remote access
This is one I’ve done while away from home. I happen to use TeamViewer, but there are other alternatives as well. Using my smartphone, I can connect to my home PCs and do just about anything … including turning them off.
It’s not a solution for really using the computer for anything significant via your mobile phone’s small screen (though I admit I’ve done that, too, in a pinch), but it’s perfect for just hitting the Start menu and the Shutdown option.
This option, in particular, requires that your network equipment as well as the modem be on your UPS, so in the event of a power outage, your network keeps operating. (It also requires that whatever caused your power to fail did not also impact your internet connection.)
Let the UPS do it
Many, if not most, uninterruptible power supplies have the ability to connect to your computer via USB specifically for this scenario.
When the power fails, the UPS notifies the computer. Software on the computer — sometimes built into the OS, sometimes software that comes with the UPS — then decides what to do and when. Typically, you can configure a delay, so after some time running on battery, the software can shut down the computer cleanly on your behalf.
When all else fails
Unfortunately, if you’ve not prepared ahead, all you can really do is long-press the power button.
It’s definitely not ideal, but it’s marginally better than an unscheduled shutdown when the UPS runs out of power.
Do this
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!
“Remote Access”
I use TightVNC to generally operate (and shut down) a desktop PC on my LAN. (Its primary function is as a file server to my other machines, so I don’t really have a need for it to have a monitor of its own). (File server duties, but on a Home Edition of Windows).
I’ve always wondered about the security implications of using any kind of VNC software on my LAN though. Question is: Is it safe? What about unauthorised access to it from outside of my LAN?
I am behind a router-based hardware firewall, but wouldn’t mind my concerns (if there are any) laid to rest.
Anything I need to be concerned about?
Many thanks in advance.
If you’re behind a router the only access you need to worry about are from other machines on your local network. If that’s a problem VNC can be configured to encrypt and require a password for access.
…and that has just laid those fears of mine to rest.
Thank you Leo!!
On my computers, pressing the On/Off button starts the Windows shutdown procedure. I can see a potential problem doing that without a screen as you can’t be sure it’s shutting down correctly, but I guess I’d know if everything got dark and quiet on the machine :-) .
What you also can’t see is whether or not there’s an application asking if you want to save the hours of work you’re about to lose. :-)
That’s what I was afraid of.
I tried this in Windows 10 with a Word document in progress, my email client and web browser open.
Ctrl + Alt + Del
When I rebooted the computer, Word opened with the document that I was working on without loss of data. I opened the email client and all previously open emails were opened.
The web browser (Firefox) is set to delete history when closed. When opened, the history had been deleted properly.
Some programs shut down properly when Windows closes. Programs which have changes which need to be saved ask if you want to save the changes. If you can’t respond, you can’t save the changes and the machine won’t shut down. A forced shutdown will close the programs without saving the changes.
Word has become very resilient over the years. Not all applications are that good. Many (dare I say it most) will lose data.
Leo,
Reunning Windows 7 Pro. I figured if I press the Win Logo (on keyboard), then Right Arrow, Right Arrow, then U (for Shut Down, the underlined keyboard shortcut. Then Enter.
Thanks,
Jim
That doesn’t work on Windows 10, or at least, my Windows 10. But the problem is the same as with pressing the shutdown button. You can’t confirm if a program asks you to save the changes and you can lose a lot of data.
isn’t the point of a UPS (for most people) is to buy you time too shut down your computer? If so, then option number 1 seems the simplest to me: plug the monitor into the UPS. The extra power drained from the battery with the monitor can’t be that significant for the time it takes to save your work and shut down the computer.
It really depends on whether you’re sitting in front of the machine at the time the power dies.
If you’re not able to get to your computer soon after the power dies, you probably won’t be in time to shut down the machine. And if you were away from the machine when the power died, I hope you closed all of your programs when you stepped away. It’s definitely a good practice to close all of the programs you are working on (not necessarily browsers, media players or other programs which consume but don’t create content) when you step away for an extended time. It can mitigate a lot of the damage in a power out situation.
That’s why I mention the USB cable. My UPS will tell my machine to clean shutdown if it’s been running on battery too long (similar to a laptop). Won’t save documents, but as you say, not only should you not leave with documents open, getting into the habit of CTRL+S every so often helps a lot as well.
If you’re concerned that the additional battery drain caused by keeping a monitor on the UPS will kill the UPS before you get to the machine, leave the monitor unplugged (or plugged into an unprotected source). When you do get to the machine, plug the monitor in for the shut-down steps.
Why no mention of shutting down from a command prompt? My computers are set up with a keyboard shortcut to open a command prompt. (E.g., Windows-Shift-6 if it’s the 6th item pinned to the taskbar in Windows 7).
Then you can type in shutdown with the appropriate options (/h or /s, etc.) to shut it down, all without seeing the screen.
That’s a good idea. Previous versions of Windows had a way to shut down with keystrokes, and I can’t seem to work out how that can be done with 10.
And if an app blocks the shutdown prompting to save files?
Isn’t that what the /f flag is for?
If you’re willing to lose whatever would have been saved. Bottom line is that it’s still best to plan ahead.
You can shut down a Windows 10 machine with Alt-F4-Enter.
At which point your running program may — or may not — stop the process by asking if you want to save files. What then?
Hi Leo
On my WXP through W10 with a lost screen display:
Hold and press (r)
That opens the command line
Then type
shutdown -f -s
Press
I did not notice this being mentioned.
Programs are forced to close and then the computer shuts down.
You are right: The best way is with a UPS and USB cable. I get several power hits or brownouts every day and the UPS takes over-double safety. That’s another topic.
Thank you
Theo
I don’t know why–it left out the (WinKey) and (Enter).
Hold (WinKey) and press (R)
Then at the end Press (Enter)
Thanks a alot for sharing such useful blog with us.
Bottom line. To mitigate data loss, hit CTRL+S often. It saves your work in most programs. In any programs which have an auto-save function, set that time interval low. For example, I set my MS-Office to “save AutoRecover information every 1 minute”. Computers are fast enough now a days, you won’t notice anything slowing down during the save.
I now use as many bits of software as I can which auto-save or better still work online, so that the change I just made is committed to the online store within seconds. Some especially examples :
Notepad++ : even if you open a new window and paste in something, then power down, it recovers the data correctly
(I actually cannot think of another piece of software that does this, but I think it should be the standard !)
Google documents – occasionally struggles with poor connections, but I use this for most things now by default
Microsoft office online – useful for specific formats where changing to different software will break something
Nobody mentioned using two UPS’s, one for the monitor and one for the computer
to bad this is not for all programs
https://support.office.com/en-us/article/what-is-autosave-6d6bd723-ebfd-4e40-b5f6-ae6e8088f7a5
Clear solution
hold the windows key and press x. then press u twice. Surprised you didnt know this but ok
How about: Windows Key + X then U followed by I