How can I set my Windows 7 desktop with a UPS to automatically turn on after a power outage is over?

241

Solution 1

Apcupsd does do what you want. Our power here is really bad. In the event of a power failure, my system stays on battery for 2 minutes (my choice) in case it is a short duration. After being on battery for 2 minutes, Apcupsd tells the UPS to cut the power to the PC. The UPS has a built in delay of 2 minutes. Apcupsd then issues the Windows hibernate command, so Windows hibernates. Two minutes after the UPS was sent the command, it cuts power to the PC. When power is restored (or if it was already) then the UPS again provides power. You are correct - since the BIOS sees this as the power was cut then restored, the BIOS will do what you set it to do.

A clean shutdown using a UPS - if the UPS does not cut the power to the PC, regardless of whether the power is restored or not, your PC will remain shutdown because the BIOS didn't see a power cut/restore. The BIOS has no other choice. If, when your system shut down, the BIOS detected that power was still present, what would you want it to do - power up the machine? Then there'd be no way to shut your system down.

BIOS requires that PC loses and then gets back the power.

Solution 2

I found a solution that works for me under Windows 10 with a Back-UPS Pro 1000. I would expect this to work with Windows 7 and other UPS units.

Overview:

The four steps below will cause the PC to enter sleep mode when the UPS switches to battery. When AC power is restored, the PC will resume from Sleep. Also, should the PC's power get cut (while in Sleep mode), when power is again restored, the BIOS setting ensures it will power back on.

  1. Make sure your BIOS is set to always turn the system on, should the power ever get cut. Look for "Restore Power After AC loss", or similarly named setting, and set this to On.

  2. Configure the Windows power option to put the computer to sleep after X minutes. Set Control Panel / Power Options / Put the computer to sleep: 5 minutes.

  3. Change the advanced power options (Control Panel / Power Options) to also put the computer to sleep for Critical and Low battery states.

  4. Under Device Manger, right click on "HID UPS Battery" and then under the "Power Management" tab check "Allow this device to wake the computer". This is what actually causes the system to resume from sleep mode.

Share:
241

Related videos on Youtube

hrvn10
Author by

hrvn10

Updated on September 18, 2022

Comments

  • hrvn10
    hrvn10 almost 2 years

    is there any API to retrieve all files/folders in BIM 360 & BIM 360 Team network drives on desktop? I tried different cmd and python approaches (e.g. os.walk) but they only list folder that users have manually opened (e.g. folders/subfolders/files are being listed with queries only after I double-click and open them manually).

    • David Schwartz
      David Schwartz almost 11 years
      If it's set to "always on", it should restore power when AC power is restored. If not, the issue is still with the BIOS.
    • kevinmicke
      kevinmicke almost 11 years
      @DavidSchwartz - Thanks, but from the computer's perspective, it's never actually lost power, because the UPS is providing backup power. Windows shuts itself down, but doesn't set whatever switch the APC software does that allows the UPS to tell the computer that the main power is back up. It's exactly like if you unplug a laptop - it hibernates at a certain battery level, but doesn't automatically power on once you plug it into an outlet again.
    • David Schwartz
      David Schwartz almost 11 years
      Oh, so you need the UPS to cycle power so the computer will come back on. Or you need wake on USB.
    • kevinmicke
      kevinmicke almost 11 years
      That could work - any idea how I can make it do that? It's an APC Back-UPS Pro 1000 (BR1000G).
    • Dave M
      Dave M over 9 years
      Many APC SmartUPS models with a network card will do this. It sends a Wake on LAN packet to the device. I do not believe BackUPS Pro models support a NIC. And the NICs are expensive.
  • jjz
    jjz over 7 years
    APCUPSD is a great utility. The website for it is here: apcupsd.org