[Nut-upsuser] NUT with hibernation works only once

David Kačerek davidkacerek at gmail.com
Sat Jul 31 03:41:19 BST 2021


I've got a problem with NUT. My configuration of NUT is based on the 
"Workstation with timed shutdown" scenario, chpt. 7 described in the Config 
Examples book from R. Price. 

There are 2 principal differences I've made to the configuration on my PC 
though - no heartbeat and the shutdown command changed to hibernation. For the 
sake of immediate verification of NUT operation I have only 1 timer set in 
place in my CMDSCRIPT temporarily for an immediate hibernation after the plug 
is pulled from the wall socket. Once I solve my problem I'll put some five-
minute-warning-timer or so in there.

I've verified that when the SHUTDOWNCMD  is set to "systemctl poweroff" in 
upsmon.conf, it works as expected. But If I put "systemctl hibernate" in 
there, it works only once.

Before the hibernation, I can see all NUT-related services are up an running 
(see "Before hibernation.png" file). Then the hibernation takes place 
and when the PC is woken up from the 1st hibernation and the plug is pulled 
out again, no ONBATT event is detected and no hibernation is carried out. 
Furthermore, upon checking the status of nut-monitor service again, its status 
is changed to "inactive (dead)"  (see "After waking up.png" file).

There's also some weird behavior going on after the 1st hibernation: If I try 
to start the nut-monitor service, suddenly my shutdown-timer kicks in and the 
PC proceeds to another hibernation unless I stop the service right away.

Another weird behavior following waking up after the 1st hibernation is, that 
if I try to restart or shutdown my PC - at the point of systemd reporting 
"Reached target Reboot" or "Reached target Power-Off" on the virtual console 
respectively - my UPS kills off power and shuts down itself for about 52 
seconds till it powers on. I know the UPS should normally shut itself down 
some time after shutting down the PC, but it shouldn't go down If I restart or 
shutdown the PC myself.

For my NUT configuration, please see "NUT.report" file created by R. 
Price's "nut-report" script. For the NUT activity log taken after waking up 
from the 1st hibernation, see nut-journal.log file created by nut-
journal script.

My UPS model is Cyber Power BR700ELCD. I know it's not mentioned in the 
hardware compatibility list at the NUT web site, but both nut-scanner and 
upsdrvctl successfully detect the UPS and upsc shows its status.

You can access all aforementioned files here:

Can You please help me with my problem?

Thank You,
David K.

More information about the Nut-upsuser mailing list