Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
3
votes
0
answers
144
views
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 externa...
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.
user579987
(31 rep)
Nov 20, 2024, 10:48 PM
• Last activity: Dec 3, 2024, 04:49 PM
2
votes
1
answers
489
views
Force Mac to shutdown if entering battery mode on UPS
I am on Mac mini M1 with OSX 11.6.4. I live in an area where occasional blackouts occur especially during winter. In order to avoid dirty shutdowns and abrupt power loss to my Mac I've purchased APC UPS with data port support. It's a usb cable from UPS to Mac to signal if there is a power loss to au...
I am on Mac mini M1 with OSX 11.6.4. I live in an area where occasional blackouts occur especially during winter. In order to avoid dirty shutdowns and abrupt power loss to my Mac I've purchased APC UPS with data port support. It's a usb cable from UPS to Mac to signal if there is a power loss to automatically shut it down using [built-in tools](https://support.apple.com/en-gb/guide/mac-help/mchlp2987/11.0/mac/11.0) . The UPS will provide a runtime between 15-30min at most. I did not buy it to work during blackouts but rather to allow time for clean shutdown. I've opted for UPS for a bit more running time in case there is a task such as an update or in case Mac draws more power than usual.
What concerns me is the following. Sometimes apps would prevent Mac from shutting down. I have configured my Mac to shutdown during the night. However, in a number of instances, an app, such as Visual Studio Code or iTerm would prevent that from happening. I know that someone will suggest a workaround to manually close apps before leaving the Mac, but it has 2 major disadvantages:
- user error: one can easily forget to close active apps, especially after a long-day
- inconvenience: if I need to leave my Mac during the day, it would be super inconvenient to close all apps and re-open them, plus it ties with previous point where if something urgent comes up, one will easily forget to close all running apps
My question:
Does anyone know or can confirm *how* Mac will shutdown when entering a battery mode in UPS and when [one of the thresholds for shutting down](https://support.apple.com/en-gb/guide/mac-help/mchlp2987/11.0/mac/11.0) is reached?
My concern is that if it is a request rather than forced shutdown, and an actively running app will prevent a shutdown, the Mac will continue to run on UPS battery until it is drained and dirty/abrupt power loss occurs.
Alex
(321 rep)
Nov 26, 2023, 11:15 PM
• Last activity: Apr 25, 2024, 12:03 PM
3
votes
1
answers
830
views
M1 Mac Mini Fails to Shutdown with APC UPS Options (Monterey 12.2.1)
I have an M1 Mac Mini that needs to auto-shutdown after 60 seconds on the UPS. We are using an APC Back-Ups 850VA model connected via USB. Also, this M1 mac mini has had its data migrated from a Time Machine backup of an Intel Mac Mini running OS X El Capitan 10.11.6. The mac properly recognizes the...
I have an M1 Mac Mini that needs to auto-shutdown after 60 seconds on the UPS. We are using an APC Back-Ups 850VA model connected via USB.
Also, this M1 mac mini has had its data migrated from a Time Machine backup of an Intel Mac Mini running OS X El Capitan 10.11.6.
The mac properly recognizes the UPS and lists the UPS options in the Energy Saver preferences, however no matter what I set within the UPS settings, the UPS does not shutdown the machine.
The only thing that does work is a warning when the Mac Mini is drawing from the UPS.
**Does anyone have any suggestions? Nothing in the previous threads have worked.**
Here are the relevant settings:
**pmset -g**
System-wide power settings:
Currently in use:
disksleep 10
powernap 1
womp 1
networkoversleep 0
sleep 0 (sleep prevented by coreaudiod, bluetoothd, powerd)
Sleep On Power Button 1
ttyskeepawake 1
tcpkeepalive 1
autorestart 1
standby 0
**pmset -g ups**
UPS settings:
haltlevel on 100
haltafter on 1
haltremain on 15
**When UPS plugged in:**
Now drawing from 'AC Power'
-Back-UPS ES 850G2 FW:931.a10.D USB FW:a10 (id=25296896) 74%; charging present: true
**When ups unplugged:**
Now drawing from 'UPS Power'
-Back-UPS ES 850G2 FW:931.a10.D USB FW:a10 (id=25296896) 74%; discharging; 4:14 remaining present: true
Jonathan Moore
(31 rep)
Feb 22, 2022, 07:02 AM
• Last activity: Feb 23, 2024, 04:32 PM
2
votes
0
answers
605
views
macOS has native UPS support; where do events get logged to?
I have various Apple macOS systems; all of them have an APC UPS attached, all recognize the UPS and allow shutdown parameter tweaking via obvious methods in the system preferences. Is there a way to easily get a list of UPS events? I've looked and looked and have never found anything, even in `/var/...
I have various Apple macOS systems; all of them have an APC UPS attached, all recognize the UPS and allow shutdown parameter tweaking via obvious methods in the system preferences.
Is there a way to easily get a list of UPS events? I've looked and looked and have never found anything, even in
/var/log/
files.
I do see this in the output of log show
(part of 250+MB of log output):
2023-07-02 17:16:17.376729-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 44 Type : 2 IV: 0) with key Is Charging
2023-07-02 17:16:17.376740-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 45 Type : 2 IV: 1) with key Is Charging
2023-07-02 17:16:17.376749-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : d0 Type : 2 IV: 0) with key Power Source State
2023-07-02 17:16:17.376760-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 66 Type : 1 IV: 100) with key Current Capacity
2023-07-02 17:16:17.376769-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 68 Type : 1 IV: 6716) with key Time to Empty
2023-07-02 17:16:17.376778-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 44 Type : 257 IV: 0) with key Is Charging
2023-07-02 17:16:17.376786-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 45 Type : 257 IV: 1) with key Is Charging
2023-07-02 17:16:17.376794-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : d0 Type : 257 IV: 0) with key Power Source State
2023-07-02 17:16:17.376802-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 84 U : 40 Type : 257 IV: 1200) with key Set Required Voltage
2023-07-02 17:16:17.376810-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 84 U : 30 Type : 257 IV: 1350) with key Voltage
2023-07-02 17:16:17.376818-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 66 Type : 257 IV: 100) with key Current Capacity
2023-07-02 17:16:17.376825-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 68 Type : 257 IV: 6716) with key Time to Empty
2023-07-02 17:16:17.376844-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 84 U : 5a Type : 257 IV: 2) with key Enable Audible Alarm
2023-07-02 17:16:17.376866-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 84 U : 40 Type : 257 IV: 1200) with key Set Required Voltage
2023-07-02 17:16:17.376873-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 84 U : 30 Type : 257 IV: 1342) with key Voltage
2023-07-02 17:16:17.376901-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Skipping duplicate element (UP : 85 U : 44 Type : 257 IV: 0) with key Is Charging
2023-07-02 17:16:17.376963-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] Power Source status isACSource : No , isCharging : No , isDischarging : Yes
2023-07-02 17:16:17.377131-0700 0x13a1 Default 0x0 787 0 ioupsd: (IOHIDLib) [com.apple.iohid:ups] dispatchEvent: {
"Current Capacity" = 100;
"Enable Audible Alarm" = 2;
"Is Charging" = 0;
"Max Capacity" = 100;
"Power Source State" = "Battery Power";
"Set Required Voltage" = 120;
"Time to Empty" = 111;
Voltage = 0;
}
2023-07-02 17:16:17.377581-0700 0x20b6f3 Default 0x0 522 0 powerd: [com.apple.powerd:battery] Received power source(psid:5000) update from pid 787:
2023-07-02 17:16:17.377777-0700 0x20b80f Default 0x0 522 0 powerd: [com.apple.powerd:battery] Battery time remaining posted(0x3000000008c006f) Time:111 Source:Batt
2023-07-02 17:16:17.377795-0700 0x20b80f Default 0x0 522 0 powerd: [com.apple.powerd:battery] Battery capacity change posted(0x80064). Capacity:100 Source:Batt
2023-07-02 17:16:17.377808-0700 0x20b80f Default 0x0 522 0 powerd: [com.apple.powerd:battery] Power Source change. Source:Batt
2023-07-02 17:16:17.378407-0700 0x20b6f3 Default 0x0 522 0 powerd: PowerManagement: UPS low power warning
e40
(149 rep)
Jul 5, 2023, 05:04 PM
• Last activity: Jul 7, 2023, 08:01 PM
3
votes
2
answers
692
views
How to check if UPS usb connection will work natively with Mac mini?
I'm trying to purchase a UPS from APC. It's the Easy UPS line. The documentation said that it uses UPSCAPO software for connecting to PC, but never mention macOS. Is there a standard used on the UPS USB connection that I can use to lookup whether a UPS will be natively supported by iMac/Mac mini for...
I'm trying to purchase a UPS from APC. It's the Easy UPS line. The documentation said that it uses UPSCAPO software for connecting to PC, but never mention macOS.
Is there a standard used on the UPS USB connection that I can use to lookup whether a UPS will be natively supported by iMac/Mac mini for automatic shutdown?
rahmat
(335 rep)
Nov 11, 2021, 05:13 PM
• Last activity: Nov 22, 2022, 07:05 AM
0
votes
1
answers
1490
views
Do I need to purchase pure sine wave UPS for Mac mini M1?
I heard from the APC UPS sales that I need to purchase more expensive pure sine wave UPS for Mac mini M1. Is this correct?
I heard from the APC UPS sales that I need to purchase more expensive pure sine wave UPS for Mac mini M1. Is this correct?
rahmat
(335 rep)
Nov 11, 2021, 05:09 PM
• Last activity: Nov 11, 2021, 06:13 PM
1
votes
1
answers
923
views
How To Handle Power Outages With Remote Macs?
At my condo, which I visit monthly, I have a 2010 MBA (High Sierra?) that runs a webcam and performs various other periodic tasks. I don't have an UPS for it, but the internal battery usually lasts long enough to handle power outages. However, this week the condo scheduled an all-day outage in order...
At my condo, which I visit monthly, I have a 2010 MBA (High Sierra?) that runs a webcam and performs various other periodic tasks. I don't have an UPS for it, but the internal battery usually lasts long enough to handle power outages. However, this week the condo scheduled an all-day outage in order to do maintenance on the electrical systems. I have the MBA scheduled to "Start up or wake" every morning. (This MBA does not have "Start up automatically after a power failure".) As expected, the MBA's battery went dead during the power outage. I expected that the battery would charge up after power was resumed and that the MBA would start up on schedule. It did not and remains shut off.
What should I have done differently?
At home I have a 2017 iMac running Catalina. It has a UPS with a battery that lasts about an hour after a power outage. When the battery gets low, the UPS sends a shutdown command to the Mac. During a long outage the UPS shuts the Mac down and then turns itself off when the battery dies. When power resumes, the Mac starts up automatically. ("Start up automatically after a power failure" is enabled.)
However, this week, while I was away, there was a power outage. The outage lasted long enough for the UPS to shut down the Mac, but power resumed before the UPS shut itself off. So, power to the Mac was never lost. As a result, it stayed shut down and required manual intervention to start up.
What should I have done differently?
Buadhai
(681 rep)
Sep 19, 2020, 11:10 AM
• Last activity: Sep 19, 2020, 03:36 PM
1
votes
0
answers
1165
views
Anyone able to get UPS on a MacBook Pro to work correctly?
I recently purchased a Tripp Lite INTERNET600U UPS for my 2016 MBP 15-inch laptop running Catalina 10.15.5. When I connect up the USB, I get the "Your computer is running on battery power ..." dialog about once a minute. It would be nice to get this working. While the laptop has a battery and knows...
I recently purchased a Tripp Lite INTERNET600U UPS for my 2016 MBP 15-inch laptop running Catalina 10.15.5.
When I connect up the USB, I get the "Your computer is running on battery power ..." dialog about once a minute. It would be nice to get this working. While the laptop has a battery and knows when to turn off when its battery is low, there are also external devices attached like hard drives so it would nice to gracefully shutdown when the UPS battery is low.
My current solution is to power all the disks via the USB-C ports on the laptop but that is less than ideal.
Update: I replaced the UPS with one from Cyber Power (not made in China) and the USB interface appears to work. However, the UPS tab in the Energy Saver panel does not provide with any options on when to shutdown. The official Apple web page for Catalina says it should and there are images to that affect on the web. But my panel doesn't have the "Shutdown Options" button. I assume this is because it is a laptop.
pedz
(493 rep)
Jun 22, 2020, 12:59 PM
• Last activity: Jun 26, 2020, 01:19 PM
2
votes
2
answers
2875
views
Do I need a sine wave UPS for late 2013 Mac Pro?
The support person at CyberPower told me that my late 2013 Mac Pro has a PFC power supply therefore, I would need to get an UPS with sine wave output. Is this a correct statement?
The support person at CyberPower told me that my late 2013 Mac Pro has a PFC power supply therefore, I would need to get an UPS with sine wave output.
Is this a correct statement?
David293836
(171 rep)
Sep 24, 2018, 06:28 PM
• Last activity: Jan 16, 2019, 11:38 AM
1
votes
1
answers
562
views
Shut down Mac Server when APC 1400 battery is nearly empty
I'm running OS X Server on a Mac Mini. I'm powering the server via an APC 1400 (one of the older, beige ones). It has a serial connector, so I assume it could possibly interface with the Mac Mini via a serial to USB adapter. Is it possible to power down the OS X Server when the UPS batter is nearly...
I'm running OS X Server on a Mac Mini. I'm powering the server via an APC 1400 (one of the older, beige ones). It has a serial connector, so I assume it could possibly interface with the Mac Mini via a serial to USB adapter.
Is it possible to power down the OS X Server when the UPS batter is nearly depleted with my setup? Do I need to install APC software to get this to work? Will a serial to USB adapter do the job?
Or is my APC backup unit too ancient to work with my Mac Mini in this scenario?
Swisher Sweet
(5620 rep)
Feb 18, 2016, 06:39 PM
• Last activity: Nov 14, 2018, 05:01 PM
0
votes
1
answers
369
views
Power up after UPS initiated shutdown
I have a Mac Pro with an APC UPS supply connected. I have it configured to shut down the system when we lose power. What I'd like to do is to have it power up the system when power is subsequently restored, but I don't see any option that appears to do that. I am using OS 10.12.4 and an APC Back-UPS...
I have a Mac Pro with an APC UPS supply connected. I have it configured to shut down the system when we lose power. What I'd like to do is to have it power up the system when power is subsequently restored, but I don't see any option that appears to do that. I am using OS 10.12.4 and an APC Back-UPS Pro 1500VA.
user2379888
(181 rep)
Mar 27, 2017, 04:20 PM
• Last activity: May 8, 2017, 06:25 PM
5
votes
4
answers
6501
views
Disable audible alarm on UPS
I would like to add an APC brand of a UPS (Uninterrupted Power Supply) device to a Mac only environment. By default APC has a very loud heart attack invoking, babies crying in the night alarm to indicate power interruption. This audible alarm function can be disabled through a setting in their "Powe...
I would like to add an APC brand of a UPS (Uninterrupted Power Supply) device to a Mac only environment. By default APC has a very loud heart attack invoking, babies crying in the night alarm to indicate power interruption. This audible alarm function can be disabled through a setting in their "Powerchute" power management software. However the APC software seems to be Windows only.
I understand that the Mac will see the UPS in System Preference in the Energy Saving pane for settings concerning saving and shutting down but not for disabling audible alarms.
I've re-listened to a very good episode of The Typical Mac User Podcast about UPSs (ref.) http://typicalmacuser.com/wordpress/2010/07/20/tmup-212-a-ups-can-save-your-butt-with-george-starcher/ however I still cannot quite grasp the setup. It seems one has to initiate the APC device on a Windows computer, disable the audible alarm, then the Mac will recognize this configuration.
I don't want to make the investment if the audible alarm shut-off is not guaranteed. The closest current solution seems to to be an APC download "PowerChute® Personal Edition for the Mac OS X operating system" (ref.) http://www.macupdate.com/app/mac/10324/apc-powerchute . However the only current reviews were not favorable.
Has anyone gone through this process?
john1975
(361 rep)
Nov 7, 2011, 10:14 AM
• Last activity: May 8, 2017, 06:07 PM
2
votes
0
answers
358
views
Mac UPS always shows 0%
I recently bought a UPS for my Mac mini home server. It is a Chinese brand. When I plug the UPS into my Mac mini, the computer successfully detects the UPS and the UPS setting pops up inside the Energy Saver preferences. However, the battery percentage is always at 0% and the UPS menu always shows *...
I recently bought a UPS for my Mac mini home server. It is a Chinese brand. When I plug the UPS into my Mac mini, the computer successfully detects the UPS and the UPS setting pops up inside the Energy Saver preferences. However, the battery percentage is always at 0% and the UPS menu always shows *Unknown Time Remaining*.
I'm pretty sure this should be driverless right? The UPS didn't come with any driver, and the computer can detect the UPS. I tried installing APCUPSd , that didn't help, the app shows can't connect to UPS. Anything else I can try?
My Mac is a Mac mini (Late 2014) running macOS Sierra 10.12.4, the UPS is connected via USB.


Tom Shen
(3367 rep)
Apr 15, 2017, 01:47 PM
2
votes
2
answers
420
views
Power source event trigger
Late 2014 Mac mini running Sierra connected to an APC BackUPS Pro 900. No special software has been installed to support the UPS. At the moment I run `pmset` every minute to determine the power source, and trigger actions based on the results. However, a dialog window pops up as soon as the Mac swit...
Late 2014 Mac mini running Sierra connected to an APC BackUPS Pro 900. No special software has been installed to support the UPS.
At the moment I run
pmset
every minute to determine the power source, and trigger actions based on the results.
However, a dialog window pops up as soon as the Mac switches to backup power. I'm wondering if there is any way I can trigger based on anything else, given that macOS seems to be able to do so.
Rob de Jonge
(2314 rep)
Feb 7, 2017, 04:12 PM
• Last activity: Feb 7, 2017, 07:20 PM
2
votes
3
answers
1064
views
UPS present check from command line
System Preferences in Sierra seems to know when a UPS is present. How do I check this from the command line?
System Preferences in Sierra seems to know when a UPS is present. How do I check this from the command line?
Rob de Jonge
(2314 rep)
Feb 7, 2017, 04:16 PM
• Last activity: Feb 7, 2017, 04:30 PM
1
votes
1
answers
526
views
How can I make my Mac shutdown a Windows PC when my UPS signals power loss?
I have an APC UPS connected to my iMac that's set to shutdown after 1 minute of running on UPS power. I also have a Windows 10 PC plugged into the UPS that I'd like shut down as well. Is there a way to send a shutdown command from my Mac to the Windows 10 PC telling it to shut down as well when a po...
I have an APC UPS connected to my iMac that's set to shutdown after 1 minute of running on UPS power. I also have a Windows 10 PC plugged into the UPS that I'd like shut down as well. Is there a way to send a shutdown command from my Mac to the Windows 10 PC telling it to shut down as well when a power loss is detected?
trolley
(13 rep)
Aug 18, 2016, 07:54 PM
• Last activity: Aug 18, 2016, 08:30 PM
Showing page 1 of 16 total questions