From owner-freebsd-current@FreeBSD.ORG Thu Jan 29 15:27:10 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 1207016A4CE for ; Thu, 29 Jan 2004 15:27:10 -0800 (PST) Received: from bliss.thebadger.org (82-68-10-1.dsl.in-addr.zen.co.uk [82.68.10.1]) by mx1.FreeBSD.org (Postfix) with SMTP id CB07043D45 for ; Thu, 29 Jan 2004 15:27:06 -0800 (PST) (envelope-from jim@thebadger.org) Received: (qmail 2172 invoked from network); 30 Jan 2004 00:25:40 -0000 Received: from unknown (HELO osts) (192.168.1.4) by 192.168.1.1 with SMTP; 30 Jan 2004 00:25:40 -0000 From: James Green To: freebsd-current@freebsd.org In-Reply-To: References: <1075401074.2660.106.camel@mobius.int.thebadger.org> Content-Type: text/plain Message-Id: <1075418369.2662.170.camel@mobius.int.thebadger.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 29 Jan 2004 23:19:29 +0000 Content-Transfer-Encoding: 7bit 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: Thu, 29 Jan 2004 23:27:10 -0000 On Thu, 2004-01-29 at 19:40, Jesse Guardiani wrote: > James Green wrote: > > [...] > > > Interestingly, however, is that: > > # sysctl hw.acpi.video.lcd0.active=0 && acpiconf -s 1 > > > > will turn off the LCD and suspend gracefully, whereas > > # xset -display :0 dpms force off && sysctl hw.acpi.video.lcd0.active=0 > > && acpiconf -s 1 > > > > just locks everything up... (discovered by adding the commands to > > /etc/rc.suspend and getting a lock up) > > What about from SSH? I've found that things sometimes need a bit of a delay > to work properly from /etc/rc.suspend. 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... James