Short answer: In gconf-editor, set apps->gnome-power-manager->use_profile_time to FALSE (unchecked).
Longer answer: In poking around inside gnome-power-manager I could see that it *does* get the correct discharge time, sometimes (the Device Info page, for instance), but when running it through the debugger I found it zeros out that number. Inside gnome-power-manager, gpm-cell-array.c there is the following bit of code:
/* We may want to use the old time remaining code.
* Hopefully we can remove this in 2.19.x sometime. */
if (cell_array->priv->use_profile_calc == TRUE && unit->kind == GPM_CELL_UNIT_KIND_PRIMARY) { gpm_debug ("unit->percentage = %i", unit->percentage); unit->time_discharge = gpm_profile_get_time (cell_array->priv->profile, unit->percentage, TRUE); unit->time_charge = gpm_profile_get_time (cell_array->priv->profile, unit->percentage, FALSE);
} else {
This appears to be what causes this to get zero'd out. By setting 'use_profile_time' in gconf off, it causes the use_profile_calc parameter in the above code to be FALSE, which turns off that bit of code. The comment there before the code makes it sound like the authors are iffy on this code to begin with, so presumably this bug is a sign that having this code go away would be a good thing. :-)
Aha!! I think I figured this one out.
Short answer: In gconf-editor, set apps->gnome- power-manager- >use_profile_ time to FALSE (unchecked).
Longer answer: In poking around inside gnome-power-manager I could see that it *does* get the correct discharge time, sometimes (the Device Info page, for instance), but when running it through the debugger I found it zeros out that number. Inside gnome-power- manager, gpm-cell-array.c there is the following bit of code:
/* We may want to use the old time remaining code. >priv-> use_profile_ calc == TRUE &&
unit- >kind == GPM_CELL_ UNIT_KIND_ PRIMARY) {
gpm_debug ("unit->percentage = %i", unit->percentage);
unit- >time_discharge = gpm_profile_ get_time (cell_array- >priv-> profile, unit->percentage, TRUE);
unit- >time_charge = gpm_profile_ get_time (cell_array- >priv-> profile, unit->percentage, FALSE);
* Hopefully we can remove this in 2.19.x sometime. */
if (cell_array-
} else {
This appears to be what causes this to get zero'd out. By setting 'use_profile_time' in gconf off, it causes the use_profile_calc parameter in the above code to be FALSE, which turns off that bit of code. The comment there before the code makes it sound like the authors are iffy on this code to begin with, so presumably this bug is a sign that having this code go away would be a good thing. :-)