From owner-freebsd-current@FreeBSD.ORG Sat Jan 31 12:31:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D208F16A4CE for ; Sat, 31 Jan 2004 12:31:34 -0800 (PST) Received: from psg.com (psg.com [147.28.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1C1D43D5C for ; Sat, 31 Jan 2004 12:31:32 -0800 (PST) (envelope-from randy@psg.com) Received: from [127.0.0.1] (helo=roam.psg.com) by psg.com with esmtp (Exim 4.24; FreeBSD) id 1An1m8-000PzO-HM; Sat, 31 Jan 2004 20:31:32 +0000 Received: from localhost ([127.0.0.1] helo=roam.psg.com.psg.com) by roam.psg.com with esmtp (Exim 4.30; FreeBSD) id 1An1m7-0000Ks-CC; Sat, 31 Jan 2004 12:31:31 -0800 From: Randy Bush MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Sebastian Yepes F. [ESN]" References: <20040131153340.se80400wwc0sosss@agosto> <200401311659.11006.freebsd-current@webteckies.org> <20040131173507.GA22680@x123.info> Message-Id: Date: Sat, 31 Jan 2004 20:31:32 +0000 cc: freebsd-current@freebsd.org Subject: Re: API to turn off the display X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2004 20:31:34 -0000 > STAT=`sysctl hw.acpi.video.lcd0.active |awk '{print $2}'` > > sync && sync && sync > > if [ $STAT = 1 ]; then > logger -t Lid Close at `date +'%Y%m%d %H:%M:%S'` > sysctl hw.acpi.video.lcd0.active=0 > sysctl hw.acpi.cpu.throttle_state=1 > echo A >/dev/speaker > else > logger -t Lid Open at `date +'%Y%m%d %H:%M:%S'` > sysctl hw.acpi.cpu.throttle_state=8 > sysctl hw.acpi.video.lcd0.active=1 > echo C >/dev/speaker > fi with a very recent current, # sysctl -a | grep video hw.acpi.reset_video: 1 # sysctl -a | grep lcd # i.e., those systls went away! randy