* Compaq Evo N160: Fixed DSDT - battstat_applet works now
@ 2002-12-14 17:36 Heiko Ettelbrueck
[not found] ` <3DFB6C25.4030805-hi6Y0CQ0nG0@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Heiko Ettelbrueck @ 2002-12-14 17:36 UTC (permalink / raw
To: acpi-devel-pyega4qmqnRoyOMFzWx49A
Hi all,
in short terms:
---------------
Today I fixed the DSDT of my Compaq Evo N160 so that it knows the design
capacity of its battery and allows tools like battstat_applet to
calculate the percentage of remaining capacity.
The fixed DSDT can be retrieved as
- ASL from
http://www.ettelbrueck.de/linux-acpi/compaq-evo-n160/acpi_dsdt.asl
- AML in a C sourcecode, ready to be compiled into your kernel, from
http://www.ettelbrueck.de/linux-acpi/compaq-evo-n160/acpi_dsdt.c
In more detail:
---------------
I realized why battstat_applet could not display the remaining capacity
of my Compaq Evo N160 notebook: The DSDT provided by Compaq does not
contain any information about the design capacity of the notebook, so
battstat_applet could not calculate the remaining capacity percentage.
I had a look in the ACPI specification (2.0a) and found, in chapter
11.2.2.1 on page 289, the following information about the battery
properties which should be provided by the manufacturer in his DSDT:
BIF --> Battery Information
Power Unit --> DWORD
Design Capacity --> DWORD
Last Full Charge Capacity --> DWORD
Battery Technology --> DWORD
Design Voltage --> DWORD
Design Capacity of Warning --> DWORD
Design Capacity of Low --> DWORD
Battery Capacity Granularity 1 --> DWORD
+-- between "low" and "warning"
Battery Capacity Granularity 2 --> DWORD
+-- between "warning" and "full"
Model Number --> ASCIIZ
Serial Number --> ASCIIZ
Battery Type --> ASCIIZ
OEM Information --> ASCIIZ
DWORD --> double word = four bytes (in hex: 0x00000000)
ASCIIZ --> ASCII string with null-byte (0x00) at the end
Here we have the original values of the Compaq DSDT together with some
comments from my side to show what was wrong and how it should be right
- or let's say: how it should be better ;-
0x0, --> interpret values as mW or mWh
--> WRONG! values are mA or mAh
--> CORRECT: 0x00000001
0xffffffff, --> design capacity unknown
--> WRONG! design capacity is 4000 mAh
according to value printed on battery
--> CORRECT: 0x00000fa0
0xffffffff, --> last full charge capacity unknown
--> WRONG! my own reaches 3357 mAh at the moment
--> CORRECT: 0x00000d1d
0x1, --> battery technology is rechargeable
--> CORRECT
0xffffffff, --> design voltage unknown
--> WRONG! design voltage is 14.4V = 14400mV
--> CORRECT: 0x00003840
0x0320, --> design capacity of warning is 800 mAh
--> CORRECT (?)
0x0320, --> design capacity of warning is 800 mAh
--> CORRECT (?)
--> Why does /proc/acpi/battery/*/info
show only _16_ mAh here???
0x64, --> battery capacity granularity 1 is 100 mAh
0x64, --> battery capacity granularity 2 is 100 mAh
"BAT1",
"123",
"LION",
"COMPAQ",
Feedback about my conclusions and corrections is welcome :-)
Regards,
Heiko
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compaq Evo N160: Fixed DSDT - battstat_applet works now
[not found] ` <3DFB6C25.4030805-hi6Y0CQ0nG0@public.gmane.org>
@ 2002-12-15 13:46 ` Andrew Kohlsmith
2002-12-21 0:58 ` Andrew Kohlsmith
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Kohlsmith @ 2002-12-15 13:46 UTC (permalink / raw
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Heiko Ettelbrueck
> Today I fixed the DSDT of my Compaq Evo N160 so that it knows the design
> capacity of its battery and allows tools like battstat_applet to
> calculate the percentage of remaining capacity.
Thank you so much. I am currently using it. I wonder if anything you changed
also fixes the "polling battery state causes hard lockup" bug that myself and
another N160 user are experiencing.
I take it you have also not had any trouble with LNKG having an incorrect
initialization -- I have to boot with pci=noacpi or the system hangs after
initializing the LNKF device. I will see what I can do on this one, it was
suggested that the ACPI entry for the LNKG device was not correct with regard
to interrupts.
At any rate, thank you for your efforts on this.
Regards,
Andrew
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compaq Evo N160: Fixed DSDT - battstat_applet works now
[not found] ` <3DFB6C25.4030805-hi6Y0CQ0nG0@public.gmane.org>
2002-12-15 13:46 ` Andrew Kohlsmith
@ 2002-12-21 0:58 ` Andrew Kohlsmith
[not found] ` <200212201958.53205-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Kohlsmith @ 2002-12-21 0:58 UTC (permalink / raw
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> Today I fixed the DSDT of my Compaq Evo N160 so that it knows the design
> capacity of its battery and allows tools like battstat_applet to
> calculate the percentage of remaining capacity.
I just wanted to drop a note and say that I've been running this for just
about a week now on and off AC and have not had a hang from klaptopdaemon
polling the battery status yet.
Thank you once again for your work on this. I really do appreciate it!
Regards,
Andrew
-------------------------------------------------------
This SF.NET email is sponsored by: The Best Geek Holiday Gifts!
Time is running out! Thinkgeek.com has the coolest gifts for
your favorite geek. Let your fingers do the typing. Visit Now.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compaq Evo N160: Fixed DSDT - battstat_applet works now
[not found] ` <200212201958.53205-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
@ 2002-12-21 16:25 ` Heiko Ettelbrueck
[not found] ` <3E049608.8030807-hi6Y0CQ0nG0@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Heiko Ettelbrueck @ 2002-12-21 16:25 UTC (permalink / raw
To: Andrew Kohlsmith; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Andrew Kohlsmith wrote:
> I just wanted to drop a note and say that I've been running this for just
> about a week now on and off AC and have not had a hang from klaptopdaemon
> polling the battery status yet.
Thank you for your note - i'm happy to read that it works as I hoped it
should ;-)
One question arose during the last days: What is the "last full
capacity" of your battery? Is it near 4000 mAh as specified by Compaq?
As mine only "stores" (what is the right word for this?) 3357 mAh, I
wasn't satisfied with battstat_applet showing a fill state of only 84%
when the battery does not charge any more. That's why I patched
battstat_applet to work with the "last full capacity" instead of
"maximum capacity": Now it shows 100% when charging has finished. But
I'm not really satisfied with this "solution" either, as "my" value of
3357 mAh probably is only correct for my special Evo n160 (or to be more
precise: my one's battery) at a special time.
So a question to the people who (hopefully) know: Is some piece of ACPI
code supposed to change the "last full capacity" in the DSDT, as the
name of the value suggests? Or what else should one understand by this?
Regards,
Heiko
-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compaq Evo N160: Fixed DSDT - battstat_applet works now
[not found] ` <3E049608.8030807-hi6Y0CQ0nG0@public.gmane.org>
@ 2002-12-21 18:52 ` Andrew Kohlsmith
[not found] ` <200212211352.42773-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Kohlsmith @ 2002-12-21 18:52 UTC (permalink / raw
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
> One question arose during the last days: What is the "last full
> capacity" of your battery? Is it near 4000 mAh as specified by Compaq?
I've currently see 3357mAh in the "last full capacity" -- I too patched
klaptopdaemon to use this value instead of the design capacity since I'd only
ever get as high as 98%, which suggests 3920mAh was seen at some point. :-)
> I'm not really satisfied with this "solution" either, as "my" value of
> 3357 mAh probably is only correct for my special Evo n160 (or to be more
> precise: my one's battery) at a special time.
Exactly -- I just patched klaptopdaemon to keep the highest "last full
capacity" as a high-water mark (but it isn't persistent).
Regards,
Andrew
-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compaq Evo N160: Fixed DSDT - battstat_applet works now
[not found] ` <200212211352.42773-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
@ 2002-12-24 11:36 ` Alexander Hoogerhuis
0 siblings, 0 replies; 6+ messages in thread
From: Alexander Hoogerhuis @ 2002-12-24 11:36 UTC (permalink / raw
To: Andrew Kohlsmith; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Andrew Kohlsmith <akohlsmith-acpi-uiYP0llB1AZBDgjK7y7TUQ@public.gmane.org> writes:
> > One question arose during the last days: What is the "last full
> > capacity" of your battery? Is it near 4000 mAh as specified by Compaq?
>
> I've currently see 3357mAh in the "last full capacity" -- I too patched
> klaptopdaemon to use this value instead of the design capacity since I'd only
> ever get as high as 98%, which suggests 3920mAh was seen at some point. :-)
>
> > I'm not really satisfied with this "solution" either, as "my" value of
> > 3357 mAh probably is only correct for my special Evo n160 (or to be more
> > precise: my one's battery) at a special time.
>
> Exactly -- I just patched klaptopdaemon to keep the highest "last full
> capacity" as a high-water mark (but it isn't persistent).
>
While on Compaq Evo's and batteries... I've got a n800c, and when it
was new (this summer) it would run a normal length of work on
batteries under XP (more than 2 hours), these days it will charge the
battery and claim it to be full and the windows batt-stat-applet will
say I've got an hour left. In real the machine will not survive 20
minutes on battery.
Having a think back, this all started to go down the drain at the same
time I started experimenting with Linux and ACPI. Is there any way
that the ACPI bits in the linux-kernels could have messed with the
battery in such a way?
I've ran mostly 2.4.x with acpi patches applied; although
/proc/acpi/battery always remians emtpy.
mvh,
A
--
Alexander Hoogerhuis | alexh-rpjHciJLgqZBDgjK7y7TUQ@public.gmane.org
CCNP - CCDP - MCNE - CCSE | +47 908 21 485
"You have zero privacy anyway. Get over it." --Scott McNealy
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-12-24 11:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-14 17:36 Compaq Evo N160: Fixed DSDT - battstat_applet works now Heiko Ettelbrueck
[not found] ` <3DFB6C25.4030805-hi6Y0CQ0nG0@public.gmane.org>
2002-12-15 13:46 ` Andrew Kohlsmith
2002-12-21 0:58 ` Andrew Kohlsmith
[not found] ` <200212201958.53205-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
2002-12-21 16:25 ` Heiko Ettelbrueck
[not found] ` <3E049608.8030807-hi6Y0CQ0nG0@public.gmane.org>
2002-12-21 18:52 ` Andrew Kohlsmith
[not found] ` <200212211352.42773-T9p8nP5vHr8sA/PxXw9srA@public.gmane.org>
2002-12-24 11:36 ` Alexander Hoogerhuis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.