Bug 8768
Summary: | ACPI battery power indicator jumps from $ACTUAL % to 0% and back | ||
---|---|---|---|
Product: | ACPI | Reporter: | Christian Iversen (chrivers) |
Component: | Power-Battery | Assignee: | Alexey Starikovskiy (astarikovskiy) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla, vladimir.p.lebedev |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.20-15-lowlatency (ubuntu 7.04) | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
ACPI dump of the offending laptop
Output of dmidecode for the laptop Sync battery accesses patch vs 2.6.23-rc1 |
Description
Christian Iversen
2007-07-16 09:14:40 UTC
Created attachment 12054 [details]
ACPI dump of the offending laptop
Created attachment 12055 [details]
Output of dmidecode for the laptop
I forgot to mention - I have experienced the exact same problem on several older vanilla kernels. They didn't give very good acpi debug msgs though (acpi debug msg not enabled?), so I never quite could link the acpi errors with the battery indicator problem. I have also confirmed that these errors do in fact happen at the exact same time that the power warning pops up. There seems to be a 1:1 correlation between acpi exception and power warning. Quite likely, the exception makes acpi report that the battery is 0% charged, which gives the warning. Created attachment 12060 [details]
Sync battery accesses
Please check if the attached patch make difference.
I'm sorry, it doesn't. It doesn't even compile! ;-) However, after patching the patch, with the following patch-patch, it works. And it works perfectly! --- battery.c 2007-07-21 23:48:41.000000000 +0200 +++ battery.c~ 2007-07-21 21:43:31.000000000 +0200 @@ -765,7 +765,7 @@ acpi_battery_notify); acpi_battery_remove_fs(device); - mutex_destroy(&battery->lock); + mutex_destroy(&mutex->lock); kfree(battery); return 0; (I hope CODE_FIX is the state for this bug report now?) Sorry, that patch was -R, but I'm 100% sure you get the point :-) Thanks :) patch applies to 2.6.22, but not to 2.6.23 Does 2.6.23 not have this problem, or does the fix not work for it? Created attachment 12241 [details]
patch vs 2.6.23-rc1
This refreshed patch from Alexey is applied to acpi-test.
Please verify it works with 2.6.23-rc1.
Len, Patch from comment #10 is wrong. a) kernel memory can be corrupted - kfree/kzalloc of common data are called now without synchronization. b) I think this patch is not needed at all - the synchronization in 2.6.23 is done. Please verify it works with latest 2.6.23-rc without patching. patch in comment #10 reverted from acpi-test patch in comment #10 reverted from 2.6.23-rc3-git9 closed. |