Hi! I have Dell Vostro 1310 laptop, this system has some problems with ACPI. Sometimes I see this in dmesg: ==================== Jan 24 20:36:00 kibab-nb kernel: acpi_ec0: wait timed out (no response), forcing polled mode Jan 24 20:36:00 kibab-nb kernel: acpi_ec0: EcRead: failed waiting to get data Jan 24 20:36:00 kibab-nb kernel: ACPI Exception (evregion-0529): AE_NO_HARDWARE_RESPONSE, Returned by Handler for [EmbeddedControl] [20070320] ==================== These messages repeat constantly till rebooting.
After that I can't query battery state through "acpiconf -i 0" -- it either reports constant charge percent (for example, 48% -- till laptop shutdowns due to low charge) or reports nothing. Just in case anyone has the same problems with ACPI, I want to share my workaround for this problem, and ask if it is the right way to deal with it. My system is set up to use "burst mode" to query EC (debug.acpi.ec.burst=1 in sysctl.conf, and reverting back to burst=0 on shutdown to prevent soft reset instead of normal shutdown). After described event occurs, system also sets "debug.acpi.ec.polled" to 1. But, as I understand, laptop's BIOS doesn't support operating in polled mode. If I manually set debug.acpi.ec.polled back to 0, problem goes away -- I can query battery status as before! I've slightly patched sys/dev/acpi/acpi_ec.c (patch is attached) to add new sysctl OID "debeg.acpi.ec.disable_polling". Setting it to 1 prevents going to polled mode. I set it from /etc/sysctl.conf on boot. Now I have no problems with battery status (and other EC interaction, as I guess). I hope someone will find this patch useful, or will have some suggestions how to do it better. P.S. I'm running FreeBSD 7.1-STABLE i386, system dmesg may be found here: http://dl.kibab.com/dell_vostro_1310_A12_dmesg.log -- Ilya Bakulin xmpp://[email protected]
--- /usr/src/sys/dev/acpica/acpi_ec.c.orig 2009-01-20 07:40:11.000000000 +0300
+++ /usr/src/sys/dev/acpica/acpi_ec.c 2009-01-20 07:47:01.000000000 +0300
@@ -195,6 +195,10 @@
SYSCTL_INT(_debug_acpi_ec, OID_AUTO, timeout, CTLFLAG_RW, &ec_timeout,
EC_TIMEOUT, "Total time spent waiting for a response (poll+sleep)");
+static int ec_disable_polling;
+SYSCTL_INT(_debug_acpi_ec, OID_AUTO, disable_polling, CTLFLAG_RW, &ec_disable_polling, 0,
+ "Totally disable use of polled mode (Dell EC problem workaround)");
+
static ACPI_STATUS
EcLock(struct acpi_ec_softc *sc)
{
@@ -892,7 +896,11 @@
device_printf(sc->ec_dev,
"wait timed out (%sresponse), forcing polled mode\n",
Status == AE_OK ? "" : "no ");
- ec_polled_mode = TRUE;
+ if (ec_disable_polling) {
+ device_printf(sc->ec_dev, "Polling explicitly disabled! Continue waiting for generated GPEs...\n");
+ } else {
+ ec_polled_mode = TRUE;
+ }
}
}
if (Status != AE_OK)
signature.asc
Description: Эта часть сообщения подписана цифровой подписью
!DSPAM:497c2736967001885613896!
_______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[email protected]"

