fwupd / firmware-lenovo

Missing firmware for Lenovo Thinkpad hardware
116 stars 4 forks source link

ThinkPad P14s Gen 2a battery at 240% #412

Open anayrat opened 5 months ago

anayrat commented 5 months ago

Hello, Last year I updated laptop firmware and since then, the battery show 240% capacity. I tried to recalibrate it by discharging to 0% and recharging, but the full capacity is still at 240%:

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                5B10W51826
  serial:               2132
  power supply:         yes
  updated:              Fri 19 Jan 2024 03:55:11 PM CET (22 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               charging
    warning-level:       none
    energy:              65.29 Wh
    energy-empty:        0 Wh
    energy-full:         121.21 Wh
    energy-full-design:  50.5 Wh
    energy-rate:         35.92 W
    voltage:             12.119 V
    charge-cycles:       50
    time to full:        1.6 hours
    percentage:          53%
    capacity:            100%
    technology:          lithium-polymer
    icon-name:          'battery-good-charging-symbolic'

The energy-full is two times larger than the real capacity. I looked at my history:

├─Battery:
│ │   Device ID:          f95c9218acd12697af946874bfe4239587209232
│ │   Previous version:   1.0.8523
│ │   Update State:       Success
│ │   GUID:               37132c80-5c8b-4726-a502-6f8c456da9b4
│ │   Device Flags:       • Internal device
│ │                       • Updatable
│ │                       • System requires external power source
│ │                       • Needs a reboot after installation
│ │                       • Reported to remote server
│ │                       • Device is usable for the duration of the update
│ │ 
│ └─(null) Update:
│       New version:      1.1.10246
│       License:          Unknown
│       Description:      
│       The vendor did not supply any release notes.

I didn't have any issue during the update.

Thanks

joaquinco commented 2 months ago

The same happens to me on a t14 gen2. It seems to be related to this battery model.

From linux-hardware.org: https://linux-hardware.org/?id=bat:lgc-5B10W51826, there are some probes that show the same numbers regarding capacity, to link a few:

anayrat commented 2 months ago

Good catch! Maybe someone from Lenovo could help us @mrhpearson ?

mrhpearson commented 2 months ago

I've flagged this to the FW team to get their advice on next steps - internal ticket LO-2999

Not sure if this will require a battery recalibration or not. We don't have an automated way of doing that in Linux (it's been on my todo for far too long ...); but if they think that's what is needed I think we can manually work through the steps.

Will update when I hear back from the team.

mrhpearson commented 4 weeks ago

Sorry for the slow reply on this one - took some back and forth with the FW team (and there was a holiday in Japan).

They're recommending doing a battery recalibration. Best way of doing this is from Windows with the Lenovo Vantage tool. If that's possible (and I know it sucks) let me know. If you do boot Windows, they wanted a screen shot of the battery details (similar to attached) so they can confirm it's not a Linux data display issue.

image006

If Windows is not an option, we can try and manually work through the calibration algorithm on Linux - but I've never done it before and it's going to be very manual and comes with no guarantees (I have a flow chart of operations to follow - and think it can be done using the battery controls). We've had getting a Linux calibration utility implemented for a long time...really need to get that done :(

anayrat commented 3 weeks ago

Hello, Thanks for your reply, unfortunately, I don't have Windows :( I already tried to discharge the battery and charge again, without success. It seems it is only a reporting issue :

upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                5B10W51826
  serial:               2132
  power supply:         yes
  updated:              Sun 02 Jun 2024 05:56:33 PM CEST (5 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    energy:              121.21 Wh
    energy-empty:        0 Wh
    energy-full:         121.21 Wh
    energy-full-design:  50.5 Wh
    energy-rate:         0 W
    voltage:             12.321 V
    charge-cycles:       53
    percentage:          100%
    capacity:            100%
    technology:          lithium-polymer
    icon-name:          'battery-full-charged-symbolic'

cat /sys/class/power_supply/BAT0/status
Full
cat /sys/class/power_supply/BAT0/capacity
100
cat /sys/class/power_supply/BAT0/capacity_level 
Full
cat /sys/class/power_supply/BAT0/energy_full
121210000
cat /sys/class/power_supply/BAT0/energy_now 
121210000
cat /sys/class/power_supply/BAT0/energy_full_design 
50500000

energy_full and energy_now are wrong.

mrhpearson commented 3 weeks ago

OK - I'll let them know. If you're interested, we can try and walk thru the recalibration process manually...depending on your willingness to be a guinea-pig. Though I guess I should try it first....I need to go and dig them up :) If you want to try it ping me off forum - mpearson-lenovo a t squebb dot ca

joaquinco commented 2 weeks ago

Followup.

I don't know what changed but full capacity is showing correct numbers now.

I upgraded my linux distro and the kernel to 6.8 a few weeks ago but that didn't fix the issue, at least immediately. And I'm pretty sure the firmware update from last month (0.1.26) didn't fix it either.

Until today I noticed it was resolved : - )

daroczig commented 2 weeks ago

Interestingly, I'm experiencing this issue only after suspend/resume :zipper_mouth_face: After a fresh boot, the energy-full and energy-full-design values are normal, but later those become inflated numbers.

mrhpearson commented 1 week ago

Interesting - not sure why that would make a difference, but asking the battery team.