From owner-freebsd-acpi@FreeBSD.ORG Mon Jun 22 20:21:40 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 59AF410656C3 for ; Mon, 22 Jun 2009 20:21:40 +0000 (UTC) (envelope-from peter.piggybox@virgin.net) Received: from smtprelay-virgin.hostedemail.com (smtprelay-virgin0163.hostedemail.com [64.99.136.163]) by mx1.freebsd.org (Postfix) with ESMTP id 109478FC08 for ; Mon, 22 Jun 2009 20:21:39 +0000 (UTC) (envelope-from peter.piggybox@virgin.net) Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay06.hostedemail.com (Postfix) with SMTP id B9799195FE6; Mon, 22 Jun 2009 20:21:38 +0000 (UTC) X-Spam-Summary: 2, 0, 0, 2e7b1a92d472667d, d41d8cd98f00b204, peter.piggybox@virgin.net, naylor.b.david@gmail.com:peter.piggybox@virgin.net:ivakras1@gmail.com:freebsd-acpi@freebsd.org, RULES_HIT:355:379:599:601:945:966:973:988:989:1260:1261:1277:1312:1313:1314:1345:1359:1437:1516:1518:1519:1534:1542:1593:1594:1595:1596:1605:1711:1730:1747:1766:1792:1981:2194:2196:2198:2199:2200:2201:2377:2393:2551:2553:2559:2562:2693:2894:3027:3622:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:3961:4184:4362:4385:4699:5007:6119:6261:7903:7904:7974:10004, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:none, DNSBL:none, Custom_rules:0:0:0 X-Filterd-Recvd-Size: 4165 Received: from ideapad.piggybox (client-81-105-211-85.mcr-bng-011.adsl.virginmedia.net [81.105.211.85]) by omf11.hostedemail.com (Postfix) with ESMTP; Mon, 22 Jun 2009 20:21:33 +0000 (UTC) Received: from ideapad.piggybox (localhost [127.0.0.1]) by ideapad.piggybox (8.14.3/8.14.3) with ESMTP id n5MJKYd9001107; Mon, 22 Jun 2009 20:20:35 +0100 (BST) (envelope-from peter@ideapad.piggybox) Received: (from peter@localhost) by ideapad.piggybox (8.14.3/8.14.3/Submit) id n5MJKY7f001106; Mon, 22 Jun 2009 20:20:34 +0100 (BST) (envelope-from peter) Date: Mon, 22 Jun 2009 20:20:34 +0100 From: Peter Harrison To: David Naylor Message-ID: <20090622192034.GA1059@ideapad.piggybox> References: <200906181407.11607.naylor.b.david@gmail.com> <200906182100.15817.naylor.b.david@gmail.com> <20090620130403.GA1051@ideapad.piggybox> <200906211400.19033.naylor.b.david@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906211400.19033.naylor.b.david@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-acpi@freebsd.org, Peter Harrison 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: Mon, 22 Jun 2009 20:21:40 -0000 Sunday, 21 June 2009 at 14:00:14 +0200, David Naylor said: > 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=1' > > > > > and 'debug.acpi.ec.timeout=100' 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 > > 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 > no timeout errors. > > Please see attached for a new patch, it fixes a potential (but unlikely) race > condition that could freeze the EC. It also 'fixes' the timeout problem > (well, the workaround seems more stable). > > This adds another tunable/sysctl called ``debug.acpi.ec.delay''. It defaults > to 0 (no change) but when set to a value it adds a delay (in microseconds) > after each successful request. This delay (at about ~200) appears to fix the > problem. I'll still recommend having debug.acpi.ec.gpe and > debug.acpi.ec.timeout set (just in case). So you should have in loader.conf: > > debug.acpi.ec.delay="200" # (us) > debug.acpi.ec.gpe="1" # Optional but recommended > debug.acpi.ec.timeout="100" # (ms) Optional but recommended > > If you are getting some `wait timeout' messages you can try increasing > debug.acpi.ec.delay. > > I'm not sure what is stopping your computer from shutting down (have you tried > `halt -p`?). The only difference that I can spot if that I'm using -current > (with the new acpi code). The patch may work, otherwise you could > give -current a try (it is probably easy enough to backport the ACPI > import...). > > Regards, > > David Hi David, Thanks for coming back to me - I haven't had a chance to test the new patch yet, but will get on to it as soon as I can. Is just a kernel rebuild enough after patching? Last time a did kernel + world to pick up the last security advisory too and it was a bit painful (even slower than my old Celeron M based Dell laptop). I'm still reeling from a packaged based upgrade of Firefox (still took a while, even using packages). Thanks again for your help. Peter.