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

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1319401.eydA1EDmlZ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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))
> >
> > After lots of struggling I believe I have found a suitable workaround f=
or
> > 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 G=
PE
> > mode (sysctl debug.acpi.ec.polling=3D0) 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 sysl=
og
> > (~3 per second). This, I'm guessing, has something to do with locking a=
nd
> > 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=3D1 (or 3).
> >
> > Next, how it works:
> > 1) Apply patch and rebuild
> > 2) Add 'debug.acpi.ec.gpe=3D1' to loader.conf (for the workaround for 2)
> > 3) Add 'debug.acpi.ec.timeout=3D100' (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)?

That patch should apply cleanly to 7.2 (with some minor offsetting).  I don=
't=20
think anything should have changed since then that would stop this from=20
working. =20

This patch seems to be more of a workaround than a fix. =20

--nextPart1319401.eydA1EDmlZ
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)

iEYEABECAAYFAko6jr8ACgkQUaaFgP9pFrKoeACfcvyWE+EKspWRVZaimFE5jLo6
VfYAn3mTpv/62bNmcbdcEqcUaYJPYRSR
=nbD/
-----END PGP SIGNATURE-----

--nextPart1319401.eydA1EDmlZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906182100.15817.naylor.b.david>