Bug 117431 - 2nd battery swap not detected - Lenovo x260
Summary: 2nd battery swap not detected - Lenovo x260
Status: CLOSED DUPLICATE of bug 81051
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-30 19:08 UTC by Michael Niewoehner
Modified: 2016-05-16 21:16 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.6-rc4, 4.6-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
acpidump (518.24 KB, application/octet-stream)
2016-05-03 10:13 UTC, Michael Niewoehner
Details
1_bat_noac_before.txt (7.35 KB, text/plain)
2016-05-03 10:13 UTC, Michael Niewoehner
Details
2_bat_removed.txt (7.35 KB, text/plain)
2016-05-03 10:14 UTC, Michael Niewoehner
Details
3_bat_reattached_notdetected.txt (7.35 KB, text/plain)
2016-05-03 10:14 UTC, Michael Niewoehner
Details
4_attached_ac_batdetected.txt (7.35 KB, text/plain)
2016-05-03 10:14 UTC, Michael Niewoehner
Details

Description Michael Niewoehner 2016-04-30 19:08:04 UTC
OS:     Arch Linux
Kernel: 4.6-rc6
System: Lenovo x260 (Intel i5)

The Lenovo x260 has two batteries, one internal and one external.
Both batteries are detected on boot and are shown by XFCE power manager and are visible in /sys/class/power_supply as BAT0 (PNP0C0A:00) and BAT1 (PNP0C0A:01).

When removing the external battery it disappears as expected.
Plugging it in again is also detected.
As soon as I remove and reinsert the battery again the kernel isn't detecting the battery anymore.

I also can't bind it manually:
$ echo PNP0C0A:01 >/sys/class/power_supply/BAT0/device/driver/bind
bind: No such device

When I attach the AC cable then remove and reinsert the battery it gets detected again.

dmesg output:
[ 3287.058081] ACPI: \_SB_.PCI0.LPC_.EC__.BAT1: undocking
[ 3311.280039] thinkpad_acpi: EC reports that Thermal Table has changed
[ 3315.482916] ACPI: \_SB_.PCI0.LPC_.EC__.BAT1: docking
[ 3315.498531] ACPI: Battery Slot [BAT1] (battery present)
[ 3328.744078] thinkpad_acpi: EC reports that Thermal Table has changed
[ 3347.603613] ACPI: \_SB_.PCI0.LPC_.EC__.BAT1: undocking
[ 3347.603971] ACPI: \_SB_.PCI0.LPC_.EC__.BAT1: undocking
Comment 1 Len Brown 2016-05-02 23:48:40 UTC
please attach the output from acpidump.

does this happen also when attach/detach the internal battery (if valid?)

do ACPI events still work after the problem occurs, ie. does
grep acpi /proc/interrupts
increment for things like power button events?

please show grep /sys/firmware/acpi/interrupts
before/after
Comment 2 Michael Niewoehner 2016-05-03 10:13:04 UTC
It is not intended to attach/detach the internal battery in running state. I would need to open the case.

ACPI events work flawlessly even after swapping the battery and the interrupts increment.

1_bat_noac_before.txt               Battery detected after boot, no AC attached
2_bat_removed.txt                   After removing battery
3_bat_reattached_notdetected.txt    Attached battery again, not detected, no AC
4_attached_ac_batdetected.txt       Attach AC, battery gets detected
Comment 3 Michael Niewoehner 2016-05-03 10:13:39 UTC
Created attachment 215051 [details]
acpidump
Comment 4 Michael Niewoehner 2016-05-03 10:13:59 UTC
Created attachment 215061 [details]
1_bat_noac_before.txt
Comment 5 Michael Niewoehner 2016-05-03 10:14:18 UTC
Created attachment 215071 [details]
2_bat_removed.txt
Comment 6 Michael Niewoehner 2016-05-03 10:14:33 UTC
Created attachment 215081 [details]
3_bat_reattached_notdetected.txt
Comment 7 Michael Niewoehner 2016-05-03 10:14:48 UTC
Created attachment 215091 [details]
4_attached_ac_batdetected.txt
Comment 8 Michael Niewoehner 2016-05-11 10:38:51 UTC
Same problem as on T440s - the hardware switch does not always work...
Moving the eject slider once again after changing the battery it gets detected.

*** This bug has been marked as a duplicate of bug 81051 ***

Note You need to log in before you can comment on or make changes to this bug.