Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2004 11:39:28 -0700
From:      Gary Kline <kline@tao.thought.org>
To:        richard childers / kg6hac <fscked@pacbell.net>
Cc:        FreeBSD Mobile Mailing List <freebsd-mobile@FreeBSD.ORG>
Subject:   Re: xbatt or other indicators for the Thinkpad 600E?
Message-ID:  <20040829183928.GA81484@thought.org>
In-Reply-To: <4131FE5F.4030407@pacbell.net>
References:  <20040829003053.GA91309@thought.org> <4131FE5F.4030407@pacbell.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040829183928.GA81484>