Skip to content

power: Add support for battery charge limiting

UPower supports setting the charge limit of a battery to reduce the battery wear by constantly trickle charging. The charge start/end thresholds are configured by hwdb, a user can only enable / disable the configured limits per available battery via a DBus method. As UPower applies the thresholds for us on startup this does not enable the charge limit setting via gnome-settings-daemon.

When multiple batteries are provided the charge limit is set on all battery's. Laptops with multiple batteries are these days not a common occurrence to justify presenting them separate in the UI.

Closes #2553

The new switch when a battery supports charge thresholds:


This requires an unmerged UPower merge request

This MR only introduces the switch, there has been discussion about changing the battery icon when battery charge limiting is enabled. But I believe that is a GNOME shell change.

Edited by Jelle van der Waa

Merge request reports