sonoma – Simulating a dirty shutdown seems no longer possible on macOS 14.4 and later


In macOS 14.0 and earlier, the shutdown command had a -u option for handling UPS-initiated emergency shutdowns. From the man page of shutdown on an old Mac:

 -u     The system is halted up until the point of removing system power,
        but waits before removing power for 5 minutes so that an external
        UPS (uninterruptible power supply) can forcibly remove power.  This
        simulates a dirty shutdown to permit a later automatic power on. OS
        X uses this mode automatically with supported UPSs in emergency
        shutdowns.

On macOS 14.4 and later, this option was removed. In fact, Apple publishes the source code of the shutdown utility on GitHub, and commit 49dcc07 (“14.4”) effectively removes all code that handles the -u option.

Sure enough, by shutting down a machine running macOS 14.4 or later with command shutdown -uh now, the following message is printed to the console:

shutdown: -u has no effect

Anecdotally, I can say that I simulated a power loss on my UPS until my Mac mini (running macOS 15.1) automatically shut down. I waited for the UPS to completely run out of battery and, when I plugged it back in, the Mac mini did not restart, even if the “Start up automatically after a power failure” option is enabled in Settings.

If my experience is confirmed, it means that Apple did not just remove the option to manually simulate a dirty shutdown, but they removed the feature entirely, even in the case of actual UPS-initiated shutdowns.

How can we trigger a dirty shutdown on macOS 14.4 or later?

As of now, it looks like there is no way of automatically restarting a desktop Mac after an emergency shutdown.



Source link

Related Posts

About The Author

Add Comment