! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add option for maximum battery charge
Status:
RESOLVED: INVALID
Severity:
enhancement
Product:
Xfce4-power-manager
Component:
General

Comments

Description cmertes 2012-03-11 19:32:12 CET
My BIOS has the greatest of options: it allows the battery to be charged to only 80% of its full capacity. This greatly enhances the battery life. OTOH it means that the battery status icon never gets that the battery is actually charged. It would be great if I could tell the power manager that my battery is actually full when it has reached 80% of its capacity.
Comment 1 Woi 2015-04-29 23:13:56 CEST
Most Thinkpads support charging thresholds as well if tp_smapi kernel module is loaded.
Examples:

$ cat /sys/devices/platform/smapi/BAT0/start_charge_thresh 
40
$ cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh 
90
$ cat /sys/devices/platform/smapi/BAT0/remaining_percent
82
$ cat /sys/devices/platform/smapi/BAT0/remaining_charging_time 
not_charging

Some documentation:
http://www.thinkwiki.org/wiki/Tp_smapi#Battery_charge_control_features
Comment 2 Simon Steinbeiss editbugs 2015-05-07 09:37:21 CEST
I'm not sure this is really terribly important, seems more like a cosmetic issue that'll introduce needless code complexity.

Either way, with the power manager from git you'll likely get the desired behavior for free, because with switching to UPower's icons there are no more 20% steps, but instead 33% steps for the charge-icons. So consequently 80% will still seem full.
Comment 3 Woi 2015-05-09 12:44:38 CEST
I agree that this is not "terrible important", but mouse-over shows "Charging" while it's not, so it's seems to be more than just cosmetic.
In addition I don't think Cmertens is suggesting "show full battery icon when battery is not charged (due to threshold)" but make power-manger handle situations correctly where AC is plugged, battery is not charged but not full either. This would cover showing the correct icon as well as showing the correct information on mouse-over.
Comment 4 b3nmore 2015-06-14 19:16:10 CEST
AFAIK xfpm uses upower to get the battery status (can someone confirm this?). Upower reports thinkpad  batteries with thresholds set as 'charging', while the kernel reports the status as 'unknown' (cat /sys/class/power_supply/BAT0/status).

So I guess upower needs to change this behavior, before xfpm can react to it in some way. I filed a bug for upower at https://bugs.freedesktop.org/show_bug.cgi?id=90975.
Comment 5 Simon Steinbeiss editbugs 2015-06-14 20:15:22 CEST
Indeed, xfce4-power-manager gets the battery status from UPower.
Comment 6 Ali Abdallah editbugs 2017-11-15 17:52:13 CET
This should be implemented on the upower backend side.

Bug #8561

Reported by:
cmertes
Reported on: 2012-03-11
Last modified on: 2017-11-15

People

Assignee:
Ali Abdallah
CC List:
6 users

Version

Version:
Unspecified

Attachments

Additional information