i386/72179: Inconsistent apm(8) output regarding the remaining
battery time, when running acpi enabled laptop on AC power
Niki Denev
nike_d at cytexbg.com
Wed Sep 29 11:40:15 PDT 2004
>Number: 72179
>Category: i386
>Synopsis: Inconsistent apm(8) output regarding the remaining battery time, when running acpi enabled laptop on AC power
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-i386
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 29 18:40:14 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Niki Denev
>Release: 6.0-CURRENT
>Organization:
>Environment:
FreeBSD phobos.totalterror.net 6.0-CURRENT FreeBSD 6.0-CURRENT #5: Sun Sep 26 12:25:15 EEST 2004 root at phobos.totalterror.net:/usr/src/sys/i386/compile/PHOBOS-X31 i386
>Description:
the apm(8) utility will display the total remainig life and time for the batteries, and then will display the remaining time and life for each individual battery on a laptop.
When the laptop is connected to AC adaptor,
running apm will show the total remaining time as 'unknown', but for the batteries it will print '0:00:00'.
>How-To-Repeat:
Laptop running on batteries:
[root at phobos ]# apm
APM version: 1.2
APM Management: Disabled
AC Line status: off-line
Battery Status: low
Remaining battery life: 27%
Remaining battery time: 1:16:00
Number of batteries: 1
Battery 0:
Battery Status: low
Remaining battery life: 27%
Remaining battery time: 1:16:00
Resume timer: unknown
Resume on ring indicator: disabled
Laptop running on AC:
[root at phobos ]# apm
APM version: 1.2
APM Management: Disabled
AC Line status: on-line
Battery Status: charging
Remaining battery life: 27%
Remaining battery time: unknown
^^^^^^^
Number of batteries: 1
Battery 0:
Battery Status: charging
Remaining battery life: 27%
Remaining battery time: 0:00:00
^^^^^^^
Resume timer: unknown
Resume on ring indicator: disabled
>Fix:
The following patch fixes the problem :
----------------------------------------------------------------------
--- sys/dev/acpica/acpi_cmbat.c.orig Mon Jul 5 15:15:28 2004
+++ sys/dev/acpica/acpi_cmbat.c Mon Jul 5 16:37:02 2004
@@ -655,7 +655,7 @@
battinfo->state = ACPI_BATT_STAT_NOT_PRESENT;
} else {
battinfo->cap = sc->cap;
- battinfo->min = sc->min;
+ battinfo->min = sc->min ? sc->min : -1;
battinfo->state = sc->bst.state;
}
----------------------------------------------------------------------
Patch can be found at: http://www.totalterror.net/src/acpi_cmbat.c.patch
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-i386
mailing list