.\" $NetBSD: acpibat.4,v 1.9 2010/03/25 15:34:30 jruoho Exp $ .\" .\" Copyright (c) 2002, 2004, 2010 The NetBSD Foundation, Inc. .\" 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. .\" .Dd March 17, 2010 .Dt ACPIBAT 4 .Os .Sh NAME .Nm acpibat .Nd ACPI Battery .Sh SYNOPSIS .Cd "acpibat* at acpi?" .Sh DESCRIPTION The .Nm driver supports .Tn ACPI batteries. .Pp The battery status is made available through the .Xr envsys 4 .Tn API . The battery information can be displayed also with the .Xr envstat 8 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 or ampere-hour .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. The ratio between the design capacity and the last full capacity on the other hand reveals the overall .Dq health of deteriorating lithium-ion batteries. .Sh EVENTS The .Nm driver is able to send events to .Xr powerd 8 daemon when a capacity state has been changed. The new state will be reported as the .Em fourth argument to the .Pa /etc/powerd/scripts/sensor_battery script. If a custom capacity limit was set via .Xr envstat 8 , the .Nm driver will report a .Em user-capacity event to the same script when current capacity limit has been reached. .Sh SEE ALSO .Xr acpi 4 , .Xr envsys 4 , .Xr envstat 8 , .Xr powerd 8 .Sh HISTORY The .Nm driver appeared in .Nx 1.6 . .Sh BUGS 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.