[PATCH] Lenovo S10(e) ACPI
Peter Harrison
peter.piggybox at virgin.net
Thu Jun 18 19:00:32 UTC 2009
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.
More information about the freebsd-acpi
mailing list