From owner-freebsd-current@FreeBSD.ORG Fri Jan 30 21:33:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C180016A4CE for ; Fri, 30 Jan 2004 21:33:21 -0800 (PST) Received: from psg.com (psg.com [147.28.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24C8043D1D for ; Fri, 30 Jan 2004 21:33:17 -0800 (PST) (envelope-from randy@psg.com) Received: from [127.0.0.1] (helo=roam.psg.com) by psg.com with esmtp (Exim 4.24; FreeBSD) id 1Amnkq-000BMN-OW; Sat, 31 Jan 2004 05:33:16 +0000 Received: from localhost ([127.0.0.1] helo=roam.psg.com.psg.com) by roam.psg.com with esmtp (Exim 4.30; FreeBSD) id 1Amnkp-0000T2-Vj; Sat, 31 Jan 2004 06:33:16 +0100 From: Randy Bush MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: James Green References: <1075401074.2660.106.camel@mobius.int.thebadger.org> <1075418369.2662.170.camel@mobius.int.thebadger.org> Message-Id: Date: Sat, 31 Jan 2004 05:33:16 +0000 cc: freebsd-current@freebsd.org Subject: Re: API to turn off the display X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 31 Jan 2004 05:33:21 -0000 > I have found that too. I did most of my testing over ssh, until I setup > a serial login console (boot -h, and appropriate line in /etc/ttys) , so > I could see any messages that I might be missing... and I could not > reproduce the hang. Suspended without any problem at all. Tried booting > with the -h and I could reproduce the hang every time. > > 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. randy