Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As Far as I can tell no one has actually solved this debacle. How do you get a mac mini to power on every time the UPS it is connected to restores power? It is easy enough to have the UPS communicate that power is about to turn off so have the mac run the command halt -u, or shutdown -h -u, etc, and many solutions such as powerchute from APC guarantee that it will shutdown etc. But it is not guaranteed that the mac will turn back on. If this bit/ file was permanently set so mac the mac believed that it dirty shutdown every time, whatever hardware is responsible for the power sensing of the power restored would always boot the mac when power is restored, even if the mini was powered off during while it booted. Currently if your mini powers off without dirty shutdown being set you are boned, and you must physically press the power button on the back for it to restart, which is unacceptable if the mini is says 5000 miles away or at the bottom of the ocean. You should be able to get this functionality even if no UPS is involved just by having the mac always try to reboot when power is restored. Has anyone ever figured this out?

share|improve this question
So why not just have the UPS kill power out from underneath the computer? – Nerdling Jun 30 '10 at 16:15
Because killing the power like that leads to corrupt files/filesystems, and no end of other problems? – Dentrasi Jun 30 '10 at 16:57
antrasi is right obviously you cannot just cut power. in the man page for shutdown it says that it shuts down the system and then halts for 5 minutes before removing power so that the UPS can cut the power simulating a dirty shutdown. – ghostsource Jun 30 '10 at 17:16
Just out of curiosity, do you often find that your Mini is 5000 miles away, or stuck at the bottom of the ocean, then? – Connor W May 25 '11 at 13:37
Yes I do. I deploy them into remote locations where they may not be serviceable by a human for days at a time, and we are talking about hundreds of them – ghostsource Jun 1 '11 at 15:36
up vote 1 down vote accepted

Make sure you only shut down with shutdown -u, and be sure to disconnect power within the next 5 minutes. And, of course, make sure to keep "Start up automatically after a power failure" checked in System Preferences > Energy Saver.

If you try to keep that "dirty" bit set when doing a normal shutdown, it will automatically reboot the moment it finishes shutting down, unless you can magically yank power at just the right moment.

Apple's only modern hardware designed to be booted remotely is the Xserve server, which supports Lights Out Management (LOM). See ipmitool(1) for more information.

share|improve this answer
point taken. Thanks for the insight. Although I did not find how to se the dirty it would not be a solution anyways. thanks for your help. I would vote for this solution if I could – ghostsource Jul 1 '10 at 2:34
One more thought. If you want an inexpensive, small machine running some form of Mac OS X to install at the bottom of the sea, that always boots when power is applied, consider an Apple TV. Apple TVs run a stripped-down version of Mac OS X v10.4.x, but I wouldn't be surprised if the Apple TV enthusiast community has found ways to install a more full or more recent version of Mac OS X on it. @ghostsource – Spiff Jul 1 '10 at 3:27

If waiting up to 24 hours before restart is an option, you can turn on "Start Up or Wake" in System Preferences => Energy Saver => Schedule.

share|improve this answer
This does not work. If you schedule a wakeorpoweron using pmset which is the same as what you are saying, if the power is disconnected the poweron will never occur, try it. This only works if you performa proper shutdown and there is not power disconnect – ghostsource Jun 30 '10 at 16:04
@ghostsource What if you also check "Start up automatically after a power failure"? Doesn't that cover all methods of shutdown? – waiwai933 Jun 30 '10 at 17:53
This method will boot the mac in the case of a power cut. However this setting will not trigger in case of a proper shutdown which is what we want to have happen ( the upc tells the mac to shutdown). – ghostsource Jun 30 '10 at 18:39
@ghostsource Right. Do both the "Start Up or Wake" and the "Start up automatically after a power failure". The first setting boots the computer up for a proper shutdown and the second boots it up in case of ungraceful shutdown. – waiwai933 Jun 30 '10 at 18:50
The first setting does not reboot the computer after a proper shutdown and power removal. In terms of the ACPI the wakeorpoweron will only work in the g2 state, this is a state in which the computer can be started from wake on lan. The solution I am looking for will boot the mac from a g3 state which is mechanical off. The only time the mini is able to do achieve a power on from a g3 state is during a power cut. Somehow the the rtc or smc keeps track of this and tells the system to power back on when it senses power. – ghostsource Jun 30 '10 at 19:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .