Date: Tue, 28 Mar 2006 09:18:59 -0800 From: George Hartzell <hartzell@alerce.com> To: Ben Jencks <ben@bjencks.net> Cc: freebsd-mobile@freebsd.org, hartzell@alerce.com, Norberto Meijome <freebsd@meijome.net> Subject: Re: ACPI Suspend, devd and rc.suspend Message-ID: <17449.28675.29609.759816@satchel.alerce.com> In-Reply-To: <sa6psk75ckb.fsf@wagner.bjencks.net> References: <20060328051526.AAC594504D@ptavv.es.net> <sa6psk75ckb.fsf@wagner.bjencks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Ben Jencks writes: > "Kevin Oberman" <oberman@es.net> writes: > > >> From: George Hartzell <hartzell@alerce.com> > >> 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 <ben-freebsd-mobile@bjencks.net> 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. > > I see ACPI events when I hit my lid switch, so if you set > hw.acpi.lid_switch_state=NONE (the default, AFAICT), you should be able > to use another devd hook. > [...] Yep, you're right! Now that I have lid_switch_state=NONE I'm seeing the acpi events and devd can field them for me. g.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17449.28675.29609.759816>