You are not logged in.

#1 2018-03-06 16:10:28

ashton
Member
Registered: 2018-03-06
Posts: 6

Thinkpad X270 - Battery state unknown

I just installed Arch on my X270 last night and am encountering a weird issue where both of my batteries are reported as state "Unknown". The battery work, they are able to charge and run the machine (though when on battery they show as state "Battery"), but it does not seem to actually acknowledge that there is a charger connected (despite the fact that the batteries charge just fine).

Here is the output from /sys/class/power_supply/BAT*/status:

[mercury][~][1] -> cat /sys/class/power_supply/BAT0/status
Discharging
[mercury][~][0] -> cat /sys/class/power_supply/BAT1/status
Unknown

uname -a:

Linux mercury 4.15.7-1-ARCH #1 SMP PREEMPT Wed Feb 28 19:01:57 UTC 2018 x86_64 GNU/Linux

This previously has worked fine on other distros (Ubuntu 16.04, specifically). I'm wondering if I'm missing a package or driver. I did not install anything power related other than powertop (which works fine). Suspend also works great (more reliable than Ubuntu, so far).

Any suggestions?

EDIT: This is on battery. BAT0 is approximately 91%. BAT1 is down to 5%.

Last edited by ashton (2018-03-06 16:12:50)

Offline

#2 2018-03-06 16:47:31

r4ptor
Member
Registered: 2012-12-30
Posts: 43

Re: Thinkpad X270 - Battery state unknown

The fact that one battery is discharging, the other one is unkown is normal I think. At least I get the same result for the T470.
The thinkpad will discharge the "external" battery, so BAT1 first. If this battery is empty it will continue to discharge BAT0. Hence the unknown state from BAT0 while BAT1 is discharging, since the battery isn't doing anything.

Have a look at the TLP package, this should get you some more details.
In my configuration(currently on battery mode) it looks like this:

--- TLP 1.1 --------------------------------------------

+++ ThinkPad Battery Features
tp-smapi   = inactive (unsupported hardware)
tpacpi-bat = active

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = SANYO
/sys/class/power_supply/BAT0/model_name                     = 01AV419
/sys/class/power_supply/BAT0/cycle_count                    =     55
/sys/class/power_supply/BAT0/energy_full_design             =  24020 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  19780 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  18620 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Unknown (threshold effective)

tpacpi-bat.BAT0.startThreshold                              =     85 [%]
tpacpi-bat.BAT0.stopThreshold                               =     95 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Charge                                                      =   94.1 [%]
Capacity                                                    =   82.3 [%]

+++ ThinkPad Battery Status: BAT1 (Ultrabay / Slice / Replaceable)
/sys/class/power_supply/BAT1/manufacturer                   = SANYO
/sys/class/power_supply/BAT1/model_name                     = 01AV427
/sys/class/power_supply/BAT1/cycle_count                    =      3
/sys/class/power_supply/BAT1/energy_full_design             =  71280 [mWh]
/sys/class/power_supply/BAT1/energy_full                    =  74370 [mWh]
/sys/class/power_supply/BAT1/energy_now                     =  56540 [mWh]
/sys/class/power_supply/BAT1/power_now                      =   8094 [mW]
/sys/class/power_supply/BAT1/status                         = Discharging

tpacpi-bat.BAT1.startThreshold                              =     85 [%]
tpacpi-bat.BAT1.stopThreshold                               =     95 [%]
tpacpi-bat.BAT1.forceDischarge                              =      0

Charge                                                      =   76.0 [%]
Capacity                                                    =  104.3 [%]

+++ Charge total                                            =   79.8 [%]

As you can see, BAT1 is getting discharged and BAT0 is unknown.

Also the battery controller can only charge or discharge one battery at a time. Because of this, you will have to run for example tlp recalibrate twice(once for each battery). Therefore I can assume the battery controller can only report the current state of one battery at a time.

Last edited by r4ptor (2018-03-06 16:48:53)

Offline

#3 2018-03-06 19:43:15

esonn
Member
From: Austria
Registered: 2015-10-01
Posts: 54

Re: Thinkpad X270 - Battery state unknown

Maybe unrelated, but the dual batteries of my somehow older x250 report just fine fine, independently from another (without special tweaks).


Anyone who quotes me in their sig is an idiot. -- Rusty Russell

Offline

#4 2018-03-07 00:27:28

ashton
Member
Registered: 2018-03-06
Posts: 6

Re: Thinkpad X270 - Battery state unknown

esonn wrote:

Maybe unrelated, but the dual batteries of my somehow older x250 report just fine fine, independently from another (without special tweaks).

This is why I ask, because Ubuntu used to show either BAT, CHR or FULL depending on the state for BOTH batteries (one was never unknown).

I ran tlp to get the status, and it showed the same thing. It suggested a couple of things to install (which I didn't have: tp_smapi and acpi_call. Installing these and giving the machine a reboot, however didn't solve anything. Here's the output from tlp stat, currently running on battery:

+++ ThinkPad Battery Features
tp-smapi   = inactive (kernel module 'tp_smapi' load error)
tpacpi-bat = active

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = 45N1113
/sys/class/power_supply/BAT0/cycle_count                    =     10
/sys/class/power_supply/BAT0/energy_full_design             =  23480 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  23180 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  15630 [mWh]
/sys/class/power_supply/BAT0/power_now                      =   7413 [mW]
/sys/class/power_supply/BAT0/status                         = Discharging

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Charge                                                      =   67.4 [%]
Capacity                                                    =   98.7 [%]

+++ ThinkPad Battery Status: BAT1 (Ultrabay / Slice / Replaceable)
/sys/class/power_supply/BAT1/manufacturer                   = LGC
/sys/class/power_supply/BAT1/model_name                     = 45N1127
/sys/class/power_supply/BAT1/cycle_count                    =     16
/sys/class/power_supply/BAT1/energy_full_design             =  23480 [mWh]
/sys/class/power_supply/BAT1/energy_full                    =  23550 [mWh]
/sys/class/power_supply/BAT1/energy_now                     =   1230 [mWh]
/sys/class/power_supply/BAT1/power_now                      =      0 [mW]
/sys/class/power_supply/BAT1/status                         = Unknown (threshold effective)

tpacpi-bat.BAT1.startThreshold                              =     96 [%]
tpacpi-bat.BAT1.stopThreshold                               =    100 [%]
tpacpi-bat.BAT1.forceDischarge                              =      0

Charge                                                      =    5.2 [%]
Capacity                                                    =  100.3 [%]

+++ Charge total                                            =   36.1 [%]

Offline

#5 2018-03-07 00:34:34

ashton
Member
Registered: 2018-03-06
Posts: 6

Re: Thinkpad X270 - Battery state unknown

Ok, success.

I removed "tp_smapi" (having learned it's not actually useful for the X270 anyway). In the process of this, I put the machine back on my desk and plugged in the adapter - what do you know? Now it's showing the first battery as "Charging". I can only assume once it's charged, it'll start on the other hopefully similar results.

Obviously acpi_call was the required package, because I had plugged in and unplugged the machine several times over the last day trying to determine if it just needed a state change in order to refresh it properly.

+++ ThinkPad Battery Features
tp-smapi   = inactive (kernel module 'tp_smapi' not installed)
tpacpi-bat = active

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = LGC
/sys/class/power_supply/BAT0/model_name                     = 45N1113
/sys/class/power_supply/BAT0/cycle_count                    =     10
/sys/class/power_supply/BAT0/energy_full_design             =  23480 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  23180 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  16800 [mWh]
/sys/class/power_supply/BAT0/power_now                      =  26430 [mW]
/sys/class/power_supply/BAT0/status                         = Charging

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Charge                                                      =   72.5 [%]
Capacity                                                    =   98.7 [%]

+++ ThinkPad Battery Status: BAT1 (Ultrabay / Slice / Replaceable)
/sys/class/power_supply/BAT1/manufacturer                   = LGC
/sys/class/power_supply/BAT1/model_name                     = 45N1127
/sys/class/power_supply/BAT1/cycle_count                    =     16
/sys/class/power_supply/BAT1/energy_full_design             =  23480 [mWh]
/sys/class/power_supply/BAT1/energy_full                    =  23550 [mWh]
/sys/class/power_supply/BAT1/energy_now                     =   1230 [mWh]
/sys/class/power_supply/BAT1/power_now                      =      0 [mW]
/sys/class/power_supply/BAT1/status                         = Unknown (threshold effective)

tpacpi-bat.BAT1.startThreshold                              =     96 [%]
tpacpi-bat.BAT1.stopThreshold                               =    100 [%]
tpacpi-bat.BAT1.forceDischarge                              =      0

Charge                                                      =    5.2 [%]
Capacity                                                    =  100.3 [%]

+++ Charge total                                            =   38.6 [%]

Last edited by ashton (2018-03-07 00:36:36)

Offline

Board footer

Powered by FluxBB