GNOME Bugzilla – Bug 533553
g-p-m should respect battery charge thresholds
Last modified: 2009-03-18 10:21:14 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.
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.
It would HAL (or rather DeviceKit-power) to export those properties. http://lists.freedesktop.org/archives/hal/2006-October/006331.html
g-p-m shouldn't do this sorry. I've got no way of testing this, and it's not particularly useful.
(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.
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").
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!