notebook is a 10 year old macbook pro without macos I installed xubuntu 24.04 in. It comes with an embedded battery.
First notebook I bought, not from apple, had a removable battery. The vendor told me to maximize its life I shouldn’t plug the battery in, unless I need it (like for traveling). This way, I’ve managed to keep the original battery in good working condition for 8 years so far.
Back to the macbook: I cannot remove the battery and constantly loading it to up to 80% and discharge it up to 20% seems ridiculous. Furthermore, this would deplete the battery even faster, I believe.
What can I do to spare the battery as much as possible?
You could try to uninstall the battery and just put an AC cable in. My laptop works like that.
just to be clear, you mean removing the battery, or do you mean using a command?
Yeah just physically opening the case and unplugging the battery. Idk, I just read MacBook Pro, I never had a Mac because I hate the company partly because of their non-repairability, so maybe you can’t even take the battery out without dissolving some glue or some shit. For all the laptops I had so far, it was just unscrewing some screws and then you can unscrew/unplug/replace the components within.