UPS Battery Backup and Surge Protector, or Surge Protector (alone), or none

gordonbb
gordonbb
Joined: 14 May 19
Posts: 26
Credit: 895570568
RAC: 0

gwgeorge007 wrote:Personally,

gwgeorge007 wrote:
Personally, I am using a Belkin Surge Protector rated at 4000 Joules.  But, the Senior Retirement Community that I live in has a new (6 months) power generator for the entire building that is powered by natural gas and automatically switches over if the power drops out.

George, Good that you are curious. That the Community has a Automatic Transfer Switch should concern you as these transfers from Utility to Generator are often really noisy and can inject really large spikes into the AC power which can destroy hardware. A Surge Protector will help lessen the impact but the Metal Oxide Varistors (MOVs) which are the primary defense against large surges, are sacrificial in nature in that they expire so your hardware doesn't have to.

A UPS of reasonable quality such as the mid range APC or Cyber Power units mentioned here would be a wise investment. After having a Lightning strike near our house take out every GFCI outlet and a rather expensive at the time DVD player I have since installed a whole home Surge Protector on my electrical panel and use additional surge protectors for all expensive electronics and augment these with a 1300-1500VA UPS for each of my Distributed Computing rigs (typically 2 mid range GPUs in each).

I personally prefer the Eaton 9 or 5-series UPSes which we use at work but these don't make financial sense at home unless you can find them on the used market and are comfortable replacing the batteries and potentially replacing old capacitors on the inverter modules.

If your running Windows the software is much more mature and will be able to pause BOINC while on UPS but as others have mentioned the Linux support leaves much to be desired.

Cheers,

Bruce

archae86
archae86
Joined: 6 Dec 05
Posts: 3145
Credit: 7057194931
RAC: 1600768

gordonbb wrote:If your

gordonbb wrote:
If your running Windows the software is much more mature and will be able to pause BOINC while on UPS but as others have mentioned the Linux support leaves much to be desired.

My laptop complies with the preference I set to suspend BOINC processing when it is running on battery, but my PCs do not.  They are Windows 10 machines.  They are running on CyberPower UPS's, with a USB cable from the USB communicating with the PC, and running CyberPower's PowerPanel.  I've looked around at some PC status stuff, and in some sense the PC is aware that it is running on battery.  Do you know a trick to get the BOINC software to do the requested on-battery suspend?

gordonbb
gordonbb
Joined: 14 May 19
Posts: 26
Credit: 895570568
RAC: 0

archae86 wrote:Do you know a

archae86 wrote:
Do you know a trick to get the BOINC software to do the requested on-battery suspend?

Sorry. I mis-spoke. I knew I'd gotten this to work for Folding@Home under Windows for APC PowerChute Personal Edition. but I suspect the same "trick" might be able to get it to work for CyberPower as well.

I just tested it on my Win10 Pro (21H1) daily driver (the only Windows system, aside from my wife's, used for DC - the rest are Linux) and though the PowerChute software showed it was on Battery the BOINC Client did not suspend. So I followed the instructions from video linked above changing from the APC UPS Driver to the Microsoft HID UPS Battery Driver for the Battery Device (e.g. the UPS) in Device Manager.

A reboot then showed in my Performance Power Plan's advanced options settings for both "On Battery" and "Plugged In" situations.

Unplugging the UPS then caused the the Tasks in progress to change to "Suspended - On Battery"

From what I can see the CyberPower software also replaces the Windows On Battery functionality like APC does so the OS no longer can tell when it is running on Battery and that is why the "Suspend on Battery" option in BOINC Manager does not work as it relies on the OS and doesn't know how to hook into the proprietary drivers.

Keith Myers
Keith Myers
Joined: 11 Feb 11
Posts: 4753
Credit: 17679197126
RAC: 5758836

Succinct and correct

Succinct and correct troubleshooting.  You are correct if you examine the BOINC code and see it depends on the common OS API's for determining the status of the device being "on battery" or not.

It only recognizes the Windows and Android notifications for being "on battery"

Does not recognize the Linux notifications except for laptop devices or any proprietary, private or commercial software notifications.

 

gordonbb
gordonbb
Joined: 14 May 19
Posts: 26
Credit: 895570568
RAC: 0

Whoops. Noticed that second

Whoops. Noticed that second link I posted was back to this thread but should be to a Link at Spiceworks referencing rolling back the CyberPower Driver to the MicroSoft HID Battery Driver.

archae86
archae86
Joined: 6 Dec 05
Posts: 3145
Credit: 7057194931
RAC: 1600768

gordonbb wrote: Whoops.

gordonbb wrote:

Whoops. Noticed that second link I posted was back to this thread but should be to a Link at Spiceworks referencing rolling back the CyberPower Driver to the MicroSoft HID Battery Driver.

Thanks, a lot.  For the first time ever I have a desktop PC for which the Einstein tasks suspend when I pull the UPS power plug out of the wall.

But I had to deviate from the posted suggestion.

The link proposed rolling back, but that option was greyed on my machine.  I suspect this is because when I first hooked up the USB cable from my UPS to my PC I had already installed the CyberPower PowerPanel software.  So a Windows default driver was not logged as ever having been in use for this device.

So instead I went to Device Manager|Batteries|CyberPower Battery Backup|Properties|Driver|Update Drivers

I then chose "Let me pick from a list of available drivers on my Computer".

It showed me just three, one of them the CyberPower driver, and one the suggested "HID UPS Battery".

After the install, PowerPanel professed itself not in connection with a UPS, and an initial trial using self-test did not get me Einstein task suspension.  Not losing hope, I did a full power-off reboot.

On reboot, PowerPanel asserted it was in successful contact, the driver in device manager still showed as the replacement, and a full-up pull the plug for the UPS out of the wall test got the Einstein tasks to suspend and resume as desired.

I've gone on at excess length in case someone else may wish to try this, and might get hung up on a twist in the road.

gordonbb, I am greatly in your debt.  Thanks.

 

gordonbb
gordonbb
Joined: 14 May 19
Posts: 26
Credit: 895570568
RAC: 0

archae86 wrote:Thanks, a

archae86 wrote:

Thanks, a lot.  For the first time ever I have a desktop PC for which the Einstein tasks suspend when I pull the UPS power plug out of the wall.

...

gordonbb, I am greatly in your debt.  Thanks.

My pleasure. Glad to hear it worked for you.

Unfortunately this thread has led me down the Rabbit Hole of trying to get my ancient PowerWare 9130 UPSes to suspend on battery under Linux.

Keith Myers
Keith Myers
Joined: 11 Feb 11
Posts: 4753
Credit: 17679197126
RAC: 5758836

gordonbb wrote: archae86

gordonbb wrote:

archae86 wrote:

Thanks, a lot.  For the first time ever I have a desktop PC for which the Einstein tasks suspend when I pull the UPS power plug out of the wall.

...

gordonbb, I am greatly in your debt.  Thanks.

My pleasure. Glad to hear it worked for you.

Unfortunately this thread has led me down the Rabbit Hole of trying to get my ancient PowerWare 9130 UPSes to suspend on battery under Linux.

As I posted way upthread in Message #192387, the Linux version of the BOINC client doesn't work with suspending work when the host goes onto UPS power.

Nothing can be done other than implement my code fix and recompile the client.  Suspending BOINC tasks then does work when pulling the plug on the UPS.

 

gordonbb
gordonbb
Joined: 14 May 19
Posts: 26
Credit: 895570568
RAC: 0

Keith Myers wrote:As I posted

Keith Myers wrote:

As I posted way upthread in Message #192387, the Linux version of the BOINC client doesn't work with suspending work when the host goes onto UPS power.

Nothing can be done other than implement my code fix and recompile the client.  Suspending BOINC tasks then does work when pulling the plug on the UPS.

Nice! But UPower, at least on Ubuntu, seems to only work for Laptops with integrated batteries and not UPSes. What are you using for UPS monitoring on Linux? The vendor daemon? NUT? something else?

I've been having issues getting NUT working on some older PowerWare 9120 700VA units I have. The USB Connection drops when the System Reboots and requires un-plugging and re-plugging the USB connection then restarting the ups, server and monitor services.

Keith Myers
Keith Myers
Joined: 11 Feb 11
Posts: 4753
Credit: 17679197126
RAC: 5758836

gordonbb wrote:Keith Myers

gordonbb wrote:

Keith Myers wrote:

As I posted way upthread in Message #192387, the Linux version of the BOINC client doesn't work with suspending work when the host goes onto UPS power.

Nothing can be done other than implement my code fix and recompile the client.  Suspending BOINC tasks then does work when pulling the plug on the UPS.

Nice! But UPower, at least on Ubuntu, seems to only work for Laptops with integrated batteries and not UPSes. What are you using for UPS monitoring on Linux? The vendor daemon? NUT? something else?

I've been having issues getting NUT working on some older PowerWare 9120 700VA units I have. The USB Connection drops when the System Reboots and requires un-plugging and re-plugging the USB connection then restarting the ups, server and monitor services.

I have it working in Ubuntu with the code change to BOINC.  I just use the default ups_hiddev0 interface which is created by the apcupsd daemon.

keith@Serenity:~$ upower --monitor-detail ups_hiddev0

Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[15:51:18.993]    device changed:     /org/freedesktop/UPower/devices/ups_hiddev0
  native-path:          /sys/devices/pci0000:00/0000:00:08.1/0000:0d:00.3/usb11/11-4/11-4:1.0/usbmisc/hiddev0
  vendor:               American Power Conversion 
  model:                Smart-UPS_1500 FW:UPS 03.5 / ID=1015
  serial:               3S1831X12519    
  power supply:         yes
  updated:              Tue 22 Feb 2022 03:51:18 PM PST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  ups
    present:             yes
    state:               fully-charged
    warning-level:       none
    time to empty:       7.4 minutes
    percentage:          100%
    icon-name:          'battery-full-charged-symbolic'

What the code change does is to look at the state: value to change

[16:23:18.996]    daemon changed:
  daemon-version:  0.99.11
  on-battery:   yes
  lid-is-closed:   no
  lid-is-present:  no
  critical-action: HybridSleep
 

[16:23:48.999]    device changed:     /org/freedesktop/UPower/devices/ups_hiddev0
  native-path:          /sys/devices/pci0000:00/0000:00:08.1/0000:0d:00.3/usb11/11-4/11-4:1.0/usbmisc/hiddev0
  vendor:               American Power Conversion 
  model:                Smart-UPS_1500 FW:UPS 03.5 / ID=1015
  serial:               3S1831X12519    
  power supply:         yes
  updated:              Tue 22 Feb 2022 04:23:48 PM PST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  ups
    present:             yes
    state:               discharging
    warning-level:       discharging
    time to empty:       4.7 minutes
    percentage:          60%
    icon-name:          'battery-good-symbolic

[16:25:18.996]    device changed:     /org/freedesktop/UPower/devices/ups_hiddev0
  native-path:          /sys/devices/pci0000:00/0000:00:08.1/0000:0d:00.3/usb11/11-4/11-4:1.0/usbmisc/hiddev0
  vendor:               American Power Conversion 
  model:                Smart-UPS_1500 FW:UPS 03.5 / ID=1015
  serial:               3S1831X12519    
  power supply:         yes
  updated:              Tue 22 Feb 2022 04:25:18 PM PST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  ups
    present:             yes
    state:               charging
    warning-level:       none
    time to empty:       6.0 minutes
    percentage:          80%
    icon-name:          'battery-full-charging-symbolic'
 


 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.