From owner-freebsd-mobile@FreeBSD.ORG Sun Aug 29 18:39:33 2004 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBCDA16A4CE for ; Sun, 29 Aug 2004 18:39:33 +0000 (GMT) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id F101243D41 for ; Sun, 29 Aug 2004 18:39:32 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from thought.org (tao [10.0.0.247]) by sage.thought.org (8.12.10/8.12.10) with ESMTP id i7TIdV98086951; Sun, 29 Aug 2004 11:39:32 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by thought.org (8.12.11/8.12.11) with ESMTP id i7TIdT70081619; Sun, 29 Aug 2004 11:39:30 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.12.11/8.12.11/Submit) id i7TIdSc2081618; Sun, 29 Aug 2004 11:39:28 -0700 (PDT) (envelope-from kline) Date: Sun, 29 Aug 2004 11:39:28 -0700 From: Gary Kline To: richard childers / kg6hac Message-ID: <20040829183928.GA81484@thought.org> References: <20040829003053.GA91309@thought.org> <4131FE5F.4030407@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4131FE5F.4030407@pacbell.net> X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 18 years of service to the Unix community User-Agent: Mutt/1.5.6i cc: Gary Kline cc: FreeBSD Mobile Mailing List Subject: Re: xbatt or other indicators for the Thinkpad 600E? X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2004 18:39:33 -0000 On Sun, Aug 29, 2004 at 09:03:43AM -0700, richard childers / kg6hac wrote: > >Gary Kline wrote: > > > > So far, it looks as tho my battery runs more than two hours on > > my old TP. But I'd like to have a gauge of some kind. When I > > try to install any of the battery apps I error out with > > "/dev/apm" notfound. Ihave "^device apm" compiled into the > > kernel. RH Linux finds the power-off device on one of the > > 1998 Kayaks. Didn't IBM have this on their hardware about the > > same time? > > > > > > > I see several questions here. > > [1] /dev/apm missing. I would grep for 'apm' in /dev/MAKEDEV and see > if it exists, if it does, use MAKEDEV to recreate it. > Sorry; I negected to mention that I'm running 5-CURRENT. No /dev/MAKEDEV. I get an ENOENT blurb when I boot regarding a missing /dev/apm. And trying something like % apm -b yields the same error. P > >www# grep apm /dev/MAKEDEV > ># apm Advanced Power Management BIOS > ># apmctl APM BIOS control device > > sh MAKEDEV apm apmctl card0 card1 card2 card3 # cdev, laptop > > sh MAKEDEV apm apmctl card0 # cdev, laptop > >apm) > > mknod apm c 39 0 root:operator > > chmod 664 apm > >apmctl) > > mknod apmctl c 39 8 root:operator > > chmod 660 apmctl > > > > [2] "^device apm" in kernel. Off the top of my head I don't have this > memorized, but note that GENERIC and LINT kernels should be rich with > examples. > > >www# grep apm /usr/src/sys/i386/conf/[GL]* > >/usr/src/sys/i386/conf/GENERIC:device apm0 at nexus? > >disable flags 0x20 # Advanced Power Management > >/usr/src/sys/i386/conf/LINT:# apm: Laptop Advanced Power Management > >(experimental) > >/usr/src/sys/i386/conf/LINT:# The flags takes the following meaning > >for apm0: > >/usr/src/sys/i386/conf/LINT:# If apm is omitted, some systems require > >sysctl -w kern.timecounter.method=1 > >/usr/src/sys/i386/conf/LINT:device apm0 > >/usr/src/sys/i386/conf/LINT:# apm under `Miscellaneous hardware' > >/usr/src/sys/i386/conf/LINT:# viapm VIA VT82C586B,596,686A > >and VT8233 SMBus controllers > >/usr/src/sys/i386/conf/LINT:device viapm > > > You may also want to read the man pages on apm ... > > >www# man -k apm > >apm(4) - APM BIOS interface > >apm(8), zzz(8) - control the APM BIOS and display its > >information > >apmd(8) - Advanced Power Management monitor daemon > >def_prog_mode(3), def_shell_mode(3), reset_prog_mode(3), > >reset_shell_mode(3), re > >setty(3), savetty(3), getsyx(3), setsyx(3), ripoffline(3), > >curs_set(3), napms(3) > > - low-level curses routines > >viapm(4) - VIA chipsets Power Management controller driver > > > From my own, separate training in the legal field, I know how important > it is to search using synonyms, to make sure one gets all relevant > citations. Other keywords to search for, besides "apm", might be > "advanced", "power", "manage", "bios", etc. > > [3] power-off devices. You did not mention which version of FreeBSD; > the examples I have cited are from a FreeBSD 4.n server. In general, > this area is rapidly evolving as programmers get a better understanding > of the [proprietary, closed-source, > must-be-painfully-but-legally-reverse-engineered] BIOS calls; if this > hurts, you need to address the vendors, not the programmers. > > > [4] If I recall correctly there may also be an option that needs to be > enabled in /etc/rc.conf if you want apmd to fire up. > Right, but on V5, apmd is essentially a no-op. I tried using mknod to [re-]create /dev/apm; nada. In /sys/i386/conf/NOTES apm is said to be experimental. Maybe the kernel wizards will have this r-engineered in 5.3 or following. thanks for your data points, gary -- Gary Kline kline@thought.org www.thought.org Public service Unix