Score:0

Ubuntu thinks battery has no change, but windows detects it as fully charged

cn flag

I have Windows and Ubuntu (20.04.6, kernel 5.4.0-144-generic) dual boot on an HP Spectre x360 laptop. A couple of months ago I replaced the battery with a non-official one as the old battery had lost capacity, which all worked fine. Then about a week ago Ubuntu suddenly stopped detecting the battery as charged, it always shows the empty battery symbol with 'Estimating...', and the laptop will shut down after a few seconds when not plugged in. Also, when I first turn on the laptop, I get an official warning from HP that the battery has no capacity, see image.enter image description here

However, windows detects the battery charge absolutely fine, and everything works totally as normal on it (I can run it for hours on battery power), so I know that this is not a problem with the battery itself. Somehow the HP battery detection mechanism and Ubuntu are misreading things, but Windows isn't. Anyone have any ideas of how to fix it?

Things I have tried:

Score:1
cn flag

I managed to fix this by letting the battery drain completely while using windows until the laptop shut itself down. When I restarted the problem was fixed. So draining the battery must have reset something.

Score:1
us flag

There are a few key things to understand here.

First, this message does not appear to be coming from Ubuntu. It may be in HP's BIOS. Maybe the reason it doesn't appear when you boot windows is due to Windows' fast boot feature or something.

Secondly, when Windows is reporting that the battery is fully charged it is reporting on something different. This is the difference between battery charge and battery usable capacity. A battery can be 100% charged, but deterioration since manufacturer could mean that at 100% charge it's only around 60% as much as when the battery was new. That's the difference between charge level and usable capacity level.

So, this message is indicating that the usable capacity of the battery has dropped, to such a degree that it's indicative of poor performance of the battery and possible continuing deterioration, so it should be replaced to return to best operation.

However, you also said that the battery was replaced with an aftermarket (ie, non-HP) battery.

This means that all bets are off in regard to the usable capacity rating, and you can't trust that what it's telling you is accurate or is just a result of the aftermarket battery not confirming to the same way of reporting things as an official battery. So there is not necessarily cause for concern.

The non-official battery may have a poorer capacity than the original (and may not even live up to its own claimed capacity) but this doesn't mean it's due to damage or degradation, and either way, your laptop has no way of measuring this properly as it can only trust what it knows about the battery, and the battery is pretending to be something it isn't.

Some aftermarket batteries do a better job than others about reporting information to the host computer, but you don't have assurance.

As long as the battery is working to satisfy you, there's not necessarily any problem at all. Though, if this error message is coming repeatedly and that's annoying you, then you probably should contact whoever sold you that battery as you ought to expect that even if a battery is not fully compatible or doesn't report its usable capacity correctly, it should at minimum not result in consistent error messages every boot!

Collierre avatar
cn flag
Sorry I don't think I was clear in my post about a few things, I'll clarify here then edit my post: - Yes the message doesn't seem to come from Ubuntu, it appears before GRUB (and I boot to windows from GRUB too). - On Ubuntu the laptop shuts down after a few seconds when unplugged from power, therefore it's definitely not working satisfactorily for me. - On Windows I've left the laptop running for hours on battery power and it works fine, so it definitely has capacity.
us flag
That does seem odd. I still get the feeling the issue is somehow a BIOS/UEFI issue, obviously the confusing part is that this is not happening when you boot Windows. Are both Windows and Ubuntu configured to boot in UEFI mode?
Collierre avatar
cn flag
Yes they both boot in UEFI mode. I agree it's very odd that the HP internal tool and Ubuntu both (wrongly) read the battery as out of capacity, only Windows is correct.
Collierre avatar
cn flag
Ok I've managed to fix it, see my answer. Thanks for your help!
us flag
Good to hear + thanks for adding it as an answer
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.