From owner-freebsd-mobile@FreeBSD.ORG Tue Mar 28 05:15:31 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5743D16A401 for ; Tue, 28 Mar 2006 05:15:31 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal2.es.net (postal2.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2056943D45 for ; Tue, 28 Mar 2006 05:15:31 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IBA74465; Mon, 27 Mar 2006 21:15:27 -0800 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id AAC594504D; Mon, 27 Mar 2006 21:15:26 -0800 (PST) To: hartzell@alerce.com In-reply-to: Your message of "Mon, 27 Mar 2006 20:17:59 PST." <17448.47351.506945.868799@satchel.alerce.com> Date: Mon, 27 Mar 2006 21:15:26 -0800 From: "Kevin Oberman" Message-Id: <20060328051526.AAC594504D@ptavv.es.net> Cc: Norberto Meijome , freebsd-mobile@freebsd.org Subject: Re: ACPI Suspend, devd and rc.suspend 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, 28 Mar 2006 05:15:31 -0000 > From: George Hartzell > Date: Mon, 27 Mar 2006 20:17:59 -0800 > Sender: owner-freebsd-mobile@freebsd.org > > Norberto Meijome writes: > > On Mon, 27 Mar 2006 09:45:27 -0800 > > Ben Jencks wrote: > > [...] > > > > > > In order to make this work on my T43p, I set dev.acpi_ibm.0.events=1, > > > so that Fn-F4 generates an acpi_ibm event (which is handled by devd) > > > rather than a suspend event (which tells the kernel to suspend > > > straightaway). I have the block > > > > > > notify 10 { > > > match "system" "ACPI"; > > > match "subsystem" "IBM"; > > > match "notify" "0x04"; > > > action "/usr/sbin/zzz"; > > > }; > > > > > > in my devd.conf, so that it calls zzz, which does the right thing. > > > > > > > cool, that's EXACTLY what I was after :) thx man > > Is there any way to hook up > > hw.acpi.lid_switch_state: S3 > > so that it also runs through devd and can run zzz? > > The atheros wireless card in my T42p doesn't wake up properly when I > suspend/resume from X, but if I use vidcontrol to switch to a > different virtual terminal on suspend and back on resume then it works > just fine. > > I've add a couple of hacks in /etc/rc.{suspend,resume}, but they're > not called on a lid close event. You might want to look at a couple of sysctls: hw.acpi.reset_video and hw.syscons.sc_no_suspend_vtswitch. these might help. I am pretty sure that hooks to the lid switch are possible, but I don't think code has been put in FreeBSD to do it. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634