Bug 7263 - Lenovo 3000 N100 always has present rate: 0 mA in /proc/acpi/battery/BAT1/state
Summary: Lenovo 3000 N100 always has present rate: 0 mA in /proc/acpi/battery/BAT1/state
Status: CLOSED INVALID
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: acpi_power-battery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-04 14:02 UTC by Richard Hughes
Modified: 2006-10-06 22:52 UTC (History)
0 users

See Also:
Kernel Version: 2.6.18
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
the output of acpidump (99.86 KB, text/plain)
2006-10-04 14:04 UTC, Richard Hughes
Details

Description Richard Hughes 2006-10-04 14:02:39 UTC
Most recent kernel where this bug did not occur:

Not known, this is a new laptop

Distribution:

Fedora Core Rawhide

Hardware Environment:

Lenovo 3000 N100
Dual Core 1.66GHz
Motherboard Chipset Intel 945PM

Software Environment:

Fedora core rawhide with custom kernel.

Problem Description:

ACPI does not appear to present the discharge rate value of the laptop.
iasl checked the dsdt and found there to be no problems.

Steps to reproduce:

Install linux on a Lenovo 3000 N100, and cat /proc/acpi/battery/BAT1/state :
observe there is never any rate value when charging or discharging.

Thanks guys.
Comment 1 Richard Hughes 2006-10-04 14:04:06 UTC
Created attachment 9154 [details]
the output of acpidump

This is the output from acpidump. If you need anything else, please let me
know. Thanks.
Comment 2 Alexey Starikovskiy 2006-10-04 15:28:31 UTC
Please look for _BST (battery status) method in your DSDT.
It fills PBST package (4 numbers) with values. 2nd is your rate.
As you can see there is Store(Zero, Index(PBST, One)) near the end of the 
method, it means that your laptop will _never_ return rate other than 0.
 
Comment 3 Richard Hughes 2006-10-04 16:23:06 UTC
Thanks for the quick and detailed response.

I've been looking in the .dsl file, and I agree with your conclusion that the
rate will always be zero.

What now?
 * Do I complain to Lenovo directly (i.e. can they fix it with a bios upgrade?)
 * can I create my own custom dsdt with the functionality added (is that possible?)
 * or do I write better code in HAL to do a best effort rate-guess based on the
falling capacity?

Thanks for your help,

Richard.
Comment 4 Len Brown 2006-10-04 21:39:42 UTC
It occurs to me that if Windows runs on this laptop 
and and somehow figures out a battery rate, then 
Linux has a problem here...  Any chance you can check? 
 
Comment 5 Richard Hughes 2006-10-05 02:02:55 UTC
Len, this laptop gets the time remaining in windows correct, but I don't know if
it is interpolating the rate value itself (and working around a buggy bios) or
if it does it some other clever way. Is there some sort of windows program that
gives me low level access like /proc/acpi/battery/BAT1/state does?

Thanks again guys,

Richard.
Comment 6 Richard Hughes 2006-10-06 22:52:35 UTC
It's a long shot, but do any of you have the specification for ACPI: Embedded
Controller [EC0] (gpe 25)?

So far, I think I'm managed to work out (from the ACPI spec and lots of googling):

EC0.BMF0, 3  // always == 2
EC0.BTY0, 1  // always == 1
EC0.BST0, 8  // Battery State Bitfield
EC0.BRC0, 16 // Remaining Current (mAh)
EC0.BSN0, 16 // Serial Number ???
EC0.BPV0, 16 // Present Voltage 
EC0.BDV0, 16 // Design Voltage ??? 
EC0.BDC0, 16 // Design Capacity ???
EC0.BFC0, 16 // Last Full Capacity
EC0.GAU0, 8  // Battery Gauge = WTF?

But these may be wrong, and I don't know what Battery Gauge is.
Any helpful links, pointers or other help will be rewarded with a beer at
GUADEC2007. :-)

Note You need to log in before you can comment on or make changes to this bug.