After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533553 - g-p-m should respect battery charge thresholds
g-p-m should respect battery charge thresholds
Status: RESOLVED INVALID
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-05-17 12:35 UTC by Alexander Hunziker
Modified: 2009-03-18 10:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Alexander Hunziker 2008-05-17 12:35:39 UTC
I use a Thinkpad T60 with the tp_smapi driver that enables one to set thresholds under or above which charging should start or stop, respectively. They are:

/sys/devices/platform/smapi/BAT0/start_charge_thres
/sys/devices/platform/smapi/BAT0/stop_charge_thres

It would be nice if g-p-m:

* realised the presence of those files and showed those values graphically in the diagrams and also took the values into account when calculating remaining charge time.

* a bit more complicated: it would also be nice if the user could override those thresholds using g-p-m. For example, i usually keep my Li-ion battery charged at only 85%, in order not to wear it out too quickly. But sometimes, when I know I will use the full capacity of the battery soon, I want to override this threshold and have the battery charge fully. The above files cannot be written into by a non-root user, so this would probably require some intergration work with PolicyKit.
Comment 1 Maciej (Matthew) Piechotka 2009-01-13 22:51:31 UTC
Well possibly (more advance features):
* discharge to x % (good if I want to discharge battery and remove it)
* charge to x % (I need to use my laptop as portable device)

in addition to 'normal' manipulation of this values.
Comment 2 Tomasz Torcz 2009-01-14 08:20:27 UTC
It would HAL (or rather DeviceKit-power) to export those properties.
http://lists.freedesktop.org/archives/hal/2006-October/006331.html
Comment 3 Richard Hughes 2009-03-04 15:19:10 UTC
g-p-m shouldn't do this sorry. I've got no way of testing this, and it's not particularly useful.
Comment 4 Maciej (Matthew) Piechotka 2009-03-04 15:36:49 UTC
(In reply to comment #3)
> g-p-m shouldn't do this sorry.

Why? Especially that I'm nearly sure that other notebooks have it also. 

> I've got no way of testing this,

This is a problem but still someone might write a patch, test it and maintain. 

> and it's not
> particularly useful.
> 

Unless you consider long batter life useful. Usually I do not need battery. I travel from plug A to plug B - so keeping the charge low keep my battery in health (keeping it in notebook allows not to have it turn off when I unplug it acidentally). But sometimes I need it charged. Doing it in 6s in GUI is much more handful than doing it by hand in /sys.
Comment 5 Maciej (Matthew) Piechotka 2009-03-04 19:07:52 UTC
It is somehow related - but I may fill separate bug. If tp_smapi is set g-p-m 2.25.x behave strangly. Namely 2.25.91 states that "Device state could not be read at this time". In log it shows that:
TI:20:03:22	TH:0x97de878	FI:gpm-tray-icon.c	FN:gpm_tray_icon_set_icon,155
 - Setting icon to gpm-ac-adapter
TI:20:03:22	TH:0x97de878	FI:gpm-devicekit.c	FN:gpm_devicekit_get_object_summary,218
 - in an undefined state we are not charging or discharging and the batteries are also not charged
TI:20:03:22	TH:0x97de878	FI:gpm-engine.c	FN:gpm_engine_get_summary,234
 - tooltip: Device state could not be read at this time
TI:20:03:22	TH:0x97de878	FI:gpm-engine.c	FN:gpm_engine_recalculate_state_summary,407
 - ** EMIT: summary-changed(1): Device state could not be read at this time
TI:20:03:22	TH:0x97de878	FI:gpm-engine.c	FN:gpm_engine_get_warning_time,139
 - time zero, falling back to percentage for battery

Which I guess is partially the first part of the bug (until "it would be nice"). 
Comment 6 rbertran 2009-03-18 10:21:14 UTC
I find this bug/feature request very interesting and useful for current laptops. Even nowadays few laptop models have the ability for managing such features, I'm sure that these features will be common on every laptop quite soon. Also, extending laptops battery life is important, and I would say that g-p-m can do something on that. 

Salut!