4

Back in Unity, there were options in the settings program to manage power settings important to laptops, such as:

  1. Specify different behaviors for things like dimming the screen or suspending the system if the computer was plugged in or on battery
  2. Define what happens when the lid is closed (suspend, nothing, etc.)

In the new gnome shell under Power Settings, all configurations besides automatic suspend apply regardless of the charger's status, and there is no option for what to do when the lid is closed.

Are those settings hidden somewhere in the GUI, or can be accessed via command line? If they are not available in the GUI or at all, what would be the appropriate channel to suggest their addition to the development community?

1
  • 2
    "In GNOME 3.0, we’re defaulting to suspending the computer when the user shuts the lid, and not providing any preferences combobox to change this. This is what the UI designers for GNOME 3.0 want, and is probably a step in the right direction. We really can’t keep working around bugs in the kernel with extra UI controls." blogs.gnome.org/hughsie/2011/02/02/… --- The ONLY method of informing you don't like this is by ignoring gnome 3 and install another Ubuntu version
    – Rinzwind
    Apr 26, 2018 at 20:47

1 Answer 1

1

If you have package gnome-settings-daemon installed, you can change behavior of lid, buttons and low-battery actions in dconf within location: [org.gnome.settings-daemon.plugins.power]

Example config:

[org/gnome/settings-daemon/plugins/power]
lid-close-ac-action='nothing'
lid-close-battery-action='nothing'
power-button-action='nothing'
sleep-inactive-ac-timeout=3600
sleep-inactive-ac-type='nothing'
sleep-inactive-battery-timeout=900
sleep-inactive-battery-type='suspend'

critical-battery-action='suspend'
percentage-action=2
percentage-critical=3
percentage-low=10

On low and critical percentage there will be notification. On percentage-action there will be an action defined in critical-battery-action.

Method #2 (Upower settings)

There is also second option to change battery level triggers. All values are stored in /etc/Upower/Upower.conf

Selected values has to be replaced:

PercentageLow=10
PercentageCritical=3
PercentageAction=2
CriticalPowerAction=HybridSleep
5
  • Is the "low-battery actions" defined somewhere? Google is not helping with this. Could it be pointed at a simple bash script to alert the user that his world is coming to an end soon? Maybe two scripts, one for 10% and one for 5%?
    – alabamatoy
    Jan 12, 2020 at 17:24
  • @alabamatoy There are critical battery options in dconf. I've updated my original answer ;) Jan 13, 2020 at 20:56
  • Thanks for the lead. upower appears to have lots of cApaibility, but I cannot seem to find any doucmentation...for example, "upower -d" shows a "warning-level" which by default is set to "none" but I cannot seem to find where/how to set the warning level, or how to specify a warning action. So documentation would be nice....
    – alabamatoy
    Jan 15, 2020 at 16:07
  • warning-level could not be set, it's computed: gitlab.freedesktop.org/upower/upower/blob/master/src/… There is also function to "set" it, but it checks only special cases (AC, UPS and no-battery states) and if one of this states is true it's set to none otherwise it's computed in function which I've linked. Jan 16, 2020 at 17:33
  • I infer from your post that if I am on a notebook running on battery and "upower -d" produces a "warning-level" value of "none" then something is either wrong in the code, or else it thinks that the special case is true, which is incorrect. Any suggestions on how to fix?
    – alabamatoy
    Jan 17, 2020 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .