xbatt or other indicators for the Thinkpad 600E?

richard childers / kg6hac fscked at pacbell.net
Sun Aug 29 09:06:05 PDT 2004


> 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.

> 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.


Regards,

-- richard

-- 

Richard Childers / Senior Engineer
Daemonized Networking Services
945 Taraval Street, #105
San Francisco, CA 94116 USA
[011.]1.415.759.5571
http://www.daemonized.com

'A well-schooled electorate, being necessary to the security of
 a free State, the right of the people to keep and read Books,
 shall not be infringed.' -- (Attributed to J. Neil Shulman)

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (FreeBSD)

mQGiBECGpfsRBACoPJJfIIrWAqjlW92TtYCtY//e7OW8alWylr/1ygtSQzjCCdvC
Ysa0fCcx01UenlWV+5YY/zC7KPsX2rQUKAs20fqs9et74dmgMGOj0vMjTzWEs29G
FyAsIRSpFioa8zzrjXEUVnU6OFaD9a9eaC+LSTCiKgXjbQySDKM5T1c+vwCg8W3Y
RZ83LRIUULGMPlY6zS4fQwUEAIIiTHDdWpbE+HeREJwH+4eDpGVf76XtNlOMXrt9
tJ3ExL+9ezLulg1nCrOYodOB7TEZqzV40R7emDZSX0hI9QEBCv6nW5aDVpw/bf+q
UEHwxrUvE2LBi35hoqR2QwqNlagOauSorWj8Qm/31luxJVeLVy1A1czp6B/mvG1T
co03A/9a5kzEAebJ5TzWXQC2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