Score:2

Shutdown Computer if UPS Battery is Low 22.04

br flag

I have a UPS connected via USB and under Settings->Power I am able to see the UPS battery percentage, however there is no option for telling the computer what action to take if the UPS battery gets low.

On earlier versions, I am currently using 22.04, I was able to set an option to shut the computer down if battery became critical. However now the option no longer exists. Is there something I need to install to make this option available?

enter image description here

petep avatar
in flag
Have a look at nut, "network ups tools".
24601 avatar
in flag
https://www.linux.com/news/smart-power-monitoring-network-ups-tools/
Joshua Besneatte avatar
br flag
I have installed and am playing with "nut" and I can use "upsc" to see info on the ups but now the ups is not showing up in power settings at all and ups battery level no longer shows in my status bar
petep avatar
in flag
This is a good guide that i use. https://wiki.ipfire.org/addons/nut/detailed
petep avatar
in flag
Also see if nut works for your ups. https://networkupstools.org/stable-hcl.html
petep avatar
in flag
Try "gsettings set org.gnome.desktop.interface show-battery-percentage true" to show batt %
Joshua Besneatte avatar
br flag
So I played with nut, and got it working but it did not show up in my settings dialog... it was a bit more than what I need, feature wise, but not what I wanted which was a configuration option in "settings:. I just want to set something like I do on my laptop to shutdown the computer. I can already see the battery percentage... I am just looking to add "shutdown computer when battery is critical" option.... I am thinking I might need "laptop mode utilities" installed... I am gong to try that.
Score:1
ng flag

I am not really a fan of the overly simplified update that was made to the power settings GUI, and the only way I could find to change these settings in Ubuntu 20.04 was with dconf-editor.

In dconf-editor, you can try going to:

/ org / gnome / settings-daemon / plugins / power

And change the critical-battery-action to 'shutdown'.

You can also change the percentage-critical from the default of 3% to something a little more conservative, like 10%. This will give your computer a little more time to power down.

Test it out and let me know how it goes. I recently made the same changes on my computer, so hopefully this does the trick. If you found this helpful, please consider an up-vote. If you find a better way to fix this, please let me know. Thanks!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.