Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211470 - sys-power/acpid-1.0.6-r1 gives a battery-event about every 2 seconds when i'm on battery
Summary: sys-power/acpid-1.0.6-r1 gives a battery-event about every 2 seconds when i'm...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 23:55 UTC by tport
Modified: 2010-03-31 20:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to supress log messages with a -q option (acpid-1.0.6-quiet.patch,1.79 KB, patch)
2008-03-14 23:59 UTC, Gautam Iyer
Details | Diff
Ebuild to use the above patch (acpid-1.0.6-r1.ebuild,1.91 KB, text/plain)
2008-03-15 00:00 UTC, Gautam Iyer
Details
Patch against acpid-1.0.6 to bring it to CVS 2007-11-25 (acpid-1.0.6_p20071125.patch,19.82 KB, patch)
2008-03-16 01:02 UTC, Gautam Iyer
Details | Diff
Ebuild to use the above patch (acpid-1.0.6_p20071125.ebuild,2.08 KB, text/plain)
2008-03-16 01:03 UTC, Gautam Iyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tport 2008-02-25 23:55:57 UTC
when i'm on battery with my laptop using tuxonice-sources and acpid-1.0.6-r1 syslog reports an acpi-battery-event every 2 seconds. then it executes the /etc/acpi/actions/lm_battery.sh but this is done about 30 times a minute...

Reproducible: Always

Steps to Reproduce:
1.tuxonice-2.6.24 and acpid-1.0.6-r1 should be installed (amd64 here)
2.start /etc/init.d/acpid
3.look how acpid spams your syslog full of event-reception every 2 seconds

Actual Results:  
syslog is full of acpid-messages and acpi-action-scripts are executed every 2 seconds

Expected Results:  
no battery event every 2 seconds should be reported
Comment 1 Richard Scott 2008-03-05 14:43:55 UTC
I have this on a HP laptop. I figured it was because my laptop was charging?
Comment 2 tport 2008-03-05 22:58:30 UTC
well the problem here also is on a hp laptop, but as mentioned, its when i'm running on battery and doesn't happen when i'm on ac_power, so no problem when charging
Comment 3 Gautam Iyer 2008-03-14 23:59:27 UTC
Created attachment 146178 [details, diff]
Patch to supress log messages with a -q option
Comment 4 Gautam Iyer 2008-03-15 00:00:33 UTC
Created attachment 146179 [details]
Ebuild to use the above patch
Comment 5 Gautam Iyer 2008-03-15 00:05:03 UTC
Hi Guys,

I don't think this is an acpid bug. Some laptops have their bios wired this way, and generate an acpi battery event every so often. (Mine generates one every 30 seconds).

The part that *is* a bug is that acpid provides no mechanism to suppress the informational messages. (With a 5 line log message every 30 seconds, my log file gets cluttered with some 1200 useless lines when I work unplugged. Worse still, this logging causes the hard disk to wake up on each battery event, which is *certainly* undesirable)

So I attach a patch that adds a -q option. In this case acpid will not log informational messages.

GI

PS: Patch also submitted upstream.
Comment 6 Gautam Iyer 2008-03-16 01:02:18 UTC
Created attachment 146258 [details, diff]
Patch against acpid-1.0.6 to bring it to CVS 2007-11-25
Comment 7 Gautam Iyer 2008-03-16 01:03:54 UTC
Created attachment 146260 [details]
Ebuild to use the above patch

Note: The above ebuild expects the patch to be bzipped. I posted the unzipped version for easy online viewing.
Comment 8 Gautam Iyer 2008-03-16 01:05:57 UTC
Comment on attachment 146258 [details, diff]
Patch against acpid-1.0.6 to bring it to CVS 2007-11-25

Looks like this issue was fixed in the CVS repository of acpid. (The fix is a little nicer than my patch).

I attach the patch (directly from upstream), and an ebuild to use it.
Comment 9 Gautam Iyer 2008-03-18 20:36:23 UTC
I found out that on my system the flood of ACPI battery events is generated because of a DSDT bug! See http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems

When I fixed my DSDT, ACPI events get generated only when the battery level changes by a percent (increase or decrease), which is pretty nice (and does not wreak havoc on my log files).

Regardless, it is nice that the new acpid provides an option to suppress these log messages,

GI
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2010-03-31 20:41:38 UTC
acpid-2.0.3 is in tree now, and I see something similar to this applied there. so closing as fixed by 2.0.3, please open new bug if you still have issues with it.