On older Compaq/HP machines the battery interfacing/monitoring was carried out by the i8042 keyboard controller. This interfaced with the embedded microcontroller in the battery pack. Not sure if it's still done this way on current laptops.

Check for manufacturer's firmware updates relating to the keyboard controller, they may also re-flash the battery microcontroller.

Perhaps you are using a clone battery?