Bug 142382

Summary: Battery Notice displays -1 minute remaining
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Jared Ottley <jottley>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dkukawka
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Integration Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: adds test for negative time remaing to correct -1 minutes remaing in low battery warning

Description Jared Ottley 2006-01-10 18:13:08 UTC
SUSE Linux 10.0 installed on a Compaq Presario R3000.

When the Gnome "Battery Notice" window comes up it says that there is -1 minutes of battery remaing (15%).
Comment 1 JP Rosevear 2006-01-11 04:15:27 UTC
Rodrigo, we didn't use g-p-m in 10.0 right?

In which case I think it was pulling the values from the /proc/acpi.
Comment 2 Rodrigo Moya 2006-01-11 10:44:15 UTC
AFAIR, yes, we had gnome-power-manager in 10.0. Jared, is gnome-power-manager process running on your machine? Also, what versions of hal and g-p-m do you have?
Comment 3 Jared Ottley 2006-01-11 16:25:27 UTC
hal-0.5.4-6.4

I don't think that g-p-m shipped with 10.0....I can't find it on the install media, or in autobuild. (So it is not running).  powersaved is running.  I know where I can g-p-m-0.2.8.1-0.  Do you want me to try that or should I hold off
Comment 4 Jared Ottley 2006-01-27 20:05:33 UTC
Created attachment 65509 [details]
adds test for negative time remaing to correct -1 minutes remaing  in low battery warning

After some more looking, it looks like the problem is two fold.  One, ACPI is not getting the right information from the battery.  ACPI/the battery is saying that the present rate at which the battery is being discharged is 0 mA.  Which, of course, is bogus.

Two, the battery low warning is coming from the gnome applet "Battery Charge Monitor".  When it does the calculation for time remaining, it ends up with a -1.  In most places, the applet reports that this as unknown, except for in the battery low notification.

Submiting patch.
Comment 5 Rodrigo Moya 2006-02-13 22:59:58 UTC
Jared, did you submit the patch to autobuild? If so, please close the bug
Comment 6 Jared Ottley 2006-02-14 04:36:07 UTC
I haven't.  I will do it now.
Comment 7 JP Rosevear 2006-02-15 14:31:56 UTC
Its not good to add another translation string like this.  Is it too far off the mark if we just set a floor of 0 for the number of minutes?  If if minutes < 0, just say 0 in the string.
Comment 8 Stanislav Brabec 2006-02-15 14:49:54 UTC
Note that the string has missing _(" and was untranslatable.

On the other hand gnome-patch-translation was not yet sent to translators, so it's easy to add it just now.

For more see bug 144946.
Comment 9 Stanislav Brabec 2006-02-15 15:51:40 UTC
Patch submitted to Autobuild with translatable string added. It is not the only string missing in gnome-patch-translation.