Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jul 2000 23:09:23 +0900
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        jcm@FreeBSD-uk.eu.org
Cc:        mobile@freebsd.org, jsegovia@cnc.una.py
Subject:   Re: apm on toshiba 4010cdt
Message-ID:  <20000706230923G.iwasaki@jp.FreeBSD.org>
In-Reply-To: <20000706134042.A9085@dogma.freebsd-uk.eu.org>
References:  <20000706134042.A9085@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> when my battery power is marginal, my laptop suspends to disk and shuts
> down.  freebsd tries to recover when i restart, but if i have a ppp
> connection going, i am almost guaranteed a page fault.
> 
> is there a way to have apm warn me before this happens?  or to disable the
> feature or at least have more control over it?  i have the wmbattery monitor
> running in X and i have my BIOS settings set for low power mode on battery
> power, and regular mode on AC.

How about apmd?  If your BIOS can report POWERSTATECHANGE event or such,
you could do like this;
/etc/apmd.conf:
apm_event POWERSTATECHANGE, CAPABILITIESCHANGE {
        exec "YOUR_SCRIPT_HERE";
}

and battery lifetime can be obtained by using '/usr/sbin/apm -l' and
eval it then take action in your script.

Good luck!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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