With installation of a new battery in an HP Elitebook 8540w, an issue arises when the connected charger is disconnected from mains power. The computer with no warning immediately shuts down. It does not occur when the charger is disconnected from the laptop first.
The problem is unlikely to be OS related as it can be forced to occur even when the the boot menu is displayed.
More specifically the shutdown occurs when the battery is full, if it is charging from part-full, the problem does not occur.
When the computer is in hibernate mode, the issue does not occur, when it is fully powered, it does, even if only up to the boot screen.
This is a high-priority issue as I work in places where mains power is intermittent, for periods longer than when the battery itself can sustain the device.
The first solution that appears to have worked for one of these two identical computers is a BIOS update. That machine no longer has the fault. The second machine retains the fault even after upgrade.
The first machine had its BIOS upgrade done via USB stick, the second used the HP Windows utility.
This is the original question that arrived at a tentative solution that proved not to work.
Hibernate or On | Low/high voltage pulled first | Battery at partial/full charge : Fault?
Hib | LV | P : No
Hib | LV | F : No
Hib | HV | P : No
Hib | HV | F : No
On | LV | P : No
On | LV | F : No
On | HV | P : No
On | HV | F : Yes