Date: Thu, 18 Jun 2009 14:07:07 +0200 From: David Naylor <naylor.b.david@gmail.com> To: ivakras1@gmail.com, peter.piggybox@virgin.net Cc: freebsd-acpi@freebsd.org Subject: [PATCH] Lenovo S10(e) ACPI Message-ID: <200906181407.11607.naylor.b.david@gmail.com>
next in thread | raw e-mail | index | archive | help
--nextPart2924633.iESVrH0bAT Content-Type: multipart/mixed; boundary="Boundary-01=_s3iOKAdkgcyo+Et" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_s3iOKAdkgcyo+Et Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, ((Short version: apply patch and add 'debug.acpi.ec.gpe=3D1'=20 and 'debug.acpi.ec.timeout=3D100' to loader.conf and EC (battery,=20 thermal) ?should? work)) After lots of struggling I believe I have found a suitable workaround for t= his=20 problem. First, an overview of the problem: 1) Sometimes apci_ec0 doesn't attach properly because of EcRead timeout (pa= tch=20 should fix this). =20 2) Manytimes GPE (interrupt) mode timeout and switches to polling. This=20 causes the Embedded Control to get very upset, making ACPI go back to GPE=20 mode (sysctl debug.acpi.ec.polling=3D0) fixes the problem until the next ti= me=20 GPE times out. (patch provides workaround). =20 On the latter point, the patch seems to fixes the problem if device_printf = is=20 called after each success. This ends up spamming syslog (~3 per second). = =20 This, I'm guessing, has something to do with locking and providing a delay= =20 until the next call to the EC. =20 This patch has not been tested with burst mode (which never worked) but doe= s=20 work with debug.acpi.ec.max_threads=3D1 (or 3). =20 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 minimi= se=20 impact of GPE timeout). =20 This should allow EC to work (does on my Lenovo S10e), which means battery = and=20 temperature status and poweroff should work as expected (besides a few erro= r=20 messages on syslog). =20 WARNING: Beware, slippery when wet, may eat babies (or baby computers), use= at=20 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'l= l=20 try to help. --Boundary-01=_s3iOKAdkgcyo+Et-- --nextPart2924633.iESVrH0bAT 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) iEYEABECAAYFAko6Le8ACgkQUaaFgP9pFrJ8UgCfdRM5Bco60F2KOwQyNJtB0dNb 9IYAn16swVQBKbASDGllF2cOQv8PQror =WkWJ -----END PGP SIGNATURE----- --nextPart2924633.iESVrH0bAT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906181407.11607.naylor.b.david>