From owner-freebsd-current@FreeBSD.ORG Thu Dec 21 12:18:30 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E03B16A4AB; Thu, 21 Dec 2006 12:18:30 +0000 (UTC) (envelope-from mcdouga9@daemon.egr.msu.edu) Received: from daemon.egr.msu.edu (daemon.egr.msu.edu [35.9.44.65]) by mx1.freebsd.org (Postfix) with ESMTP id 152E713C46A; Thu, 21 Dec 2006 12:18:29 +0000 (UTC) (envelope-from mcdouga9@daemon.egr.msu.edu) Received: by daemon.egr.msu.edu (Postfix, from userid 21281) id 5014C1CC2F; Thu, 21 Dec 2006 07:18:29 -0500 (EST) Date: Thu, 21 Dec 2006 07:18:29 -0500 From: Adam McDougall To: Andrew Pantyukhin Message-ID: <20061221121828.GE98504@egr.msu.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Cc: current@freebsd.org Subject: Re: Laptop display stays on with lid closed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 21 Dec 2006 12:18:30 -0000 On Wed, Dec 20, 2006 at 11:01:58PM +0300, Andrew Pantyukhin wrote: On 12/20/06, Andrew Pantyukhin wrote: >I only noticed this now, thought it is a hardware >glitch. My laptop display - and its backlight - >stay on when I close the lid. Shouldn't it be >turned off like in an OS-independent way?.. To answer my own question, I ended up using a cool app named radeontool (sysutils/). Clearly, I'm lucky to have a Radeon in my laptop. Now I just have to figure out how to call a script on lid open/close event. put into /etc/devd.conf and reload devd: notify 10 { match "system" "ACPI"; match "subsystem" "Lid"; action "/etc/rc.lid $notify"; }; Then in /etc/rc.lid: #!/bin/sh STAT=$1 if [ $STAT = 0x00 ]; then logger -t Lid $STAT Close at `date +'%Y%m%d %H:%M:%S'` # do something for lid close event here else logger -t Lid $STAT Open at `date +'%Y%m%d %H:%M:%S'` # do something for lid open event here fi