Terminal command for automatic power on (Mac Mini)

I have an M1 Mac Mini in the rack of a broadcast truck, placed such that reaching the power button is, suffice it to say, difficult. In System Settings > Energy Saver, "Start up automatically after a power failure" is set to ON, but it does not seem to work--I still have to go outside and open up the side of the truck to get in and press the power button. I also have a 2014 Mac Mini in a different rack, which is much easier to access, but should still be turning on when I flip the breaker, and it does not.


Is there a Terminal command to ensure that the Mini will start up when it detects power?


I'm guessing that a "power failure" in the Energy Saver menu means something else--in our use case, the computer gets turned on during setup, remains on for the better part of a show, and turns off when we flip the breakers, but won't get turned on again for several days until the truck is being setup again. I'm told that the older Mac Mini used to do this, but stopped after some Mac OS update.

Posted on Oct 16, 2023 10:37 AM

Reply
19 replies

Oct 17, 2023 8:10 PM in response to phemiusthebard

sudo systemsetup -setrestartpowerfailure on 


It should not be necessary to do that though, since Energy Saver does the same exact thing and should work exactly as you describe. Since it isn't, it may be a macOS bug as you suspect.


Contact Apple and tell them about it: Official Apple Support. Otherwise they might not know it's not working the way they say it should.

Oct 18, 2023 5:27 AM in response to den.thed

This may be causing part of the issue. As a test, I would do a proper Shutdown before killing the power.


Then the Mac would not start up upon restoration of power, which is the whole point of the feature. Shutdown due to loss of power (as opposed to an ordered shutdown) is detected and logged as such.


What the OP wants to do is perfectly reasonable and it's what I do with headless Macs.

Oct 18, 2023 6:50 AM in response to John Galt

I know that, which is why I only suggested it as a "test"


I'm starting to wonder how many other devices are on that same breaker and what might happen to the Mac mini's if the initial on voltage is low or surging. The other unknown, is whether we are dealing with a generator or a wired hookup.


Perhaps those racks and the other devices need to be distributed across several breakers. That way, they can be switched on one at a time instead of all at once.

Oct 21, 2023 8:34 AM in response to phemiusthebard

The difficulty involved right now is that we have to open a two "clamshell" doors on the street-side of our truck, which are generally about five feet off the ground, get up and reach into a deep rack blindly to find the power button. The difficulty is really only compounded by the fact that it should work with the system settings, but doesn't.


I'm still learning the diagrams, so I'm not sure if the racks have individual breakers or not, but we've also talked about moving that Mini near another. We've got some shop time coming up and I'll probably add that to my list of tasks, but again, I'm trying to figure out why the system setting doesn't seem to be working.


I wonder, too, if there's a time limit that defines what a "power failure" is--maybe a couple of hours, versus several days between power loss and another start-up sequence. For instance, this truck will shut down tomorrow and won't get turned back on for another 10 or 11 days, when it gets on-site for the next show.

Oct 21, 2023 9:33 AM in response to phemiusthebard

I wonder, too, if there's a time limit that defines what a "power failure" is--maybe a couple of hours, versus several days between power loss and another start-up sequence. For instance, this truck will shut down tomorrow and won't get turned back on for another 10 or 11 days, when it gets on-site for the next show.


That's possible. None of mine are ever shut down for that period of time. They are installed where power failures are common, but not very prolonged. A few hours at most.

Nov 4, 2023 9:00 AM in response to phemiusthebard

In the interest of following up: I'm sitting in the truck now, after shutting it down on 22 Oct and powering back up on 01 Nov. Both Mac Mini's started up automatically, but I made sure not to "shut down" on the 22nd.


Perhaps the future could hold a "start up on power" option--I know I have a couple of Windows mini-PC's that will start up automatically when they're provided power. I do feel a little weird about not running the shut-down sequence, but I'd rather that for now than opening the truck.


We may also, in the future, move the newer Mac to a different shelf so we can reach it to turn it on, and render this whole discussion moot.

Terminal command for automatic power on (Mac Mini)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.