You are not logged in.

#1 2020-04-27 08:56:42

pepijndevos
Member
Registered: 2014-02-02
Posts: 22

Thinkpad p1 gen 2: bogus battry status

On my Thinkpad p1 gen 2 with the latest Gnome, the batters status is completely useless.
When it is on the charger it always says "estimating", when I then unplug it the battery level is completely useless.
It can claim 20% (6 hours) or 100% (2 minutes), with the former being more common.

The only time it seems to be more or less correct is when I've been using it, and then turn it on while on AC power, only then does it actually show a reasonable battery level and time until full.

This issue has been present ever since I got the laptop over half a year ago, so it's not a regression in any particular recent version of Gnome or Linux.
I don't particularly care about the indicator, but I do care about not slowly destroying my battery with improper charging.

I'm a software dev, so I'm quite comfortable diving deep on the cause of this bug, but I'm honestly not sure what components are in play here.
Is it Gnome, some daemon, the kernel, the bios, the hardware, or a combination of those? I don't know.

My only thought is comparing the output of /sys/class/power_supply/BAT0/ with what Gnome reports, but this morning is one of the rare cases where it's charging correctly after use.
I would appreciate any advice on how to debug/report/fix this issue.

Offline

#2 2020-04-27 10:32:11

olantwin
Member
Registered: 2014-05-21
Posts: 33

Re: Thinkpad p1 gen 2: bogus battry status

I experience something similar on my X1 Carbon Gen 7, however only quite recently (maybe a few weeks).

I tried downgrading different packages, but agree that this does not seem directly linked to any individual package.
Mysteriously charging and the battery status seem to occasionally work normally, giving sensible estimates.

I have yet to find any pattern as to when it works and doesn't work.

There are some battery related posts on the Lenovo forums, which indicate that there might be some hardware issues among newer Thinkpad models.

Sorry that I can't be of much help!

Offline

#3 2020-05-05 08:57:49

pepijndevos
Member
Registered: 2014-02-02
Posts: 22

Re: Thinkpad p1 gen 2: bogus battry status

This is definitely a kernel (or hardware??) problem. Unfortunately I no longer dualboot another OS to compare. If it were a hardware issue, Windows would be affected too.
Anyway, I logged the sys info after using it on battery for a while, and then directly after plugging in.

On battery:

/sys/class/power_supply/BAT0/alarm:34000
/sys/class/power_supply/BAT0/capacity:100
/sys/class/power_supply/BAT0/capacity_level:Normal
/sys/class/power_supply/BAT0/charge_start_threshold:0
/sys/class/power_supply/BAT0/charge_stop_threshold:100
/sys/class/power_supply/BAT0/cycle_count:20
/sys/class/power_supply/BAT0/energy_full:680000
/sys/class/power_supply/BAT0/energy_full_design:1040000
/sys/class/power_supply/BAT0/energy_now:680000
/sys/class/power_supply/BAT0/model_name:5B10V98091
/sys/class/power_supply/BAT0/power_now:14405000
/sys/class/power_supply/BAT0/present:1
/sys/class/power_supply/BAT0/serial_number:32792
/sys/class/power_supply/BAT0/status:Discharging
/sys/class/power_supply/BAT0/technology:Li-poly
/sys/class/power_supply/BAT0/type:Battery
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_NAME=BAT0
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_STATUS=Discharging
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_PRESENT=1
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_TECHNOLOGY=Li-poly
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CYCLE_COUNT=20
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_MIN_DESIGN=15360000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_NOW=14775000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_POWER_NOW=14405000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_FULL_DESIGN=1040000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_FULL=680000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_NOW=680000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY=100
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY_LEVEL=Normal
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_MODEL_NAME=5B10V98091
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_SERIAL_NUMBER=32792
/sys/class/power_supply/BAT0/voltage_min_design:15360000
/sys/class/power_supply/BAT0/voltage_now:14775000

On AC right after:

/sys/class/power_supply/BAT0/alarm:3490000
/sys/class/power_supply/BAT0/capacity:31
/sys/class/power_supply/BAT0/capacity_level:Normal
/sys/class/power_supply/BAT0/charge_start_threshold:0
/sys/class/power_supply/BAT0/charge_stop_threshold:100
/sys/class/power_supply/BAT0/cycle_count:2580
/sys/class/power_supply/BAT0/energy_full:69800000
/sys/class/power_supply/BAT0/energy_full_design:328150000
/sys/class/power_supply/BAT0/energy_now:21730000
/sys/class/power_supply/BAT0/power_now:48146000
/sys/class/power_supply/BAT0/present:1
/sys/class/power_supply/BAT0/serial_number:32797
/sys/class/power_supply/BAT0/status:Charging
/sys/class/power_supply/BAT0/technology:Li-poly
/sys/class/power_supply/BAT0/type:Battery
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_NAME=BAT0
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_STATUS=Charging
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_PRESENT=1
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_TECHNOLOGY=Li-poly
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CYCLE_COUNT=2580
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_MIN_DESIGN=8991000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_VOLTAGE_NOW=16211000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_POWER_NOW=48146000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_FULL_DESIGN=328150000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_FULL=69800000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_ENERGY_NOW=21730000
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY=31
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_CAPACITY_LEVEL=Normal
/sys/class/power_supply/BAT0/uevent:POWER_SUPPLY_SERIAL_NUMBER=32797
/sys/class/power_supply/BAT0/voltage_min_design:8991000
/sys/class/power_supply/BAT0/voltage_now:16211000

These numbers are completely bonkers. A few things that stand out to me:
During discharging, energy_full is equal to energy_now. On AC power, energy_full remains the same, but both energy_now and energy_full_design jump up by a lot.
LIKE, THE DESIGN CAPACITY CHANGES! As does the voltage_min_design by the way...
The last thing I notice is that the cycle count changes between 20 and 2580!
Both seem completely unreasonable for a laptop of a few months old. I'm actually more inclined to believe the 20 than the 2580, because I mostly use it on AC power.

In short: the numbers reported by the kernel are completely nuts.
I hope some piece of firmware with more sane numbers is managing battery charging, or this seems really bad.
Unless anyone has anything to say about the matter, I'll probably open an issue on the kernel tracker.
I just need to figure out which kernel module is in charge of this stuff.

Offline

#4 2020-05-09 17:28:22

rosseba
Member
Registered: 2019-09-13
Posts: 17

Re: Thinkpad p1 gen 2: bogus battry status

olantwin wrote:

I experience something similar on my X1 Carbon Gen 7, however only quite recently (maybe a few weeks).

I tried downgrading different packages, but agree that this does not seem directly linked to any individual package.
Mysteriously charging and the battery status seem to occasionally work normally, giving sensible estimates.

The same for me, another X1 Carbon 7th Gen, with latest packages and kernel v5.6.11

-f

Offline

Board footer

Powered by FluxBB