Hi all,
I have issue with ACPI related thing in kernel (ec.c). It is discussed here (
https://bugs.launchpad.net/ubuntu/+s...ux/+bug/578506) and here (
https://bugzilla.kernel.org/show_bug.cgi?id=14733). I tried patches from here (
https://bugzilla.kernel.org/attachment.cgi?id=73510) and here (
https://bugzilla.kernel.org/attachment.cgi?id=25261) which seems latest. But both fail. Can you please help me with correct patch file for Slackware 14 kernel?
The long story for the interested :-p
=====================================
I have this issue for a long time (about 2yrs :-) now. I have Acer Aspire-4741 with standard configuration: 2.13GHz, 3MB L3 Cache i3 330M processor, 2GB RAM, Intel HD Graphics.
My problem is, if I use my laptop for long time (may be a usage which involves supend/resume?) and reboot, it takes ages to boot up. Not just the OS boot up. It takes about 4m to show the BIOS/Acer-logo screen. Then it takes about 8m to show the Grub screen. So, a typical (re)boot time is about 12-13m.
The solution, or rather a frustrating hack, is to remove the battery, power up the laptop with AC. If this fails, pull AC cord while it is only on AC (with battery removed) and insert again. If I insert battery again it will boot up normal first time until another long (enough) usage. I'm currently forced to use my laptop as a desktop.
I first noticed it in Ubuntu (forgot the version). Inspired(?) by all the *buntu bashing online, I also cursed it whole heartedly. I got the shock of my life when this happened with my Slackware install as well :-( I immediately repented my cursing of Ubuntu and started looking why it is happening.
After that I have noticed that this strange behavior is seen with both 32-bit and 64-bit linux and practically with all the distros I have used long enough (Debian, Ubuntu, Mint, Fedora, CentOS, openSUSE, Arch, Slackware).
I now know that this is related to ACPI and battery state. The dmesg spews a lot of message related to this. Here is an excerpt:
Code:
[45533.544483] ACPI Error: Evaluating _BCM failed (20110623/video-364)
[45832.406114] ACPI: EC: input buffer is not empty, aborting transaction
[45832.406123] ACPI Exception: AE_TIME, Returned by Handler for
[EmbeddedControl] (20110623/evregion-478)
[45832.406139] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.GFX0.DD02._BCM] (Node ffff88006c85e050), AE_TIME
(20110623/psparse-536)
[45832.406164] ACPI Error: Evaluating _BCM failed (20110623/video-364)
[45832.905907] ACPI: EC: input buffer is not empty, aborting transaction
[45832.905915] ACPI Exception: AE_TIME, Returned by Handler for
[EmbeddedControl] (20110623/evregion-478)
[45832.905930] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.GFX0.DD02._BCM] (Node ffff88006c85e050), AE_TIME
(20110623/psparse-536)
[45832.905953] ACPI Error: Evaluating _BCM failed (20110623/video-364)
[48843.274900] ACPI: EC: input buffer is not empty, aborting transaction
[48843.274906] ACPI Exception: AE_TIME, Returned by Handler for
[EmbeddedControl] (20110623/evregion-478)
[48843.274915] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.GFX0.DD02._BCM] (Node ffff88006c85e050), AE_TIME
(20110623/psparse-536)
[48843.274932] ACPI Error: Evaluating _BCM failed (20110623/video-364)
[48843.775732] ACPI: EC: input buffer is not empty, aborting transaction
[48843.775739] ACPI Exception: AE_TIME, Returned by Handler for
[EmbeddedControl] (20110623/evregion-478)
[48843.775752] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.GFX0.DD02._BCM] (Node ffff88006c85e050), AE_TIME
(20110623/psparse-536)
[48843.775770] ACPI Error: Evaluating _BCM failed (20110623/video-364)
[48844.275520] ACPI: EC: input buffer is not empty, aborting transaction
[48844.275525] ACPI Exception: AE_TIME, Returned by Handler for
[EmbeddedControl] (20110623/evregion-478)
[48844.275535] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.GFX0.DD02._BCM] (Node ffff88006c85e050), AE_TIME
(20110623/psparse-536)
[48844.275549] ACPI Error: Evaluating _BCM failed (20110623/video-364)
This is not the full error message all the time but one common sentence in all of them is "[numbers.numbers] ACPI: EC: input buffer is not empty, aborting transaction"
As stated above, there is a discussion on launchpad and kernel bugzilla regarding this issue. As per discussion we need to patch ec.c file with a 'Add delay before data write' patch. Some report success. Some other report success as for this problem is concerned but say it breaks other parts of the system.
Anyway, I decided to try my luck with the patch. I obtained the diff from
https://bugzilla.kernel.org/attachment.cgi?id=25261. It seems to be latest but don't know how to check if it applies to 3.2 kernel.
I tried
Code:
patch -p1 < ~/Downloads/ec-add-delay-patch.diff
but it fails with error
Code:
bash-4.2$ patch -p1 < ~/Documents/ec-add-delay-patch.diff
patching file drivers/acpi/ec.c
Hunk #1 succeeded at 222 (offset -4 lines).
Hunk #2 succeeded at 230 (offset -4 lines).
Hunk #3 FAILED at 272.
1 out of 3 hunks FAILED -- saving rejects to file drivers/acpi/ec.c.rej
My ec.c.rej file reads as
Code:
--- drivers/acpi/ec.c
+++ drivers/acpi/ec.c
@@ -272,15 +273,25 @@
return (status & ACPI_EC_FLAG_IBF) == 0;
}
+/* try to clean input buffer with burst_disable transaction */
+static int acpi_ec_clean_buffer(struct acpi_ec *ec)
+{
+ struct transaction t = {.command = ACPI_EC_BURST_DISABLE,
+ .wdata = NULL, .rdata = NULL,
+ .wlen = 0, .rlen = 0};
+ return acpi_ec_transaction_unlocked(ec, &t);
+}
+
static int ec_wait_ibf0(struct acpi_ec *ec)
{
+
unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
/* interrupt wait manually if GPE mode is not active */
while (time_before(jiffies, delay))
if (wait_event_timeout(ec->wait, ec_check_ibf0(ec),
msecs_to_jiffies(1)))
return 0;
- return -ETIME;
+ return acpi_ec_clean_buffer(ec);
}
static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
Request help with obtaining correct patch file for Slackware 14 kernel. Also, any tips on patching. I've compiled kernels before but this would be my first patching.
Thanks,
SV