I think your battery needs to be replaced. It is likely not calibrated properly showing more charge than it actually has. It doesn’t have enough power when showing a certain level. Just my opinion.
So, I’ve made again a battery calibration but the problem still remains.
I’m looking for a new battery right now.
But there’s something I don’t quite understand, when the laptop doesn’t boot on the OS, why it can still boot on the BIOS and runs for a couple hours ? Does it mean that the battery doesn’t enough power delivery to boot the OS but enough to boot the BIOS ? why is it different ?
Like I said above, when the laptop turns on, I can see the grub option. If the battery is under 50%, the laptop turns off when choosing to boot on endeavourOS.
If I choose “reboot to firmware”, the laptop restart to the BIOS, and I can stay there for a while without any battery issues…
Is it a removable battery? Does it boot without the battery if plugged in?
Edit: If a removable battery. Shut down the laptop, unplug the AC adapter, and remove the battery. Hold down the power button for 15-30 seconds to drain any residual power from the capacitors. Reinstall the battery, plug in the AC adapter wait 1 minute, and try to turn it on.
Edit: I would also change the CMOS battery.
Edit: In my opinion if after doing these steps it isn’t working i would also replace the battery.
to check a bad calibration or a defect battery you could choose any entry from systemd bootmenu but do NOT press enter (stay in boot menu) and just wait to see if it turns off or boot into BIOS and just wait a couple of minutes to see if it turns off there, too.
I’ve just turned on the laptop, and it has stayed like 20 minutes in the boot menu without turning off. It has turned off right after I chose to boot on EndeavourOS. After I had to plug the laptop to boot because the battery shows 0%. It was just under 20% before the operation.