- BIOS/UEFI: Activate Restore on AC/Power Loss or Next Boot After AC Power Loss and save with F10.
- Windows and LinuxAvoid blocking with bcdedit and automate scripts with cron/systemd or setpci if applicable.
- Red and hardwareUse WOL from your mobile phone and, if necessary, use the motherboard button or pin bridge with caution.
- Continuity: a UPS mitigates micro-outages, protects equipment, and keeps routers and services operational.

If you live in an area with frequent power outages and need your computer to come back to life as soon as the power returns, there are several ways to do it without being there. From BIOS/UEFI settings to Tricks through software on Windows and Linux, including network options (WOL) and hardware solutionsEverything can be prepared for the team Boot only when the lights come back on.
This issue doesn't only affect desktop PCs: it can arise with portable old ones without batteries that are always plugged in, small home servers, mining rigs, firewalls, or even if you host a WordPress site and want the website to stay online 24/7. The idea is that, after a power outage, the computer will restart without you having to press the button. and resume your tasks as soon as possible.
Options to make the PC turn on automatically when power is restored
In general, you'll be moving between four main paths: BIOS/UEFI configuration, operating system settings (Windows or Linux), network methods such as Wake-on-LAN (WOL), and hardware alternatives (from integrated buttons to jumpers on the power supply or motherboard). Each scenario has nuances, and whether you can apply one or the other will depend on your equipment.
It should be noted that not all of them BIOS They offer a "recovery after loss of AC" option.especially on some laptops. Even so, there are additional resources like Wake-on-LAN (WOL) or a UPS that will allow you to minimize interruptions and quickly restore services without having to travel.
BIOS/UEFI: Restoring power after power loss

The most reliable way is usually to activate it at the firmware level. Even before the operating system boots, the BIOS/UEFI can command automatic power-up as soon as the power returns.The device boots up without pressing any buttons. To access the firmware, restart and try the usual keys: DEL, F2, F1 or F10 (varies by manufacturer; DEL and F2 are the most common).
Once inside, navigate through menus that are usually called Power, ACPI Configuration or BOOTThere you should find a setting with a name very similar to Restore on AC/Power Loss o Next Boot After AC Power Loss. The first is usually a simple (On/Off) switch, while the second adds modes such as “Normal Boot” or “Fast Boot”If that choice exists, it is usually recommended to select "Normal Boot" so that the UEFI can perform its full check and avoid "crippled" boot times.
When finished, save the changes with F10 and confirm. With that setting active, the PC will automatically turn on as soon as the power supply receives power again.Ideal if you're not around when the power comes back on. If your cooktop is a desktop model (for example, a ASRock B450M Pro4-F), the option is usually in “Power Management” or similar; if it does not appear, there is no standard way to force it from the BIOS in that specific model.
Keep in mind one important limitation: In some laptops, the BIOS does not include the AC power loss recovery parameter.So, no matter how much you search, you won't find it. In that case, it's worth considering alternatives such as Wake-on-LAN (if the hardware allows it), a UPS, or, if the equipment is very specific, software methods to prevent boot freezes.
Prevent Windows from getting "stuck" after a shutdown
When there is a power outage, Windows can enter disk repair routines or show recovery optionsIf you want to delve deeper, you can analyze Windows startupThe problem is that, if you're not present, the process gets stuck waiting for a response and the PC doesn't finish booting. To bypass that block, you can tell Windows to ignore "improper shutdowns". and normal start-up without stopping.
Do this: open "Symbol of the system" as administrator (search for “CMD”, right-click and "Execute as an administrator"Then it launches the following command:
bcdedit /set {default} bootstatuspolicy ignoreshutdownfailures
After pressing Enter you will see a message indicating successful operation. With this adjustment, the system will not freeze at startup after a power outage.Note: This does not resume intermediate jobs (a partially completed render, for example), but it does return you to the unattended desktop in most cases.
To automatically recover activity, Configure your key services or apps to start with WindowsDownload clients, servers, monitoring tools, or anything critical to you can start automatically when you log into the desktop. Keep in mind that if you use your PC for other tasks, opening too many apps It may be annoying at firstSo, balance the essential and the accessory.
Linux: “server” mode and script startup
In Linux there are also ways to force server behavior to restarting the machine after a power failureIn specific hardware such as a Mac mini of a certain generation with Ubuntu, the use of setpci to activate that “server mode”. In that practical case, the effective call was:
sudo setpci -s 00:03.0 0x7b.b=19
This value, however, does not persist between restartsTherefore, it's advisable to automate it at startup. One direct way is to use cron with the reserved word @reboot to run a script at the beginning:
@reboot /ruta/a/tu/script.sh
Check that the cron service is active (in Debian/Ubuntu it is usually called “cron”): sudo systemctl status cron and enable it if necessary with sudo systemctl enable cron. Thus the setpci command (or any preparation) is executed on every boot and you don't depend on remembering.
Another solid option in distros with systemd This involves creating your own service that invokes your script. A minimal unit file could specify the network dependency (if applicable) and the path to the script. ExecStart=Then enable it with sudo systemctl enable nombre-del-servicio. systemd offers fine control over the startup order and conditionsThis is very useful if your server needs the network up before starting processes.
The classic method of /etc/rc.d/rc.local It still exists in some distributions, but in others The rc-local service is inactiveSo you'll have to activate it or choose systemd or cron. The important thing is that the script that "resets" your server state always runs without intervention.
Wake-on-LAN (WOL): Turn on your PC via network or from your mobile device.
WOL allows, even when the device is turned off, the network card listens for a “magic packet” which triggers the power-up. To use it there are two steps: enable it in BIOS/UEFI and configure the operating system so that it does not block the network event.
On Windows, enter the Device administratorOpen the network adapter properties and check the advanced options. Activates the "Wake on magic packet" feature (on systems with S0ix it may appear as "Wake on magic packet when system is in the S0ix") and verify that the power management allows the card to "wake up the device". Note the IP and MAC addresses. ipconfig /all to configure your client app.
With that done, you can use your mobile phone to send the magic package. En Android There are apps like “Wolon – Wake on LAN Widgets”, and in iOS, “iNet WOL – Wake on Lan”Usually, it's enough to be on the same network and set the PC's MAC address; if you want to do it from outside, you'll need to have the network properly exposed/routed. WOL is very convenient if the button doesn't work or if the device is far away..
Hardware methods: motherboard button, pins, and jumper on the power supply
Some motherboards, especially mid-range/high-end ones, integrate a power button on the PCB itselfIf yours has one, simply press it to start up, being careful not to touch other components. It's usually located near the RAM slots or in the lower right area of the motherboard. stand out by color or shape.
If your box has a broken power button or you can't reach it, it's possible force the start by short-circuiting the two pins of “POWER_SW” on the front panel of the motherboard. Remove the connector from the case and, using a flat-head screwdriver and plastic handleTouch both pins simultaneously for a moment: the PC should turn on instantly. Do this in a well-lit area with good lighting to avoid mistakes.
There is a more radical method, useful in specific scenarios: bridge the ATX power supply so that it activates automatically when it receives powerIn the 24-pin ATX connector, the "PS_ON" cable is usually the one that greenBy combining it with any black (earth)The power supply starts up. Traditionally, this is done by bridging the green pin to a black pin, positioning the connector with the tab facing upwards for orientation. This allows the power supply to deliver energy to the device when the power returns, enabling it to start without a button..
However, there's fine print: If you leave the jumper fixed, the power supply will remain "on" even if you shut down the operating system.And to restart, you might have to cut the power at the power supply switch or unplug and replug it. It's a compromise for situations where you absolutely need the PC to boot up when the power comes back on, but it's not the most convenient solution for everyday use.
When the BIOS doesn't help: use a UPS to weather power outages
If your motherboard/laptop doesn't offer recovery after AC power loss and you want to minimize downtime, a UPS (Uninterruptible Power Supply) It's a great ally. These devices They keep the equipment on for minutes. (depending on power/autonomy) and protect against voltage spikes, which is great when the network is unstable.
Today there are affordable models: Starting at around €60 you can find UPS systems of about 750W that last for around 10 minutesThis is enough for the PC to shut down properly or survive brief power outages. If you need more headroom, A 2000W UPS can last around 40 minutes depending on the load. Many also include router sockets: If you also power the network equipment, you will maintain a connection during the power outage and when the power returns.The server will resume its activity with available internet.
Although ATX power supplies include protections, the UPS adds extra layers of electrical safety and reduces the stress of "false starts". In the medium term, this is noticeable in system stability and the health of the storage if you avoid sudden power outages.
Smart power strips and “Restore on AC Power Loss”
If your BIOS includes “Restore on AC Power Loss”Setting it to "Power On" opens up another interesting possibility: use a smart power strip or plug To remotely cut off and restore power. You turn off the plug from your mobile phone, wait a few seconds for it to the capacitors in the power supply are discharged, and you turn it back on; the PC should turn on by itself with that cycle, without touching the button.
This trick also gets you out of trouble when the computer has become stuck in a strange state. However, you need to have the parameter configured in the BIOS beforehand.Otherwise, the PC won't react to the power return. When combined with WOL and a UPS, it's a Swiss Army knife for operate your home server remotely.
Turning on with keyboard or mouse: useful, but watch out for false positives
Many motherboards allow Reactivate the equipment with peripherals USBEnabling options like “USB Keyboard/Remote Power On” or “USB Mouse Power On” in the BIOS is convenient if you work with the PC out of sight, but It has one drawback: an accidental touch or a passing pet can turn it on unintentionally.Consider it if fuel consumption or safety concerns you.
If you are only interested in restarting after a power outage without human interaction, This is not the most recommended routeEven so, it can coexist with other techniques if you adjust the sleep/wake sensitivity and power management of the USB ports.
Safety and common sense tips
Tinkering with hardware requires care. If you're going to bridge pins or the power supply, do it with the equipment unplugged, discharge any static electricity, and use tools with insulated handles.Double-check what you're touching: confusing front panel or ATX connector pins can cause damage.
If your underlying problem is a broken power buttonThe alternative methods are "just to get by". Ideally, the gearbox should be repaired or replaced.Alternatively, you can install an external push button connected to the POWER_SW header on the board. This will prevent unusual power supply operations and improve safety.
Also remember that Not all motherboards or laptops offer the same optionsOn X99-type desktops or modern desktop motherboards, it is common to find more power and boot controls, while laptops or closed platforms may be missingIf your BIOS does not have AC restore, compensate with WOL/UPS and fix boot locks in software.
Finally, in technical communities, "recipes" that work with specific hardware combinations are often shared (for example, setpci on certain Mac minis with Ubuntu). Use them as a guide, but always validate them on your own equipment. and automate with cron or systemd so you don't depend on manual steps every time it starts up.
If your laptop has no battery and is always plugged in, it's possible that You don't have the recovery option in the BIOSIn that case, the combination of UPS to mitigate micro-outages, Windows settings (or Linux scripts) to prevent crashesAnd WOL, if the hardware supports it, is what usually gives the best results when the electrical grid is unreliable.
Looking at all of the above, you have a range of complementary solutions: Enable recovery after loss of AC power in BIOS/UEFI if available, prevent crashes with bcdedit in Windows or scripts in Linux, use WOL for remote power-on, and rely on a UPS. To deal with power outages and spikes. For extreme scenarios, pin/power supply jumpers work, but they're inconvenient for everyday use; opt for clean, automated setups that will save you from surprises when the power decides to go out without warning.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.