UPS help

Apple hardware/software and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
guardian452
Donor
Donor
Posts: 3326
Joined: Tue Aug 21, 2007 10:12 pm
Location: Kentucky, United States
Contact:

UPS help

Unread postby guardian452 » Mon Feb 15, 2016 11:04 am

I recently purchased a Eaton UPS for my Mac Pro (5S 1000VA) and it has a built-in weekly self-test feature. I set it up one Friday afternoon around 5:30

So every Monday the computer is shut down because the UPS has self-tested and this is stored in the log...

Code: Select all

Feb 12 17:28:04 Xavi.local shutdown[44170]: halt by root: Shutting down due to power loss!
Feb 12 17:28:04 Xavi.local shutdown[44170]: SHUTDOWN_TIME: 1455316084 958625


So the UPS itself works fine (e.g. if I turn off the circuit breaker) so long as I have the USB cable unplugged. I would ideally like the computer to shut down when the UPS only has a certain amount of time left but I was told this feature was broken in some versions of OSX. So I set it like so:
Screen Shot 2016-02-15 at 2.03.24 PM.png


Is there some way to not shut down the computer while it self-tests??

User avatar
ClassicHasClass
Donor
Donor
Posts: 1908
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: UPS help

Unread postby ClassicHasClass » Mon Feb 15, 2016 11:12 am

I've never seen that. I have an APC UPS connected to my G5 and it doesn't have that problem (but I'm also running 10.4, so maybe it's an OS glitch instead of a UPS one).
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

Dennis Nedry
Posts: 106
Joined: Thu Aug 23, 2007 6:48 pm

Re: UPS help

Unread postby Dennis Nedry » Tue Feb 16, 2016 12:40 am

I think it's a bug in OS X.

I'm running an APC 1500VA Smart UPS over here (2010 Mac Pro). Under 10.8, when the UPS does a self test, I get a dialogue warning about the system running off backup power and that I should save my work and shutdown soon. I can just click "OK" and get on with life, nothing actually happens unless the UPS hits 25% remaining battery (which is what I've configured in System Preferences).

When I was trying out 10.11, the UPS did another self test and everything closed up and the system turned itself off. I was able to replicate this behaviour simply by pulling the power plug on the APC and then plugging it in 5 seconds later. Even if I managed to abort the shutdown sequence in the GUI, OS X would terminate WindowServer a few seconds later and the system would go down regardless.

I've filed radar bugs on this, and as usual received absolutely no acknowledgement that it's even an issue. I've since gone back to 10.8, my next workstation will be a PC as I'm done dealing with these sorts of bugs-that-never-get-fixed from Apple. They clearly have other priorities these days.

-DN
I've got butterfingers!

User avatar
ClassicHasClass
Donor
Donor
Posts: 1908
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: UPS help

Unread postby ClassicHasClass » Tue Feb 16, 2016 6:40 am

That is incredible. Don't they have UPSes themselves? Or do they assume everyone just uses Apple laptops?
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

nyef
Posts: 69
Joined: Tue Apr 28, 2015 7:54 pm

Re: UPS help

Unread postby nyef » Tue Feb 16, 2016 7:47 am

My theory is that Apple assumes that everyone just uses recent Apple laptops. One of the reasons I'm running Linux on my Mini 2010 is that OSX post-10.6 or so has broken power management (no suspend-to-disk) on that hardware, which was a major part of my use-case when I bought it.

User avatar
guardian452
Donor
Donor
Posts: 3326
Joined: Tue Aug 21, 2007 10:12 pm
Location: Kentucky, United States
Contact:

Re: UPS help

Unread postby guardian452 » Tue Feb 16, 2016 11:04 am

nyef wrote:My theory is that Apple assumes that everyone just uses recent Apple laptops. One of the reasons I'm running Linux on my Mini 2010 is that OSX post-10.6 or so has broken power management (no suspend-to-disk) on that hardware, which was a major part of my use-case when I bought it.

Huh, this is a 2006 mac pro running 10.10. It is the best OSX for this hardware. Everything works great, it is more stable than 10.6.8.
What kills me is it's a hack, this machine isn't supported past 10.7 It has the tiamo boot.efi :mrgreen:

I also rolled my 2014 macbook pro back to 10.10. 10.11 has a weird USB issue that mean my thunderbolt display only works the second time I plug it in. 10.11 also gets confused whether caps lock is on or not. (e.g. sometimes I have to have caps lock light on to type lowercase...) It hangs while waking up, it seems the second time after waking up after being undocked (undock it, it will wake fine the first time and hang the second time). So I'll stick with 10.10 which works perfectly.

Now that panasonic has some good hi-dpi options my next machine will probably be another toughbook. I use my CF-53 a lot more than I used to and I'm thinking about trading my TBD for one of those big curved dell screens. Go to the panasonic full time and turn in the MBP. The speakers in the dell screen will probably suck, but I can get a cheapie set from bose or logitech and just have them set on my desk...



So, as a "recent apple laptop" user, I can say, no that is not the case and there are plenty of bugs here as well...



Dennis Nedry wrote:When I was trying out 10.11, the UPS did another self test and everything closed up and the system turned itself off. I was able to replicate this behaviour simply by pulling the power plug on the APC and then plugging it in 5 seconds later. Even if I managed to abort the shutdown sequence in the GUI, OS X would terminate WindowServer a few seconds later and the system would go down regardless.
That's the bug I mentioned in the OP. The only option that actually "works" is the "shut down after xxx minutes". :( If only my UPS didn't report it was on battery power when running it's self test. There must be a self-test signal it sends out that OSX ignores.


What I could do is hook up a 120v relay to the mains and an MCU to send the signal to the computer to shut down if there is really a power loss... jeez, what a hack. :evil: Or I could send the UPS back, which is probably a better option since we only loose power 4 or 5 times a year. Just the vagrancies of older hardware and HFS have me a little concerned...

User avatar
ClassicHasClass
Donor
Donor
Posts: 1908
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: UPS help

Unread postby ClassicHasClass » Tue Feb 16, 2016 12:35 pm

Or just unplug the data cable?
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

User avatar
guardian452
Donor
Donor
Posts: 3326
Joined: Tue Aug 21, 2007 10:12 pm
Location: Kentucky, United States
Contact:

Re: UPS help

Unread postby guardian452 » Tue Feb 16, 2016 2:34 pm

That's what I did. But we have long outages more often than not (too long for the UPS to ride out) and it would be nice to shut down the system cleanly.

Now at my apartment less than 2 miles from work I have been living here for almost two years and the power has not gone out once!

nyef
Posts: 69
Joined: Tue Apr 28, 2015 7:54 pm

Re: UPS help

Unread postby nyef » Tue Feb 16, 2016 5:24 pm

Okay, how about having another system (say an RPi or similar) monitor the UPS and when it has a power failure it can ssh over to the OSX box and issue a shutdown?

User avatar
ClassicHasClass
Donor
Donor
Posts: 1908
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: UPS help

Unread postby ClassicHasClass » Tue Feb 16, 2016 11:15 pm

nyef wrote:Okay, how about having another system (say an RPi or similar) monitor the UPS and when it has a power failure it can ssh over to the OSX box and issue a shutdown?


Amusingly, I had a system doing exactly that. It monitored an IP camera and when the IP camera went down, it assumed the worst and forced shutdowns. (If the switch blew up, then nothing happened.)

But now that the POWER6 has dual power supplies, if the one connected directly to wall voltage goes offline but the UPS one stays up, it can now automatically respond to that internally.
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

Dennis Nedry
Posts: 106
Joined: Thu Aug 23, 2007 6:48 pm

Re: UPS help

Unread postby Dennis Nedry » Wed Feb 17, 2016 8:07 pm

Just a quick update...

Apparently I got through to someone on radar, and they're looking into the issue. Whether or not that means anything is going to get fixed is something else entirely, I've been in contact with Apple before regarding well known SMC bugs on the Mac Pro and that conversation ended with them giving me some insanely contrived example of why things were "working as intended" even though they clearly were not.

Anyways...

I've been told that the majority of magic happens in the PowerManagement project, specifically through powerd and ioupsd. The source code is available for either (supposedly) here:

http://opensource.apple.com/source/Powe ... -572.20.5/

Unfortunately the difference between PowerManagement-321.24.1 (Mac OS X 10.8.5) and PowerManagement-572-20.5 (Mac OS X 10.11.2) is fairly radical, so at first glance I have absolutely no idea what could be causing the issue other then ioupsd having been rewritten sometime between 10.8 and 10.11. It might be possible to compile the older versions for the newer OS (depending on how much has changed elsewhere) and just replace the binaries yourself to get things functioning again (assuming you disable SIP first on 10.10+).

I've also been told that apcupsd should work fine on OS X (http://www.apcupsd.org). Completely disabling the UPS management under OS X (uncheck everything in System Preferences) should prevent OS X from shutting itself down, at which point you can rely on apcupsd to gracefully halt the system instead.

-DN
I've got butterfingers!

User avatar
ClassicHasClass
Donor
Donor
Posts: 1908
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: UPS help

Unread postby ClassicHasClass » Thu Feb 18, 2016 8:55 am

SIP sucks so bad for these kinds of OS self-repairs.

I mean, we shouldn't have to do OS self-repair, but SIP makes it even worse.
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...


Return to “Apple”

Who is online

Users browsing this forum: No registered users and 1 guest