Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2009 18:40:28 +0100
From:      Peter Harrison <peter.piggybox@virgin.net>
To:        David Naylor <naylor.b.david@gmail.com>
Cc:        freebsd-acpi@freebsd.org, peter.piggybox@virgin.net
Subject:   Re: [PATCH] Lenovo S10(e) ACPI
Message-ID:  <20090618174028.GA1023@ideapad.piggybox>
In-Reply-To: <200906181407.11607.naylor.b.david@gmail.com>
References:  <200906181407.11607.naylor.b.david@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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))
> 
> After lots of struggling I believe I have found a suitable workaround for this 
> problem.  First, an overview of the problem:
> 
> 1) Sometimes apci_ec0 doesn't attach properly because of EcRead timeout (patch 
> should fix this).  
> 2) Manytimes GPE (interrupt) mode timeout and switches to polling.  This 
> causes the Embedded Control to get very upset, making ACPI go back to GPE 
> mode (sysctl debug.acpi.ec.polling=0) fixes the problem until the next time 
> GPE times out.  (patch provides workaround).  
> 
> On the latter point, the patch seems to fixes the problem if device_printf is 
> called after each success.  This ends up spamming syslog (~3 per second).  
> This, I'm guessing, has something to do with locking and providing a delay 
> until the next call to the EC.  
> 
> This patch has not been tested with burst mode (which never worked) but does 
> work with debug.acpi.ec.max_threads=1 (or 3).  
> 
> Next, how it works:
> 1) Apply patch and rebuild
> 2) Add 'debug.acpi.ec.gpe=1' to loader.conf (for the workaround for 2)
> 3) Add 'debug.acpi.ec.timeout=100' (or even 50) to loader.conf (to minimise 
> impact of GPE timeout).  
> 
> This should allow EC to work (does on my Lenovo S10e), which means battery and 
> temperature status and poweroff should work as expected (besides a few error 
> messages on syslog).  
> 
> WARNING: Beware, slippery when wet, may eat babies (or baby computers), use at 
> your own risk (but it does work for me).
> 
> Regards,
> 
> David
> 
> P.S. If this doesn't work please include details (and dmesg output) and I'll 
> try to help.

David,

Thanks for this. I'll try the patch and report back. I'm running 7.2-RELEASE at the moment, do you expect it to work on this, or should I move up to STABLE (or CURRENT)?

Thanks again,


Peter Harrison.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090618174028.GA1023>