From owner-freebsd-questions@FreeBSD.ORG Sun Nov 26 00:46:18 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F86516A403 for ; Sun, 26 Nov 2006 00:46:18 +0000 (UTC) (envelope-from doug@safeport.com) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8D5443D55 for ; Sun, 26 Nov 2006 00:45:25 +0000 (GMT) (envelope-from doug@safeport.com) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.8/8.13.8) with ESMTP id kAQ0kFHg056889; Sat, 25 Nov 2006 19:46:15 -0500 (EST) (envelope-from doug@safeport.com) Received: from localhost (doug@localhost) by fledge.watson.org (8.13.8/8.13.8/Submit) with ESMTP id kAQ0kFXN056886; Sat, 25 Nov 2006 19:46:15 -0500 (EST) (envelope-from doug@safeport.com) X-Authentication-Warning: fledge.watson.org: doug owned process doing -bs Date: Sat, 25 Nov 2006 19:46:15 -0500 (EST) From: doug@safeport.com X-X-Sender: doug@fledge.watson.org To: Erik Norgaard In-Reply-To: <20061125185613.Y46748@fledge.watson.org> Message-ID: <20061125194239.W56001@fledge.watson.org> References: <456875F3.8040908@locolomo.org> <20061125185613.Y46748@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Questions Subject: Re: ACPI: Standby, sleep, suspend and resume X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: doug@fledge.watson.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 00:46:18 -0000 On Sat, 25 Nov 2006, doug wrote: > On Sat, 25 Nov 2006, Erik Norgaard wrote: > >> Hi: >> >> I have the following sysctl parameters: >> >> hw.acpi.supported_sleep_state: S3 S4 S5 >> hw.acpi.power_button_state: S5 >> hw.acpi.sleep_button_state: S3 >> hw.acpi.lid_switch_state: NONE >> hw.acpi.standby_state: S1 >> hw.acpi.suspend_state: S3 >> hw.acpi.sleep_delay: 1 >> >> First, I'd like that the screen is switched off when the lid closes, so I >> assume that I should set hw.acpi.lid_switch_state to something, but I don't >> know what. >> >> Second: Is there a way to manually toggle the sleep state so I can create a >> menu item "sleep" or "standby"? >> >> Last: When the laptop goes into some suspend mode - I don't know which - I >> don't know how to bring it back alive except for rebooting. What is the >> secret key combination? (typically). >> >> Thanks, Erik > > These are my settings. This is for a thinkpad T42p, your settings may be > slightly different. > > sysctl: > > hw.acpi.supported_sleep_state: S3 S4 S5 > hw.acpi.power_button_state: S5 > hw.acpi.sleep_button_state: S3 > hw.acpi.lid_switch_state: NONE > hw.acpi.standby_state: S1 > hw.acpi.suspend_state: S3 > hw.acpi.sleep_delay: 3 > > /boot/loader.conf > > snd_ich_load="YES" > if_ipw_load="YES" > wlan_load="YES" > wlan_wep_load="YES" > acpi_ibm_load="YES" <---- for thinkpad > > If I close the lid the T42p goes to standby, opening wakes up. The sleep > button fn-F4 does a suspend, again opening the lid does a resume. I have not > figured out suspend to disk but for my purposes suspend draws power so > slowly, I have not bothered. > > It may be that you do need something set for hw.acpi.lid_switch_state, I do > not. Resume does not correctly redraw the X-windows background, but it > writing this I noticed I put: > > notify 10 { > match "system" "ACPI"; > match "subsystem" "Lid"; > action "/usr/X11R6/bin/xrandr -display :0.0 -s 0"; > }; > > inside of the comments in /etc/devd.conf. > > I got most of my information from: > > http://www.cs.ucr.edu/~trep/tsrT40freebsd.html > google > various Linux sites talking about thinkpads The devd.conf change works. Trying to help you helped me. I hope this information aids you as well. Without the xrandr, I got black and white stripes randomly for the background.