On Sat, 17 Apr 2021, Carlos E. R. wrote:
On 17/04/2021 21.43, Roger Price wrote:
On Sat, 17 Apr 2021, Carlos E. R. wrote:
Methinks that depleting the battery to 10 is a very severe wear on it. I would go for 50% tops. If the system is not capable of going down fast...
If you try to power down my machine at 23:50 hours, it will not go down till 00:15, or worse, 00:30. Other times, yes, it will go down fast.
How do you hold back /sbin/shutdown for what might be 40 minutes? Is the Salicru capable of supplying power to the system for 40 minutes and still have 50% reserve? This will need testing.
I don't. If the mains power fails that instant and I'm not there, the UPS dies of exhaustion and the machine with it.
For me, this would not be acceptable.
At least with hibernation, which is what I do. The system tries to sync the filesystem, and if it does that during the interval 23:45 to 00:15 the kernel is not capable of syncing the filesystem while texpire is running. The cron-job texpire has to be killed first, then the machine can be told to hibernate. I have not tested this yet.
What is the advantage of hibernation for a desktop system? The machine does no useful work, yet consumes energy from the UPS. A "proper" shutdown would kill texpire and not drain the battery, which you have said you want to avoid. I do not use hibernation. I find I am better served with a shutdown --poweroff and an automatic restart when utility power returns.
I have not tested power down during that interval yet (I thought I had).
There are other issues:
- sometimes hibernation fails, and has to be called a second time. How to automate this?
I'm guessing that you specify something like SHUTDOWNCMD "systemctl start systemd-hibernate.service" in upsmon.conf. You would have to replace this with a call of a script which watches over systemctl status systemd-hibernate.service and restarts the service if it fails. This is becoming complicated. It might also be advisable to not execute the command upsdrvctl shutdown in order to avoid turning off the UPS power outlets. Roger