[Nut-upsuser] NUT with hibernation works only once

Roger Price roger at rogerprice.org
Sat Jul 31 09:43:23 BST 2021

On Sat, 31 Jul 2021, David Kačerek via Nut-upsuser wrote:

> Hello,
> 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.

Hello David, Does "systemctl hibernate" work correctly without any NUT function 

> 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).

If nut-monitor.service is dead, then you certainly will not see event ONBATT.

I have no experience of hibernation, so I have no immediate suggestion for why
nut-monitor is not restarted.  Perhaps some experimenting will show if the 
command "systemctl hibernate" called from nut-monitor has the effect of stopping 

What does command ls -alF /lib/systemd/system-sleep/ report?

> 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.

Do you have something like nut-delayed-ups-shutdown.service which calls for the 
UPS to shutdown its outlets after N seconds?  For hibernation to work, you 
should disable this service.  I'm assuming you want the UPS to go on feeding the 
machine throughout the hibernation. (And to go on beeping.)

> 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.

I can see the png images on Google Drive using Google Chrome, but not the txt 
files.  With Firefox, I see neither png nor txt.

> 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:
> https://drive.google.com/drive/folders/1Pnyl2DkkN4bNvsntJpRVTe6-O8MmV7pw?usp=sharing
> Can You please help me with my problem?
> Thank You,
> David K.
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

More information about the Nut-upsuser mailing list