xref: /netbsd-src/share/man/man4/acpibat.4 (revision 69b3087bc03fd0334ca177f4835addf3fa3a8225)
1.\" $NetBSD: acpibat.4,v 1.9 2010/03/25 15:34:30 jruoho Exp $
2.\"
3.\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd March 17, 2010
28.Dt ACPIBAT 4
29.Os
30.Sh NAME
31.Nm acpibat
32.Nd ACPI Battery
33.Sh SYNOPSIS
34.Cd "acpibat* at acpi?"
35.Sh DESCRIPTION
36The
37.Nm
38driver supports
39.Tn ACPI
40batteries.
41.Pp
42The battery status is made available through the
43.Xr envsys 4
44.Tn API .
45The battery information can be displayed also with the
46.Xr envstat 8
47command:
48.Bd -literal -offset 2n
49$ envstat -d acpibat0
50                Current  CritMax  WarnMax  WarnMin  CritMin Unit
51       present:      ON
52design voltage:  14.400                                        V
53       voltage:  16.267                                        V
54    design cap:  74.880                                       Wh
55 last full cap:  48.260                                       Wh
56        charge:  47.910                      5.000%   0.414%  Wh (99.27%)
57   charge rate:     N/A
58discharge rate:  16.641                                        W
59      charging:     OFF
60  charge state:  NORMAL
61.Ed
62.Pp
63Depending on the battery, the unit of measurement is either watt-hour
64.Tn Pq Wh
65or ampere-hour
66.Tn Pq Ah
67for the capacity related information.
68From these the
69.Dq charge
70is usually the most interesting value,
71but it is possible to derive useful information also from the other values.
72For example, when
73.Xr acpiacad 4
74is disconnected, the
75.Dq discharge rate
76gives a coarse approximation of the current power consumption.
77The ratio between the design capacity and the last full capacity
78on the other hand reveals the overall
79.Dq health
80of deteriorating lithium-ion batteries.
81.Sh EVENTS
82The
83.Nm
84driver is able to send events to
85.Xr powerd 8
86daemon when a capacity state has been changed.
87The new state will be reported as the
88.Em fourth
89argument to the
90.Pa /etc/powerd/scripts/sensor_battery
91script.
92If a custom capacity limit was set via
93.Xr envstat 8 ,
94the
95.Nm
96driver will report a
97.Em user-capacity
98event to the same script when current capacity limit has been reached.
99.Sh SEE ALSO
100.Xr acpi 4 ,
101.Xr envsys 4 ,
102.Xr envstat 8 ,
103.Xr powerd 8
104.Sh HISTORY
105The
106.Nm
107driver appeared in
108.Nx 1.6 .
109.Sh BUGS
110The
111.Tn ACPI
112specifications make a distinction between
113.Dq control method batteries
114and
115.Dq smart batteries .
116The
117.Nm
118driver only supports control method batteries.
119Furthermore,
120.Nm
121does not yet support some additional battery information introduced in the
122.Tn ACPI 4.0
123standard.
124