From owner-freebsd-mobile@FreeBSD.ORG Tue Sep 8 23:46:44 2009 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A80C1065679 for ; Tue, 8 Sep 2009 23:46:44 +0000 (UTC) (envelope-from marka@isc.org) Received: from farside.isc.org (farside.isc.org [IPv6:2001:4f8:3:bb::5]) by mx1.freebsd.org (Postfix) with ESMTP id 5347E8FC3A for ; Tue, 8 Sep 2009 23:46:44 +0000 (UTC) Received: from drugs.dv.isc.org (drugs.dv.isc.org [IPv6:2001:470:1f00:820:214:22ff:fed9:fbdc]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "drugs.dv.isc.org", Issuer "ISC CA" (not verified)) by farside.isc.org (Postfix) with ESMTP id 5973DE6023; Tue, 8 Sep 2009 23:46:42 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (8.14.3/8.14.3) with ESMTP id n88NkaLv040439; Wed, 9 Sep 2009 09:46:37 +1000 (EST) (envelope-from marka@drugs.dv.isc.org) Message-Id: <200909082346.n88NkaLv040439@drugs.dv.isc.org> To: Matthias Apitz From: Mark Andrews References: <20090820081055.GA2962@current.Sisis.de> <20090908082123.GR38884@e.0x20.net> <20090908144050.GA6014@current.Sisis.de> In-reply-to: Your message of "Tue, 08 Sep 2009 16:40:50 +0200." <20090908144050.GA6014@current.Sisis.de> Date: Wed, 09 Sep 2009 09:46:36 +1000 Sender: marka@isc.org Cc: Lars Engels , freebsd-mobile@freebsd.org Subject: Re: Dell M4400 && power-off the display on Lid close (8-CURRENT / Xorg) X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 23:46:44 -0000 In message <20090908144050.GA6014@current.Sisis.de>, Matthias Apitz writes: > El día Tuesday, September 08, 2009 a las 10:21:23AM +0200, Lars Engels escribió > : > > > > but they are not estimated in /etc/devd.conf. Any hint for a good > > > devd.conf entry to make that working? Thx in advance > > > > > > Btw: I don't want suspend/resume. > > > > Try this: > > > > notify 10 { > > match "system" "ACPI"; > > match "subsystem" "Lid"; > > action"$PATH_TO_YOUR_SCRIPT $notify"; > > }; > > > > And in your script you turn off the backlight with > > xbacklight -set 0 > > when notify is 0x00 and > > xbacklight -set 100 > > for 0x01. > > Thanks for your hint; I'm using since some time now: > > cat /usr/local/etc/devd/lid.conf > # > # When the the Lid is open / closed .... > # > # , August 2009 > # > notify 10 { > match "system" "ACPI"; > match "subsystem" "Lid"; > match "notify" "0x00"; > action "/usr/local/bin/xset -display :0.0 s 1"; > }; > notify 10 { > match "system" "ACPI"; > match "subsystem" "Lid"; > match "notify" "0x01"; > action "/usr/local/bin/xset -display :0.0 s > 120"; > }; > > Thx I call this on lid events which works even when X isn't running. :-) Mark notify 10 { match "system" "ACPI"; match "subsystem" "Lid"; action "/etc/rc.lid $notify"; }; /etc/rc.lid: #!/bin/sh # deal with lid switch events if [ "x$1" = x0x00 ]; then /usr/bin/logger -t Lid Closed at `/bin/date` /sbin/sysctl hw.acpi.video.lcd0.active=0 else /usr/bin/logger -t Lid Opened at `/bin/date` /sbin/sysctl hw.acpi.video.lcd0.active=1 fi -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org