Lenovo IdeaPad laptop models offer a battery conservation mode

Laurento Frittella requested to merge laurento/upower:master into master

to limit battery charging to 55-60% of its capacity to improve battery life. It is particularly useful when the laptop runs on external power most of the time.

The Linux kernel module ideapad_laptop exposes this specific functionality over sysfs.

This commit alters uPower by making it consider the battery conservation mode status (when available) improving the correctness of the result in the following case:

/* the battery isn't charging or discharging, it's just sitting there half full doing nothing: try to guess a state */

Based on my direct experience, the current algorithm does not properly guess the "not charging" state causing bizarre battery estimations on GNOME shell desktops.

Merge request reports