From owner-freebsd-acpi@FreeBSD.ORG Wed May 27 11:24:15 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6511106566B for ; Wed, 27 May 2009 11:24:15 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f164.google.com (mail-ew0-f164.google.com [209.85.219.164]) by mx1.freebsd.org (Postfix) with ESMTP id 691998FC14 for ; Wed, 27 May 2009 11:24:12 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy8 with SMTP id 8so969128ewy.43 for ; Wed, 27 May 2009 04:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=bJjcYJ2Q28gXKeC/jWYo+gjQ17LT4KkS/j8Ih9ZSSwU=; b=gWCuRgcEnNSPNZvQdrvK1W2yTZ/XuCUPwl+lV9+pdfAPBBGzLsYSz2dqU0VoMr8d3k PL5AsA0vsiNXkgGA+8rIdWbuqIyxYllA7mwhImVz3NQSzOmq1KAFWJdnHIdg/XV/8EKU FM7nW5c2bHvSc9IN09szrw8Igq0MkafFkYrzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=IVLZIbwUudhCFVkjjiP8oZfEnM0RG48yE5a1LatRtO/hrOntDD/3IA0u8ANW0tCmvC D3zMn1FL/SG+2IdiG8mhQAHkSuLrsvMTCypT8rjHPuepQUB46H4oJ47jgoNLMpD/Ejcv hseS93DofouAEe+4etLcniyhcIUeeUvfDOUtg= Received: by 10.210.11.13 with SMTP id 13mr1632664ebk.8.1243423451540; Wed, 27 May 2009 04:24:11 -0700 (PDT) Received: from epsilon.lan (bl5-226-147.dsl.telepac.pt [82.154.226.147]) by mx.google.com with ESMTPS id 10sm199692eyd.52.2009.05.27.04.24.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 May 2009 04:24:10 -0700 (PDT) Sender: Rui Paulo Message-Id: From: Rui Paulo To: nocturnal In-Reply-To: <9aed80930905260648h41633265p1f69f4368a2c9b44@mail.gmail.com> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-1-975756977" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Wed, 27 May 2009 12:24:05 +0100 References: <9aed80930905260648h41633265p1f69f4368a2c9b44@mail.gmail.com> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.935.3) Cc: freebsd-acpi@freebsd.org Subject: Re: MacBook, acpiconf sleep state shuts machine down X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 11:24:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-1-975756977 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 26 May 2009, at 14:48, nocturnal wrote: > I'm trying to get my MacBook with FreeBSD 7.2-RELEASE to at least > suspend to > RAM, even though hw.acpi.supported_sleep_state lists S3, S4 and S5. > > Though it doesn't matter which one i use, it will not wake back up > from the > sleep state. > > So far i've created a devd notify which runs a script that in turn > runs > acpiconf when the Lid is closed and sets state S3. When the script > receives > 0x01 it sets S1. > > I've tried with S3, S4 and S5 at 0x00 and it never wakes up, should > i use > something other than S1 for 0x01? > > It goes into some sort of sleep state, the apple light goes off and > i hear a > noise similar from my other macbooks with Darwin that indicates the > HDD has > turned off(I BELIEVE), it's basically the macbook-is-sleeping-sound > again. > ;D > > But when i then open the lid, it either shuts down and i have to > turn it > back on, or it gets stuck in sleep state and i have to do a cold > shutdown > and reboot it to get back into the system. > > How can i have acpi recognize the Lid is opened and do what it's > being told > even in sleep state? Is ACPI being disabled in sleep state? > > I've also set hw.acpi.disable_on_reboot="1" in loader.conf to > hopefully make > it stop this behaviour but it did not help. > > Also something i find weird or confusing is that sysctl has a value > hw.acpi.power_button_state that is set to S5 and one > hw.acpi.sleep_button_state set to S3. Also a > hw.acpi.lid_switch_state set to > NONE. > > hw.acpi.standby_state: S1 > hw.acpi.suspend_state: S3 > hw.acpi.s4bios: 0 > hw.acpi.handle_reboot: 0 > > I would appreciate any other hints & tips from people who have > experience > with CPU states and ACPI on macbooks. You may want to try a newer FreeBSD version that supports SMP suspend. Otherwise you need to disable SMP in loader.conf, 'kern.smp.disabled=1'. Either way, I haven't tested this for a long time so I don't know if it will work. -- Rui Paulo --Apple-Mail-1-975756977 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkodItUACgkQfD8M/ASTygJNVwCfT00sQBzCd/nWogOeCBTBHJgm dBgAmgPjHIunDlAzpiRpj/aZIMifWcWK =Vk6n -----END PGP SIGNATURE----- --Apple-Mail-1-975756977--