Recently, the laptop switches off automatically when the battery is running at around 40 percent remaining battery. What can I do?

Ba
2

Recently, the laptop switches off automatically when the battery is running at around 40 percent remaining battery. What can I do?

We

Calibrate the battery level in the OS or change the battery.

Ba

Thanks for calibrating, I tried the battery now only charges up to 99 percent and then stops, but probably need the 100 percent for calibrating if I understood correctly. Changing the battery is not possible, it seems to be permanently installed.

Another question, could I just leave the laptop running on mains power all the time?

It runs for me about 3 hours a day.