There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

How do I calibrate a new battery on Linux?

I’ve installed a new battery on my laptop, but to my surprise, the percentage of charge in the battery is at 0. Here’s the upower diagnostics:


<span style="color:#323232;">$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
</span><span style="color:#323232;">  native-path:          BAT0
</span><span style="color:#323232;">  serial:               0
</span><span style="color:#323232;">  power supply:         yes
</span><span style="color:#323232;">  updated:              Thursday 11 July 2024 09:54:55 PM (16 seconds ago)
</span><span style="color:#323232;">  has history:          yes
</span><span style="color:#323232;">  has statistics:       yes
</span><span style="color:#323232;">  battery
</span><span style="color:#323232;">    present:             yes
</span><span style="color:#323232;">    rechargeable:        yes
</span><span style="color:#323232;">    state:               pending-charge
</span><span style="color:#323232;">    warning-level:       none
</span><span style="color:#323232;">    energy:              0 Wh
</span><span style="color:#323232;">    energy-empty:        0 Wh
</span><span style="color:#323232;">    energy-full:         0 Wh
</span><span style="color:#323232;">    energy-full-design:  0 Wh
</span><span style="color:#323232;">    energy-rate:         0 W
</span><span style="color:#323232;">    charge-cycles:       100
</span><span style="color:#323232;">    percentage:          0%
</span><span style="color:#323232;">    technology:          lithium-ion
</span><span style="color:#323232;">    icon-name:          'battery-caution-charging-symbolic'
</span>

The “energy-full-design” capacity of the battery should be 70Wh, but here it is, at 0Wh. None of the statistics above (except date and time) have updated, and it’s been two days already. How do I calibrate this battery?

wildbus8979 , (edited )

This doesn’t sound like a calibration issue, but a driver issue sadly. It’s possible your new battery uses a different gas gauge IC that isn’t supported (yet).

sfera ,

I had a similar issue and had to reboot without a battery first, so the previous one was “forgotten”. It seems like the battery control is a completely separate circuit which in some cases needs to be be reset (if you have such options) or depleted so new batteries are recognized. Maybe search for such instructions for your specific laptop brand and model. HTH

XTL ,

Have you tried turning it off and on again?

velox_vulnus OP ,

The laptop? Yes, I’ve done this already. I’ve also removed the battery and the CMOS, held the power button to discharge the laptop, booted it without the battery, and then installed it again.

dr_jekell ,
@dr_jekell@lemmy.world avatar

Have you tried running the laptop down until it shuts off then charging it?

bloodfart ,

You can’t.

The laptop talks to the battery and the software you’re using tries to talk to the laptop to see what the battery says. What’s your laptop make and model, battery make and model and did you check the bios for battery configuration?

velox_vulnus OP ,

It’s a Lenovo S540-15IWL, with the MX250 dGPU. I’ve tried checking the BIOS, and there seems to be no setting for the battery in the BIOS.

bloodfart ,

Okay, clear the old upower data stored in your computers /var/lib/upower/ directory with rm /var/lib/upower/* then restart the upower service or just restart your computer.

TeddyKila ,

Useful info ty

MangoPenguin ,
@MangoPenguin@lemmy.blahaj.zone avatar

It reads that data direct from the batteries BMS hardware, I don’t think battery calibration has been a thing since NiCD/NiMH days in the 90s and stuff.

velox_vulnus OP ,

I’m not even sure what kind of behavior is this from a battery - it blinks even when I put in the charger, however it has stopped blinking since the time I’ve put in the charger for almost more than a day. But the value is still at zero - and ironically, it does not shut down immediately - maybe after two-five hours? Is the PCB a goner?

MangoPenguin ,
@MangoPenguin@lemmy.blahaj.zone avatar

Hmm possibly a connector from the battery to motherboard that didn’t fully seat?

Or if it’s an aftermarket battery maybe it doesn’t have the right hardware in it to talk to the computer or something.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • lifeLocal
  • goranko
  • All magazines