Home Tech

How to Set Up Your Computer to Auto-Restart After a Power Outage

power line repair after electrical outage

Aside from malware and viruses, nothing has the potential to be more dangerous to your computer’s health than power outages. Here is how to ensure your computer keeps its boot on when a power failure turns the lights off.

With the approach of the turbulent summer season, it is important to know what kills the electrical lifeline, how to safeguard your digital gear from fatal reboot disease, and how to reach the desktop when the computer refuses to restart. This knowledge is vital whether you use computers to do your job in a business office or your own home office environment.

To minimize the potential damage from electrical power fluctuations, you should have your computers and modems plugged directly into power surge protective strips. Surge protectors are effective protection against glitches due to normally fluctuating energy levels.

However, a direct lightning strike is likely to fry the surge protector and then burn out the electronic gadgets plugged into it. A good strategy is to unplug the surge protector from the electric wall socket when a storm arrives.

Another essential piece of protective equipment is an uninterruptible power supply or UPS. A UPS is a sophisticated battery-containing device that supplies backup power to desktop PCs during electrical grid outages and brownouts. One of the most important services a UPS can deliver is a continuation of the electrical power — usually about 15 minutes — giving you enough time to safely save your data and power down your equipment. The UPS will kick in when its sensors detect an interruption of electricity from the main service line to your home or office.

The latest UPS models can reset to an off position automatically as their rechargeable batteries run out of energy. When the normal power supply returns, your computer can restart without its power supply being blocked if it is so configured. The BIOS settings in many computers let you adjust the power settings, so the computer senses when the normal electrical supply returns. You can pick up a UPS at office supply retailers and box stores, as well as your favorite online shopping center.

The software that comes with it safeguards the computer when it is unattended. This is useful if you use remote access services and file-syncing cloud storage services. Getting your PC to restart automatically after a power outage involves getting the computer to “see” the power returning by making some changes to the PC’s BIOS settings and installing the UPS-included software. Read on to learn how to do this.

What Breaks the Power

Causes of power outages involve some obvious and a few subtle situations. Mother Nature, device fatigue, and dumb luck all figure into the power breakdown equation. Other than being prepared before trouble strikes, there is little you can do when the power grid fails. Here is a quick list of power failure causes:

  • Weather — Lightning, high winds, and ice are weather hazards that often impact the power supply. Interruptions can last several days, depending on how rapidly ground conditions improve to let work crews find and repair the damage. Lightning can strike equipment or trees, causing them to fall into electrical lines and equipment.
  • Severe distress — Earthquakes of all sizes and hurricanes can damage electrical facilities and power lines. This sometimes catastrophic damage can cause long-term power outages.
  • Equipment failure — Even when the weather is not a primary cause of a power outage, faulty equipment in the electrical system can be a primary cause of outages. Hardware breakdowns result from failure due to age, performance and other factors. Sometimes, adverse weather, such as lightning strikes, can weaken equipment. High demands on the electrical grid also can cause overloads and faults that make equipment more susceptible to failure over time.
  • Wildlife — Small creatures have an uncanny knack for squeezing into places they do not belong in search of food or warmth. When squirrels, snakes, and birds come into contact with equipment such as transformers and fuses, they can cause equipment to fail momentarily or shut down completely.
  • Trees — Weather can be a secondary contributor, causing circumstances that can lead to power outages when trees interfere with power lines. During high winds and ice storms, tree limbs or entire trees can come into contact with poles and power lines.
  • Public damage — Accidents happen. Vehicle accidents or construction equipment can cause broken utility poles, downed power lines, and equipment damage. Excavation digging is another cause of power loss when underground cables are disturbed.
  • Tracking — When dust accumulates on the insulators of utility poles and then combines with light moisture from fog or drizzle, it turns dust into a conductor. This causes equipment to fail.
  • Momentary circuit interruptions — Blinks, or short-duration interruptions, are annoying. However, they serve a valuable purpose by shutting off the flow of electricity briefly to prevent a longer power outage when an object comes in contact with electric lines, causing a fault. If power surge strips (not multi-socket power strips) are not attached to your computer gear, the sudden loss of electricity and then a surge of power can cause data loss or component failure.

Dealing With It

You can not prevent the power grid from going down, but you can take steps to ensure that it does not take your computer down with it. You also can learn what to do if your computer refuses to boot up to the desktop once the power returns.

First, before trouble strikes, make sure you set the BIOS switches to enable your computer to restart after a power interruption. The BIOS circuits are hardwired to the computer’s motherboard. You must establish the restart settings when there is no loss of electricity. You must be able to start the computer to reach the BIOS controls.

Just how you get, there depends on the make and model of your computer. The BIOS restart setting is operating system-independent. It does not matter whether you run Microsoft Windows or Linux as the operating system of choice. The BIOS is responsible for “bootstrapping” the computer hardware and telling it to begin the startup process that leads to your desktop.

Adjusting the Dials

Here is how to set your computer’s BIOS to start automatically after a power outage.

  1. Power On your computer and press “DEL” or “F1” or “F2” or “F10” to enter the BIOS (CMOS) setup utility. The way to enter into BIOS Settings depends on the computer manufacturer. Watch for a message in tiny print along the bottom edge of the screen when it first turns on.
  2. Inside the BIOS menu, look under the “Advanced” or “ACPI” or “Power Management Setup” menus* for a setting named “Restore on AC/Power Loss” or “AC Power Recovery” or “After Power Loss.”

    *Note: The “Restore on AC/Power Loss” setting can be found under different places inside the BIOS setup, according to the computer manufacturer.

  3. Set the “Restore on AC/Power Loss” setting to “Power On.”
  4. Save and exit from BIOS settings. (The menu on the screen will give you the function key combination to do this.)

If you use a Linux-powered computer as a server, it probably is essential for you to get it up and running as soon as the power comes back on. The server might be located in a less accessible part of the building.

You can select additional settings to ensure an unattended restart after a power interruption. There are four places where you have to set things up to continue without human intervention:

  • BIOS: Make sure that the BIOS is set up to boot when power resumes.
  • Boot loader: Set up the boot loader to not wait for a user to select what OS to boot. Boot into the default OS right away.
  • Login: Set up the boot procedure to log in to a particular user automatically after boot. Do not wait for a person to log in.
  • Application restart: Set up the boot procedure to start the application programs automatically without human intervention.

Set Up Auto-Restart

Some computers have a BIOS option that prepares the computer to restart more easily when failed power is restored. You need to check ahead of time to verify that your computer has this feature and it is activated.

Here is how to do this:

  1. Open your computer’s BIOS settings menu. This is a hardware-dependent process that works fairly similarly on all computers, whether you boot into Windows or Linux. Restart the computer and watch for the first flash screen to appear.
  2. Look for the Setup function key description. It will be “Setup F2” or F12, or something similar. Restart the computer and, at the same time, press the appropriate function key. Tap the key repeatedly during this initial startup period, and the BIOS Settings menu will appear.
  3. Look for the Power Settings menu item within the BIOS and change the AC Power Recovery or similar setting to “On.” Look for a power-based setting that affirms that the PC will restart when power becomes available. Some older PCs lack this functionality. If your gear has it, save the configuration by pressing the designated function key as displayed on the screen. This reboots the computer.

If you are using a UPS to provide a short-interval battery supply when the power outage occurs, see the additional steps below to make the hardware connections. Meanwhile, let’s focus on how to restart computers when the power grid is back online.

Get Windows 10 to Start Again

After a power outage, your Windows system may not boot or restart properly. Any attempt to boot the system could bring you to a stalled loading screen or a blue screen with an error message.


Windows 11 users see: How To Configure Windows To Auto Restart After a Power Failure


Power surges are a common cause of booting issues with Windows. The sudden loss of power can corrupt system files. These suggestions may help you get around that problem.

  1. Start Windows 10 in Safe Mode.
    • Press the power on button on the computer.
    • Press Windows logo key + I on your keyboard to open Settings.
    • Select Update & Security > Recovery.
    • Under Advanced startup, select Restart now.
    • After your PC restarts to the Choose an option screen, select: Troubleshoot > Advanced options > Startup Settings > Restart.
    • After your PC restarts, select an option to finish the process.
  2. Here is a second method to restart Windows 10 after a power outage. Use the built-in System Configuration Utility
    • From the Win+X Menu, open Run box and type msconfig; then and hit the Enter key.
    • Under the Boot tab, check the Safe boot and Minimal options. Click Apply/OK and exit.
    Windows 10 System Configurations, Safe boot screenshot

    When the computer restarts, it will automatically enter Safe Mode. It will continue to boot into Safe Mode until you change the setting back to normal boot.

    So before you shut down Windows 10, open msconfig again and uncheck the Safe Boot check box; click Apply/OK, and then click the Restart button.

Windows Startup Settings screenshot

Get Windows 7 to Reboot

Each version of Microsoft Windows has a slightly different procedure to apply. If you have not yet upgraded to Windows 10, follow these steps to jump-start Windows 7.

  • Press the power on button to attempt to restart the computer.
  • Press F8 before the Windows 7 logo appears.
  • At the Advanced Boot Options menu, select the Repair your computer option. Then press the Enter key.
Windows 7 System Recovery Options screenshot

Fix the Linux Boot Failure

Linux may be more able to fight off malware and viruses and such than Microsoft Windows. Still. it is no more immune to electrical surges and power grid outages than any other piece of electronic equipment.

The electricity issue attacks the hardware before it impacts the operating system by inadvertently corrupting Linux files. So you should make sure that your BIOS settings are enabled to restart after a wrongful shutdown when the power fails.

Follow the same steps detailed above for “adjusting the dials.” When trouble strikes, apply the steps outlined below to force your Linux-powered computer to restart into Safe Mode, which is actually a recovery mode.

The process with most Linux distributions can be a little different than with Windows-powered boxes. The process depends in large part on your computer hardware.

Some computers — especially those custom-made with Linux preinstalled — have a BIOS option called “fast boot” activated in the BIOS setup, which disables the F2 setup and F12 boot menu prompts.

This is something you will have to verify while the computer is still operational. In that case, power off your device and turn it back on. Hold down the F2 key (or whatever key combination is displayed on the screen).

Activate Safe/Recovery Mode in Linux

When you see the BIOS setup utility on the screen, disable “fast boot,” save the setting and reboot.

Using the “fast boot” option, the Linux OS, in essence, jumps into the startup routine by forcing the computer to run the Grand Unified Bootloader (GRUB) or GRUB 2 menu.

  1. Press the Computer’s power on/off button.
  2. Hold down the left Shift key as the computer starts to boot. If holding the Shift key doesn’t display the menu, press the ESC key repeatedly to display the GRUB 2 menu. Sometimes the SHIFT & ESC keys work instead.

From there, you can choose the recovery option. Follow the on-screen directions to attempt to restart your Linux computer.

Linux GRUB restart sccreenshot

Use a Live CD Boot Repair Disk

Super Grub2 Disk and Rescatux are strong and reliable emergency boot solutions for Linux computers. Super Grub2’s stark interface makes it intimidating to use. Rescatux is far more user-friendly. Both are developed by the same source.

Super Grub2 Disk is a bit limited in its fix-and-go capabilities. If all you need is to bypass the problem and boot your failed system, it usually does the job. If you need a bona fide repair solution, use Rescatux.

The Rescatux emergency repair app is actually a live Linux distro CD environment. You can boot the dead computer from the CD/DVD (which you obviously must have created ahead of time).

Linux GRUB repair restart screenshot

Make the Hardware Connections

One of the major benefits of having a connected UPS is the ability to have the computer restart once the power supply resumes. The main things to look for when investigating which UPS to get are the initial cost, the cost of replacement batteries and the frequency with which you’ll have to replace them, the ability to manage and monitor the UPS from Linux, and the watts and volt-amps provided.

The batteries in a UPS degrade over time, resulting in a loss in its total power capacity. You might have to replace the batteries in the UPS in three to five years. If you only need to run a machine for five minutes and have the choice of a UPS that can run a machine for seven minutes or one that can give you 10, you can get away without replacing the batteries in the larger capacity UPS for a longer time — although the batteries for the larger UPS likely will be more expensive as well.

If you run the Linux OS, make sure the UPS you buy has software that supports Linux. If it does not, you will have to manually turn off the computers before the UPS batteries run out of juice.

Follow these steps to connect the UPS to your computer and peripherals such as printer and modem.

  1. Plug the PC and monitor into available controlled AC outlets on the UPS. Do not plug a power strip into the UPS socket first. Plug each hardware directly into its own UPS connection.
  2. Connect the included USB cable between UPS and PC. It is used for communications. Do not use a powered USB hub between UPS and PC, or the lack of power during an outage will cause communications to fail.
  3. Plug the UPS into the wall power supply and allow it to charge. This takes four or more hours to charge fully.

Install and Configure the UPS Software if available. The directions will vary based on the UPS you have and the software that comes with it.

  1. Install the included software.
  2. Navigate to the Energy Management tab or similar within the Configuration setting.
  3. Check the Enable Energy Management check box and choose the Default settings in PowerChute. Look for any “Turn On Again” settings in any other power management software and check as appropriate.

A Few More Tips

With no endorsement intended, the following is a list products to provide a starting point for purchasing a UPS or supporting software.

  • PowerPanel for Linux is a simple command line Linux daemon to control a UPS system attached to a Linux-based computer. It provides all the functionality of PowerPanel Personal Edition software, including automatic shutdown, UPS monitoring, alert notifications, and more. PowerPanel for Linux is compatible with Fedora 23, Suse Enterprise 12 SP1, CentOS 7, Red Hat Enterprise 7.2, Ubuntu 15.10, and Debian 8.4.
  • Apcupsd is a program for monitoring UPSes and performing a graceful computer shutdown in the event of a power failure. It runs on Linux, Mac OS X, Win32, BSD, Solaris and other OSes.
  • Linux comes with a GPL-licensed open-source apcupsd server (daemon) that can be used for power management and controlling most of APC’s UPS models on Linux, BSD, Unix, and MS-Windows operating systems. Apcupsd works with most of APC’s Smart-UPS models as well as most simple signaling models such as Back-UPS and Back-UPS Office.
  • WinPower is a UPS monitoring software that provides a user-friendly interface to provide power protection for computer systems encountering power failure.
Jack M. Germain

Jack M. Germain has been an ECT News Network reporter since 2003. His main areas of focus are enterprise IT, Linux and open source technologies. He has written numerous reviews of Linux distros and other open source software.Email Jack.

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

More by Jack M. Germain
More in Home Tech

Technewsworld Channels