Date: Sat, 31 Jan 2004 12:28:32 +0000 From: James Green <jim@thebadger.org> To: Randy Bush <randy@psg.com> Cc: freebsd-current@freebsd.org Subject: Re: API to turn off the display Message-ID: <1075552112.2914.13.camel@mobius.int.thebadger.org> In-Reply-To: <E1Amnkq-000BMN-OW@psg.com> References: <1075401074.2660.106.camel@mobius.int.thebadger.org> <bvbnk1$56h$1@sea.gmane.org> <1075418369.2662.170.camel@mobius.int.thebadger.org> <E1Amnkq-000BMN-OW@psg.com>
index | next in thread | previous in thread | raw e-mail
Hi Randy, On Sat, 2004-01-31 at 05:33, Randy Bush wrote: > > > > Recompiled the kernel with: > > options SC_NO_SUSPEND_VTYSWITCH > > > > and now it all works! > > > > I added to rc.suspend: > > > > xset -display :0 dpms force off > > sleep 3 > > sysctl hw.acpi.video.lcd0.active=0 > > sleep 1 > > sysctl hw.acpi.cpu.throttle_state=1 > > > > and to rc.resume: > > > > sysctl hw.acpi.cpu.throttle_state=8 > > xset -display :0 dpms force on > > sysctl hw.acpi.video.lcd0.active=1 > > > > The order of DPMS and ACPI is important. This works on both the console > > and in X. Next up is to add in ataidle... > > this helps a LOT. but ... > > i can suspend once and resume once. after that, it will not suspend > with lid or button. AFAIK, only acpiconf calls the rc.suspend and rc.resume scripts (please correct me if I am wrong!), so the above method only really works if you use acpiconf to suspend and the power switch to resume. I find it mostly works using acpiconf -s 1 to suspend, and then closing the lid. It resumes on lid switch open, but does not run rc.resume. I have also tried calling scripts from devd to process the lid switch events, however the rc.suspend scripts does not get called until after resume (and it seems after rc.resume!). I have not tried it yet, but it should be possible to call just rc.resume from devd for the lid switch open event only. Jameshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1075552112.2914.13.camel>
