I have a Dell Precision 5510 laptop. I recently replaced the battery as I was having this issue, but the issue persisted with the replacement.
In the OS (originally with Win10, but then later with Linux), the battery would read out at 100% shortly after unplugging it, then fairly quickly would decline through the 90's (within 1-2 minutes) and then immediately asking me to plug in the power supply just before powering.
Here's the bugger. When I do the same thing while on the battery screen in BIOS, the laptop will run for nearly two hours. Then take a couple of hours to charge back up, unplug, and last another two hours. So then, I charge it back up, boot into Ubuntu, unplug - two minutes tops before it shuts down.
I fresh-installed OSes, I tried power calibration routines. Nothing is helping so far. BIOS is good. OS is bad.
power-calibrate
utility and in Windows I usedSmarter Battery
. Both seemed to think there was plenty of life left in the battery (90th+ percentile).