Re: xbatt or other indicators for the Thinkpad 600E?

Gary Kline <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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     [email protected]   www.thought.org     Public service Unix

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.