Robbi Nespu: Fedora – Setting power management when low battery

Peace be upon you, I have issue with Fedora power management when my DELL Inspiron 14R 7420 SE battery are low, my laptop just shutdown and I lose what I currently working on. It bad when there is no autosave while editting some document or waiting f***ing Android Studio doing indexing or compiling.

Some how our spining disk also can get corrupt if it often happen like this. To be honest, I normally sleep at late night and mostly with my lappy on my desk (bad habit pun intended huh >_<)

We actually can control what action to take when you battery / ups are reach certain percentage or time left. There is three option :

  • PowerOff
  • Hibernate
  • HybridSleep

I prefer to use hibernate so if you like please read and follow my note how to hibernate Fedora but it recommended always do hybrid-sleep instead of suspend or hibernation.

You need to open and edit /etc/UPower/UPower.conf file. Here example of mine:
<script src=”https://gist.github.com/RobbiNespu/ee3033954fc15653a800a4a5823c84ee.js”></script>

The file comes with comment, so just read and you should understand what to modified. Have a look on UsePercentageForPolicy=true, you can set it as false if you prefer to depend on battery time remaining before deplete istead of battery percentage.

Then take look on Percentage (if you use UsePercentageForPolicy=true) or Time (if you use UsePercentageForPolicy=false) set the value according you need.

Lastly check CriticalPowerAction, here you should choose PowerOff, Hibernate or HybridSleep.

After you done with configuration, save the file (as root) and restart and check status of upower service

$ sudo systemctl restart upower.service
$ sudo systemctl status upower.service

Now you power management should work as you want.
Gnome power management
You also should actived the automatic suspend to save you battery if you left the computer too long.

That all, thanks!


Source From: fedoraplanet.org.
Original article title: Robbi Nespu: Fedora – Setting power management when low battery.
This full article can be read at: Robbi Nespu: Fedora – Setting power management when low battery.

Advertisement


Random Article You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*