Subject: kern/28785: ACPI kernel does not support /dev/apm interface.
To: None <,,>
From: None <>
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
SIGUSR1 Research and Development
NetBSD 2.99.11 NetBSD 2.99.11 (MAAT) #22: Sun Dec 26 13:58:56 UTC 2004 i386

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.


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.