Bug 5051

Summary: Battery not recognized if removed and put back
Product: ACPI Reporter: Brice MEALIER (bricem13)
Component: Power-BatteryAssignee: Vladimir Lebedev (vladimir.p.lebedev)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.12.4 patch acpi-20050729-2.6.12.patch Subsystem:
Regression: --- Bisected commit-id:
Attachments: dsdt.aml

Description Brice MEALIER 2005-08-12 07:03:49 UTC
Distribution: Debian testing
Hardware Environment: Sony Vaio PCG-FR 215 E / Phoenix bios
Problem Description:

The battery is correctly recognized at boot, but then if I remove it and put it
back it is not recognized anymore, I have then:

[brice@TuxBox:~]$ cat /proc/acpi/battery/BAT1/state 
present:                 no
[brice@TuxBox:~]$ 



Best regards, Brice

Steps to reproduce: remove the battery and put it back
Comment 1 Luming Yu 2005-08-12 07:13:27 UTC
Please post your DSDT.
Comment 2 Luming Yu 2005-08-12 07:53:19 UTC
Strange, It works for me. My version is 2.6.13-rc5.
Comment 3 Luming Yu 2005-08-12 07:54:14 UTC
I take back comment #2, I want to put it at bug 5008. sorry.
Comment 4 Brice MEALIER 2005-08-12 08:21:50 UTC
Created attachment 5618 [details]
dsdt.aml
Comment 5 Brice MEALIER 2005-08-12 08:23:07 UTC
Please look also at bug 3750 where you can find my acpidmp output.

Regards, Brice
Comment 6 Len Brown 2005-09-08 01:33:41 UTC
Did any Linux kernel do this properly on this box, 
or has this always been broken?

is this still an issue with 2.6.13 (final)?
How about 2.6.13 + the latest ACPI patch?
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.13/
Comment 7 Vladimir Lebedev 2005-11-28 10:16:30 UTC
No response from bug submitter, please reopen if problem persists. 
Comment 8 Brice MEALIER 2005-11-28 11:57:49 UTC
Still problematic with 2.6.14

As far as I remember no kernel worked correctly.

See also bug 5305 for more information. Battery has always been the problem on
my box.

Regards, Brice
Comment 9 Vladimir Lebedev 2006-01-11 00:58:45 UTC
Please try this patch:
http://bugzilla.kernel.org/attachment.cgi?id=6886&action=view
This patch is implemented for both ac and battery notification issues.

If the problem persists could you try reload the battery module to see
if the battery will appear or not: ('rmmod battery' and 'modprobe battery')
Comment 10 Vladimir Lebedev 2006-01-18 00:58:05 UTC
Brice,

Please confirm that the patch 4588 and my patch solved the problems of ac 
adapter and battery.

Vladimir.
Comment 11 Brice MEALIER 2006-01-18 01:15:50 UTC
Sorry for this but if you want me to confirm which patch is working you have to 
tell me which I should use!

There are currently 2 patches in 4588 and one other concerning the ac events in 
5305 and one other for the ac events here....

I am confused! As we are apparently working on all these issues inside 3 bugs 
it would be fine to close to of them AND to refer them to the one we leave open.

I am aware of your work and would like to thank you for that, I am ready to 
take the time needed for testing purposes but please tell me exactly what I 
should test against *vanilla* 2.6.15 (give me the attachement numbers, it will 
facilitate us the whole stuff).


Best regards, Brice
Comment 12 Vladimir Lebedev 2006-01-18 09:09:16 UTC
Brice,

The patches from #4588 were implemented in linux-2.6.16-rc1-mm1 release.
The patch to which the #5305 refers is exactly the same as patch from current 
bug (5051).
Bugs #4588 on one hand and both event's bugs on the other hand (#5081 and 
current bug #5051) are from two different areas, I mentioned #4588 patches 
because you also mentioned them in #5505 (I mean the all ac/battery problems 
resolving).
So, could you check it please on linux-2.6.16-rc1-mm1 plus the patch?
http://bugzilla.kernel.org/attachment.cgi?id=6886&action=view (current comment 
#9)
So the main question here is: does this patch (comment #9) work. I mean ac and 
battery plugging/unplugging?

Best Regards.
Vladimir.

Comment 13 Brice MEALIER 2006-01-18 10:09:12 UTC
Hello

I compiled the last kernel 2.16.6-rc1 with the patch given in comment 9 and
rebooted. The battery was not recognized at boot! So not working...

Previously I recompiled a 2.6.15 with the patch in comment 9 and the last in
4588. The battery was recognized at boot.

In both cases the ac and batt events were the same as the ones I gave in 5305.

Best regards, Brice
Comment 14 Vladimir Lebedev 2006-01-18 22:39:55 UTC
Brice, I wrote about linux-2.6.16-rc1-mm1 (MM1) but not about linux-2.6.16-rc1

So if you use linux-2.6.15 plus last patch in 4588 and patch from comment #9, 
does the battery information appear in /proc/acpi/battery/*/* files after 
battery unplugging/plugging.
If not could you try reload the battery module to see whether the battery 
information will appear or not: ('rmmod battery' and 'modprobe battery')

Thanks.
Vladimir.
Comment 15 Brice MEALIER 2006-01-19 00:08:20 UTC
Sorry

where can I find 2.6.16-rc1-mm1 ?

I give you the results concerning 2.6.15 later today.


Best regards, Brice
Comment 16 Vladimir Lebedev 2006-01-19 07:04:10 UTC
This patch '2.6.16-rc1-mm1' for linux-2.6.16-rc1 is located in the same side -
 'kernel.org', see the bottom of kernel's list.
You can donwload 
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc1/2.6.16-
rc1-mm1/2.6.16-rc1-mm1.bz2 and patch the linux-2.6.16-rc1 tree,

Best Regards.
Vladimir.
Comment 17 Brice MEALIER 2006-01-19 13:22:56 UTC
>So if you use linux-2.6.15 plus last patch in 4588 and patch from comment #9, 
>does the battery information appear in /proc/acpi/battery/*/* files after 
>battery unplugging/plugging.


It works fine! for 2.6.16-rc1-mm1, I'll give you the results tomorrow.

Best regards, Brice