From: Heiko Ettelbrueck <hbruckynews-hi6Y0CQ0nG0@public.gmane.org>
To: acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org
Subject: Compaq Evo N160: Fixed DSDT - battstat_applet works now
Date: Sat, 14 Dec 2002 18:36:37 +0100 [thread overview]
Message-ID: <3DFB6C25.4030805@gmx.net> (raw)
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/
next reply other threads:[~2002-12-14 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-14 17:36 Heiko Ettelbrueck [this message]
[not found] ` <3DFB6C25.4030805-hi6Y0CQ0nG0@public.gmane.org>
2002-12-15 13:46 ` Compaq Evo N160: Fixed DSDT - battstat_applet works now 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DFB6C25.4030805@gmx.net \
--to=hbruckynews-hi6y0cq0ng0@public.gmane.org \
--cc=acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox