From owner-freebsd-acpi@FreeBSD.ORG Sun Jun 21 11:59:03 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 444F51065670 for ; Sun, 21 Jun 2009 11:59:03 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ew0-f212.google.com (mail-ew0-f212.google.com [209.85.219.212]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8958FC15 for ; Sun, 21 Jun 2009 11:59:02 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by ewy8 with SMTP id 8so3111099ewy.43 for ; Sun, 21 Jun 2009 04:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=KUMJgnMdeZ9NtGxyOfnwcdrc+hV9Kgfzw91y9osgx/Y=; b=E87SGEh/hmYGB8Ndg5SbQUDQuZehcRms9MInzP6xUx0xmu+OZNnF7oSjltUoOU1eQH sc7o1puMUHrWtt9KB6pYPsX6Y3RGEqaHhQywUgAD80Il5uAO0BBLNaKC9OB03nROdKlE 2NMAgJCP6NtjTd3Kdbzn6pA6fwxwKF0BF/xJk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=adLnRvwGDEMhVoomd+dVYtAdCl2tT2albZMZN+sNmv+JD93hkD0pLky8GSWdMKp8c0 KY83SnorBGA9GIsyXqassFQOg/R2ezQElj220skr+lHBYmPCK15YN8yA9FMNkb0XdSVX EJQaI3WSyTAtiU1vtFfVfePtvz/WbyiPOc2u4= Received: by 10.210.37.16 with SMTP id k16mr5834200ebk.5.1245585541600; Sun, 21 Jun 2009 04:59:01 -0700 (PDT) Received: from dragonmini.dg ([196.34.241.123]) by mx.google.com with ESMTPS id 10sm76111eyd.7.2009.06.21.04.58.58 (version=SSLv3 cipher=RC4-MD5); Sun, 21 Jun 2009 04:59:00 -0700 (PDT) From: David Naylor Organization: Private To: Peter Harrison Date: Sun, 21 Jun 2009 14:00:14 +0200 User-Agent: KMail/1.9.10 References: <200906181407.11607.naylor.b.david@gmail.com> <200906182100.15817.naylor.b.david@gmail.com> <20090620130403.GA1051@ideapad.piggybox> In-Reply-To: <20090620130403.GA1051@ideapad.piggybox> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2794496.uAsAAFD5zS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200906211400.19033.naylor.b.david@gmail.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi@freebsd.org Subject: Re: [PATCH] Lenovo S10(e) ACPI 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: Sun, 21 Jun 2009 11:59:03 -0000 --nextPart2794496.uAsAAFD5zS Content-Type: multipart/mixed; boundary="Boundary-01=_PDiPKHdYgyMEI2V" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_PDiPKHdYgyMEI2V Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 20 June 2009 15:04:03 Peter Harrison wrote: > Thursday, 18 June 2009 at 21:00:11 +0200, David Naylor said: > > On Thursday 18 June 2009 19:40:28 Peter Harrison wrote: > > > Thursday, 18 June 2009 at 14:07:07 +0200, David Naylor said: > > > > Hi, > > > > > > > > ((Short version: apply patch and add 'debug.acpi.ec.gpe=3D1' > > > > and 'debug.acpi.ec.timeout=3D100' to loader.conf and EC (battery, > > > > thermal) ?should? work)) > > > > > > > > P.S. If this doesn't work please include details (and dmesg output) > > > > and I'll try to help. > > David, > > The patch applied cleanly, and I've rebuilt and installed. System seems to > work fine and I'm getting battery time reported properly. It still won't > poweroff on shutdown though... > > uname -a: > FreeBSD ideapad.piggybox 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Sat Jun > 20 11:03:21 BST 2009 =20 > peter@ideapad.piggybox:/usr/obj/usr/src/sys/GENERIC i386 > > dmesg: I can't see anything that shouts out as being wrong, EC attaches correctly = and=20 no timeout errors. =20 Please see attached for a new patch, it fixes a potential (but unlikely) ra= ce=20 condition that could freeze the EC. It also 'fixes' the timeout problem=20 (well, the workaround seems more stable). =20 This adds another tunable/sysctl called ``debug.acpi.ec.delay''. It defaul= ts=20 to 0 (no change) but when set to a value it adds a delay (in microseconds)= =20 after each successful request. This delay (at about ~200) appears to fix t= he=20 problem. I'll still recommend having debug.acpi.ec.gpe and=20 debug.acpi.ec.timeout set (just in case). So you should have in loader.con= f: debug.acpi.ec.delay=3D"200" # (us) debug.acpi.ec.gpe=3D"1" # Optional but recommended debug.acpi.ec.timeout=3D"100" # (ms) Optional but recommended If you are getting some `wait timeout' messages you can try increasing=20 debug.acpi.ec.delay. =20 I'm not sure what is stopping your computer from shutting down (have you tr= ied=20 `halt -p`?). The only difference that I can spot if that I'm using -curren= t=20 (with the new acpi code). The patch may work, otherwise you could=20 give -current a try (it is probably easy enough to backport the ACPI=20 import...). =20 Regards, David --Boundary-01=_PDiPKHdYgyMEI2V-- --nextPart2794496.uAsAAFD5zS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAko+INIACgkQUaaFgP9pFrKLEwCfW57pE273s5JE4UR7YFdjAgql i/8An2wTrxBOIEaUJMyZhEFLAPVLueSG =mjdS -----END PGP SIGNATURE----- --nextPart2794496.uAsAAFD5zS--