Also, when I disconnect the battery Gnome warns “Battery low; approximately 3 hours 48 minutes remaining (8%)” (the reported time remaining varies, but it tends to reflect the actual charge level rather than the supposed low battery condition):
If I continue using the computer on battery power, Gnome forces a shutdown once the charge displayed charge level gets down to 1% or so, even though in reality a significant amount of charge remains on the battery.
The problem goes away when the system is rebooted, but recurs after a few hours of use following each reboot.
I’m fairly convinced this is a bug, but not sure whether it should be filed against gnome-shell or some other component, and also wondering if there is more information I can provide to help others reproduce this.
It seems to me a problem with the calibration of the battery charge on the replacement battery.
The solution I have seen that sometimes works is to force an almost complete discharge of the battery then with it installed do a full charge followed by several episodes of full charge and then run it on battery until it shuts down each time so the calibration is forced.
The discharge may require removal of the battery and discharge with it removed from the laptop.
It also may be done by a boot, then running it until it shuts down several times in a row before recharging.
I thought that might be the case at first, but /sys/class/power_supply/BAT0/charge_now shows a value that’s consistent with a full charge (it’s 99.8% of the value in /sys/class/power_supply/BAT0/charge_full). And /sys/class/power_supply/BAT0/capacity is 105. So it looks like the kernel has the correct battery state info, but Gnome is misinterpreting it.
It looks like the cause may be a bug in the upower daemon. Restarting upower with systemctl restart upower causes the Gnome battery display to immediately change to displaying the correct battery charge. I’ve opened a bug report on this at 2126240 – Incorrect battery charge indication in Gnome.