2010-03-25 18:34:30 +03:00
|
|
|
.\" $NetBSD: acpibat.4,v 1.9 2010/03/25 15:34:30 jruoho Exp $
|
2002-04-23 16:01:16 +04:00
|
|
|
.\"
|
2010-03-17 20:16:43 +03:00
|
|
|
.\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
|
2002-04-23 16:01:16 +04:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2010-03-17 20:16:43 +03:00
|
|
|
.Dd March 17, 2010
|
2002-04-23 16:01:16 +04:00
|
|
|
.Dt ACPIBAT 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm acpibat
|
2010-03-17 20:16:43 +03:00
|
|
|
.Nd ACPI Battery
|
2002-04-23 16:01:16 +04:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "acpibat* at acpi?"
|
|
|
|
.Sh DESCRIPTION
|
2004-04-25 07:12:11 +04:00
|
|
|
The
|
|
|
|
.Nm
|
2010-03-17 20:16:43 +03:00
|
|
|
driver supports
|
|
|
|
.Tn ACPI
|
|
|
|
batteries.
|
2004-04-25 07:12:11 +04:00
|
|
|
.Pp
|
2010-03-17 20:16:43 +03:00
|
|
|
The battery status is made available through the
|
2004-04-25 07:12:11 +04:00
|
|
|
.Xr envsys 4
|
2010-03-17 20:16:43 +03:00
|
|
|
.Tn API .
|
|
|
|
The battery information can be displayed also with the
|
2004-04-25 07:12:11 +04:00
|
|
|
.Xr envstat 8
|
2010-03-17 20:16:43 +03:00
|
|
|
command:
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
$ envstat -d acpibat0
|
|
|
|
Current CritMax WarnMax WarnMin CritMin Unit
|
|
|
|
present: ON
|
|
|
|
design voltage: 14.400 V
|
|
|
|
voltage: 16.267 V
|
|
|
|
design cap: 74.880 Wh
|
|
|
|
last full cap: 48.260 Wh
|
|
|
|
charge: 47.910 5.000% 0.414% Wh (99.27%)
|
|
|
|
charge rate: N/A
|
|
|
|
discharge rate: 16.641 W
|
|
|
|
charging: OFF
|
|
|
|
charge state: NORMAL
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Depending on the battery, the unit of measurement is either watt-hour
|
|
|
|
.Tn Pq Wh
|
2010-03-25 18:34:30 +03:00
|
|
|
or ampere-hour
|
2010-03-17 20:16:43 +03:00
|
|
|
.Tn Pq Ah
|
|
|
|
for the capacity related information.
|
|
|
|
From these the
|
|
|
|
.Dq charge
|
|
|
|
is usually the most interesting value,
|
|
|
|
but it is possible to derive useful information also from the other values.
|
|
|
|
For example, when
|
|
|
|
.Xr acpiacad 4
|
|
|
|
is disconnected, the
|
|
|
|
.Dq discharge rate
|
|
|
|
gives a coarse approximation of the current power consumption.
|
2010-03-25 18:34:30 +03:00
|
|
|
The ratio between the design capacity and the last full capacity
|
|
|
|
on the other hand reveals the overall
|
2010-03-17 20:16:43 +03:00
|
|
|
.Dq health
|
|
|
|
of deteriorating lithium-ion batteries.
|
2007-07-02 19:59:32 +04:00
|
|
|
.Sh EVENTS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver is able to send events to
|
|
|
|
.Xr powerd 8
|
2010-03-17 20:16:43 +03:00
|
|
|
daemon when a capacity state has been changed.
|
2009-05-04 23:17:49 +04:00
|
|
|
The new state will be reported as the
|
2007-09-04 21:27:41 +04:00
|
|
|
.Em fourth
|
|
|
|
argument to the
|
2009-05-04 23:17:49 +04:00
|
|
|
.Pa /etc/powerd/scripts/sensor_battery
|
|
|
|
script.
|
|
|
|
If a custom capacity limit was set via
|
2007-09-04 21:27:41 +04:00
|
|
|
.Xr envstat 8 ,
|
|
|
|
the
|
|
|
|
.Nm
|
|
|
|
driver will report a
|
|
|
|
.Em user-capacity
|
|
|
|
event to the same script when current capacity limit has been reached.
|
2002-04-23 16:01:16 +04:00
|
|
|
.Sh SEE ALSO
|
2003-01-06 00:11:54 +03:00
|
|
|
.Xr acpi 4 ,
|
2004-04-25 07:12:11 +04:00
|
|
|
.Xr envsys 4 ,
|
2007-07-02 19:59:32 +04:00
|
|
|
.Xr envstat 8 ,
|
|
|
|
.Xr powerd 8
|
2002-04-23 16:01:16 +04:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2010-03-17 20:16:43 +03:00
|
|
|
driver appeared in
|
2002-04-23 16:01:16 +04:00
|
|
|
.Nx 1.6 .
|
|
|
|
.Sh BUGS
|
2010-03-17 20:16:43 +03:00
|
|
|
The
|
|
|
|
.Tn ACPI
|
|
|
|
specifications make a distinction between
|
|
|
|
.Dq control method batteries
|
|
|
|
and
|
|
|
|
.Dq smart batteries .
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver only supports control method batteries.
|
|
|
|
Furthermore,
|
|
|
|
.Nm
|
|
|
|
does not yet support some additional battery information introduced in the
|
|
|
|
.Tn ACPI 4.0
|
|
|
|
standard.
|