Subject: kern/28785: ACPI kernel does not support /dev/apm interface.
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <kurahone@sigusr1.org>
List: netbsd-bugs
Date: 12/26/2004 14:42:01
>Number:         28785
>Category:       kern
>Synopsis:       ACPI kernel does not support /dev/apm interface.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 26 14:42:00 +0000 2004
>Originator:     Kentaro A. Kurahone
>Release:        2.99.11
>Organization:
SIGUSR1 Research and Development
>Environment:
NetBSD maat.sigusr1.org 2.99.11 NetBSD 2.99.11 (MAAT) #22: Sun Dec 26 13:58:56 UTC 2004  kurahone@maat.sigusr1.org:/usr/src/sys/arch/i386/compile/MAAT i386

>Description:
When running an acpi enabled kernel, applications that bank on /dev/apm fail to work (since the APM code is not being built/used).  This breaks quite a few of the nifty little apps that provide battery status info under X11.


>How-To-Repeat:

>Fix:
I took a stab at writing some glue code that reimplements this lost functionality.  It's a bit dirty at the moment, but I can't think of a better way to do this.  Also hysteresis management could be done better, the current implementation's estimate in mins jumps around more than I'd like.

http://www.sigusr1.org/~kurahone/acpi-apm-netbsd-2.99.11.diff.gz