From owner-freebsd-mobile Thu Jul 6 7: 9:41 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id DD08B37B7C5 for ; Thu, 6 Jul 2000 07:09:38 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92]) by tasogare.imasy.or.jp (8.10.1+3.3W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id e66E9Np06800; Thu, 6 Jul 2000 23:09:23 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) To: jcm@FreeBSD-uk.eu.org Cc: mobile@freebsd.org, jsegovia@cnc.una.py Subject: Re: apm on toshiba 4010cdt In-Reply-To: <20000706134042.A9085@dogma.freebsd-uk.eu.org> References: <20000706134042.A9085@dogma.freebsd-uk.eu.org> X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000706230923G.iwasaki@jp.FreeBSD.org> Date: Thu, 06 Jul 2000 23:09:23 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 20000228(IM140) Lines: 22 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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