[Debian-eeepc-devel] 701 battery capacity has wrong dimension?

Axel Beckert abe at deuxchevaux.org
Mon Nov 3 12:54:40 UTC 2008


Hi,

On Mon, Nov 03, 2008 at 11:21:03AM +0100, Patrick Strasser wrote:
> >> I'm running a EeePC 4G (=701?) with Bios 1101 and Debian stock
> >> kernel 2.6.26, and it's not working for me.
> > 
> > What exactly is "not working" for you? 
> 
> Yields values like in the first posting,

Ah, right, and that was in the proc fs, so it was the kernel
respective driver itself.

> still percentages instead of mAh. The values from the first are with
> BIOS v1101 and Linux 2.26.6-1

Here, too:

1/0/0 root at nemo:pts/0 12:10:41 [~] # cat /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         5200 mAh
last full capacity:      100 mAh
battery technology:      rechargeable
design voltage:          8400 mV
design capacity warning: 20 mAh
design capacity low:     10 mAh
capacity granularity 1:  52 mAh
capacity granularity 2:  52 mAh
model number:            701
serial number:            
battery type:            LION
OEM info:                ASUS
2/0/0 root at nemo:pts/0 12:10:48 [~] # 

So the question now is: Is it a bug in the driver (does not recognize
the percentage values) or does do the correct thing (rechargable
battery, so it must be mAh) although it's not the right thing, because
ASUS did not adhere to the ACPI standard.

I would say the last thing, but this could be fixed in the kernel
though. Wouldn't be a new thing to fix broken hardware in the driver.

> > 1/0/0 root at nemo:pts/0 13:00:42 [~] # acpi -V
> >      Battery 0: Full, 100%, rate information unavailable, design capacity 5200 mAh
> >   AC Adapter 0: on-line
> >      Thermal 0: ok, 30.0 degrees C
> >      Cooling 0: Processor 0 of 7
> 
> Seems like acpi uses the right algorithm. See ACPI specs 3.0b, chapter 
> 3.9.3:
> 
> At the most basic level, the OS calculates Remaining Battery Percentage 
> [%] using the following formula:
> Remaining Battery Percentage[%] = Battery Remaining Capacity [mAh/mWh] / 
> Last Full Charged Capacity [mAh/mWh] * 100
>
> If both Battery Remaining Capacity and Last Full Charged Capacity
> have the same dimension, Last Full Charged Capacity will have a sane
> value.
>
> With Last Full Charged Capacity equal 100%, this will alway yield the 
> value of Battery Remaining Capacity.

Ack. That's why it works here despite the ACPI standard violation by ASUS.
 
> > I know that there are others (at least one or two of the dozens gnome
> > panel apps) which don't display the battery state correctly.
> 
> I'll file a bug for those I use.

Yeah, since at least the "Remaining Battery Percentage" should not be
broken anywhere on the EeePC 701.

> > Just not all applications can cope with batteries reporting
> > in percentage although it is allowed and officially in the standard.
> 
> I have not found a passage allowing percentages for rechargable batteries.

What I meant is that since there is at least one case where
percentages are allowed (non-rechargable batteries), all applications
should be able to cope with batteries reporting in percentage in
general.

		Regards, Axel
-- 
Axel Beckert - abe at deuxchevaux.org, abe at noone.org - http://noone.org/abe/



More information about the Debian-eeepc-devel mailing list