Pc shutdown suddenly and battery indicator not working

Hey guys.I am facing this weared issue with my pc battery and that is that it shutdowns suddenly when i dont have the power cable plugged in.It shutsdown when it is around 50% battery (as shown the the top bar). I dont get any prompts that my battery is too low.I had this problem in windows too but couldnt fix it.Should i go for a battery replacement?

Hello RohanJnr,
Shut down your PC. Remove the battery. Run the unit with Battery removed. If you can not duplicate the shut down issue while running on the AC Adapter, replace your battery.

Cheers, Vince

You can run inxi -Bxxx from the terminal. It will give you some information about your battery.

Pay attention to the condition line.

Hope

also check your motherboard bios settings to see if you can change your fan speeds to lower temp in case the shutdown is temp related.

Charging a battery increasing the temp of the battery which will impact on temps in general.

I no longer own a laptop so feel free to ignore me

Here is the result of that command

It looks like that battery still has some life left in it.

I'd recommend checking to see if there is a BIOS update available for that laptop.
The recommendation from @aus9 of giving the fan a good cleaning is also a idea.

Since this issue occurred with both Windows and Ubuntu MATE I tend to believe we are not looking at an OS issue.

Can u guide me through? Idk how to do it, I mean how to check if there is bios update

You would need to go to HP's website and search for you particular model laptop to find out what the current BIOS is available.

You can boot into your system's BIOS. As soon as your system powers on you should press the keyboard key necessary to enter the system's BIOS. This will be something like F2, F6, or F12 depending on your particular system.

You can see what version your system's BIOS version is then. It will usually be on the first BIOS screen.

For example:

image

the bios update is for windows but i switched to linux

Unfortunately HP does not seem to provide a BIOS update for that system outside of the Windows version. You could try to contact HP directly and see if they have an unlisted BIOS updater, likely a lost cause.

Sadly the best option if you want to try and update the BIOS on this system may be to install Windows to an external drive just to run the BIOS update.

I did find this on the HP support site about testing the battery while in the UEFI tools. I'm not sure if your model supports this but take a look at the support article below and see if you have an option similar on your system. Section to look at is Testing the battery before Windows starts

https://support.hp.com/us-en/product/hp-15-f300-notebook-pc-series-touch/8961458/model/8788168/document/c04700771