How to disable UPS energy_saving with NUT?

Solution 1:

Unless you are using commands in upssched.conf, NUT should wait until the UPS reports low battery before doing a shutdown. Check to make sure you have nothing scheduled there.

Once NUT starts the shutdown, it will trigger the UPS to recycle after a timeout. This is to ensure the Server comes back up if Power is restored before the UPS runs out of battery. The time is specified as FINALDELAY in upsmon.conf.

You may want to enable logging of all notifications for all events in upsmon.conf. This may enable you to determine why the system is shutting down so soon. These are the settings I use:

NOTIFYFLAG ONBATT   SYSLOG+WALL
NOTIFYFLAG ONLINE   SYSLOG+WALL
NOTIFYFLAG FSD      SYSLOG+WALL
NOTIFYFLAG SHUTDOWN SYSLOG+WALL

NOTIFYFLAG LOWBATT  SYSLOG
NOTIFYFLAG REPLBATT SYSLOG

NOTIFYFLAG COMMOK   SYSLOG
NOTIFYFLAG COMMBAD  SYSLOG+WALL
NOTIFYFLAG NOCOMM   SYSLOG+WALL
NOTIFYFLAG NOPARENT SYSLOG+WALL

If NUT is shutting down bases on a timer script, this is the kind of line I would expect to see in the log. It appears the UPS stops communicating after 5 minutes, and NUT is doing a last ditch FSD (forced shutdown). This is what I would want it to do. Five minutes should be long enough to indicate power is not likely to return quickly.

Dec  2 07:13:55 t upsd[1942]: Client [email protected] set FSD on UPS [nutdev1]

I would expect NUT to use shutdown.return to signal the UPS to shutdown. This should cause the UPS to restart once power is restored, and do a brief shutdown if the power is restored before the shutdown completes.

I would expect the ups.delay.shutdown and ups.delay.start to be the tunables for the UPS shutdown restart cycle. ups.delay.shutdown should allow time for the server to complete the shutdown cycle, and may need to be increased. ups.delay.start should be the time it takes for power to stabilize after the power has returned. It also allows some time for the batteries to recharge before load is applied.

Normally, you would not want to run the batteries down to low before shutting down. You want to have enough battery to go through another cycle or two in case the power drops again.

Solution 2:

Many UPS' have a low load auto shutdown. If the load is less than 10% of the UPS' rated load then it will shut down after 5 minutes. I have the same problem with my Proline UPS. Just put more load on the UPS and it won't shutdown. It's a bit counter intuitive if you are trying to conserve battery power, I know.

I have not been able to find a software setting to turn that feature off. It seems like its hard coded into the firmware.

I have put a sonoff smart switch on the load side and programmed it to turn a 10% load on for 10 seconds every 4 minutes. It's not elegant but it keeps the ups running.