You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Clean shutdown Mac Mini with the power button

Hello,


I would like to be able to startup and shutdown cleanly my Mac Mini M2 Pro with only pressing the power button.

I tried with Automator, but I couldn't a way to trigger the Apple script with the power button.


Let me know if you have any ideas.


Have a nice day

Mac mini (M2 Pro, 2023)

Posted on Feb 29, 2024 1:39 AM

Reply
10 replies

Feb 29, 2024 3:05 AM in response to desle93

Shutting down via the power button is a last resort and not beneficial to your Mac.


It is a Forced shutdown (not a clean one) and should be avoided unless absolutely necessary because the Mac has frozen or cannot be shutdown properly.


The only good way to shutdown is via the Apple Menu/Shutdown.


Pressing the power button briefly to put the Mac to sleep is fine.

Feb 29, 2024 4:47 AM in response to desle93

I don't know and I suspect nobody else knows as it's not something I have ever heard of in 20 years on these forums.


I reiterate, the only way to safely shut down a Mac is to select Apple Menu/Shutdown and wait a few seconds for it to do the job properly.


Using the power button is for emergency only and can damage files and any unsaved changes.


Why are you so set against using the shutdown menu?

Feb 29, 2024 5:10 AM in response to Ian R. Brown

To expose more of the project, the mac mini will be integrated in a case with a touchscreen monitor in the front, so the mac will not be physically accessible to the user. The mac mini only jobs will be startup launch an app full screen when the power button is pressed (no login, no dock) and close all programs then shutdown cleanly when the power button is pressed.


I want the user to be able to turn on and off with the same button as it makes more sense with other devices.

Feb 29, 2024 5:50 AM in response to desle93

How long will it be between power/powerdown cycles? If this is multiple times a day, seven days a week, you will be better off utilizing lock screen which after a short period of time will kill video to the screen to prevent burn in. Leaving the new Macs on is not an issue as they use very little power when at idle. If you want to conserve power, if the Mac is only needing to be accessible during certain times of day you can schedule startup times and shut sown times. The additional advantage of this approach is that the Mac will be instantly available for use instead of needing to wait for it to boot up every time.


Most wear and tear on electronic devices takes place during start up because of heat cycling.

Feb 29, 2024 5:58 AM in response to woodmeister50

The need is very specific as the system will be turned on and used with the touchscreen the software launched only.


The reason I want to be able to shutdown cleanly the mac with the power button is to be able to turn everything on and off with only one button. The only other option a see would be to use an arduino and emulate an HID device with a macro that an launch an applescript, but this is much more complicated.

Mar 1, 2024 4:21 AM in response to woodmeister50

woodmeister50 wrote:

Most wear and tear on electronic devices takes place during start up because of heat cycling.

You think there is no 'heat cycling' when systems are put to sleep and woken up later on?

This is another old wives tale that goes around, but not much evidence to back it up.

There must be people wondering if they should turn the lights off at night because the light bulbs are heating and cooling. Although you might have a case with incandescent light bulbs of old which always did tend to fail just as you turned them off/on.

Mar 1, 2024 4:39 AM in response to Ian R. Brown

Ian R. Brown wrote:

Using the power button is for emergency only and can damage files and any unsaved changes.

Why are you so set against using the shutdown menu?

This often was the case with dos/windows systems but after win95 they seemed to learn the lesson and use journals and whatnot to recover systems after a power outage. I doubt modern Apple Mac systems fail to recover from an outage - just pull out the mains plug and try it. Laptops didn't suffer from this anyway!

As far as being set on the problem, its best not to rewrite the question but address the OP's query.

Clean shutdown Mac Mini with the power button

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