Bug 2443

Summary: Frequent short "pauses" corresponding to multiple battery events
Product: ACPI Reporter: Stephen Mollett (molletts)
Component: Power-BatteryAssignee: Shaohua (shaohua.li)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Output of acpidmp
Modified patch for 2.6.6

Description Stephen Mollett 2004-04-05 09:48:41 UTC
Distribution: Slackware-based, mostly self-built 
Hardware Environment: IBM ThinkPad 240 - Celeron Mendocino 300, 192MB RAM 
Software Environment: 
Problem Description: System "pauses" for up to a second at a time, 
approximately every 10-15 seconds when ACPI is enabled. This corresponds to a 
block of anything up to 10 "battery BAT1 00000080 00000001" events being 
generated. Running top shows "events/0" clocking up a chunk of CPU time 
corresponding to the pause duration each time it occurs. 
 
Under 2.4.25, the battery events always appear in twos. 
 
Steps to reproduce: Simply boot the system with an ACPI-enabled kernel :) I 
don't know whether it is ThinkPad 240-specific or whether other systems are 
also affected. The pauses are most noticeable when playing audio or video, but 
affect everything - when typing, characters will briefly stop being echoed "in 
real time", then the system will "catch up" when the pause ends.
Comment 1 Shaohua 2004-04-05 19:34:29 UTC
please attach the acpidmp. i want to check it. thanks
Comment 2 Stephen Mollett 2004-04-06 04:52:31 UTC
Created attachment 2522 [details]
Output of acpidmp

As requested by Shaohua
Comment 3 Shaohua 2004-05-18 18:34:02 UTC
Sorry for the later. Could you please try the patch in Bug 1433. Thanks.
Comment 4 Stephen Mollett 2004-05-20 06:12:05 UTC
Created attachment 2923 [details]
Modified patch for 2.6.6

This is basically the same patch as for Bug 1433, but fixed so it applies to
2.6.6.

It seems to fix the pauses, but there are now _no_ battery events except when
plugging in/unplugging the mains adaptor - so the battery charge level never
gets updated.

I've noticed that, with 2.6.6 (without the patch), the events only occur singly
instead of in big blocks, but the pauses still occur. Each event seems to add
about 100ms of CPU time to the events/0 process.
Comment 5 Len Brown 2004-11-15 20:51:09 UTC
still an issue in linux-2.6.9? 
Comment 6 Stephen Mollett 2004-11-16 06:42:33 UTC
The pauses no longer occur in 2.6.9, but neither are there any battery events, 
so the charge level never changes, except when the AC adapter is either plugged 
in or unplugged. 
Comment 7 Stephen Mollett 2004-12-28 14:59:05 UTC
The "stuck status" problem mentioned above is described in bug 3851, and the 
two "interrupt_based_ec" patches attached to that bug fix it in 2.6.10 (with a   
minor tweak to make them apply). The battery events then occur in identical   
pairs (like under 2.4.25 in the initial bug report) rather than large groups, 
and the "pauses" described in this bug no longer occur.