Is it expected for the battery to discharge when it has more charge than charge_control_end_threshold?

When I set charge_control_end_threshold to a value lower than 100; e.g. 80, my expectation is that if battery is charging, it should stop charging at 80. But, I expect the laptop to use AC power when it is connected and battery level is above 80. However, that’s not how it works. For example when battery is full, and I set the end threshold to 80, the battery actually starts discharging until it reaches 80.

To be honest, I’m not sure if macOS behaves the same, so I don’t know if it is a hardware design or it is specific to Fedora. If it is Fedora specific, I wonder if it can be fixed?

To be honest, I’m not sure if macOS behaves the same, so I don’t know if it is a hardware design or it is specific to Fedora.

I have macOS. Could you elaborate on how I would test this to answer your question?

This is firmware behavior and working as designed. It is actually a good idea in many cases, since otherwise accidentally charging your battery to 100% and then using the machine on AC power could potentially leave the machine at 100% for a very long time, which defeats the purpose of an 80% charge limit. The battery suffers higher wear just by existing at a higher charge level/voltage, especially when the machine is warm. It’s not about charging. One of the major use cases for this kind of charge limit is to significantly reduce the battery wear for machines that are always plugged in, and for those, not having this discharge behavior would defeat the whole point, since it’s very likely you’ll accidentally charge to 100% at some point and then you’d be stuck there.

You cannot test this easily in macOS, because it doesn’t have a direct control over the firmware flag like this. Instead it does some smart charging stuff to decide when to switch to 80% mode.

Well, so it’s firmware behaviour :(. Thanks.

I agree that it can be a good thing at times, but I’m not a fan of not being in control of it, since many times I do have plans to use the battery anyway, but I also don’t want it to be charged to 100% if it is for example 90% full. I prefer to be in control, but, well, I can live with this too :slight_smile:

You can manually control the charge behavior with the charge_behaviour file, but you will have to implement polling/thresholding yourself then, and obviously that can’t work while the machine is in sleep or powered off. The firmware only supports a fixed 80% charge threshold, and that is what the driver exposes.

1 Like

Thanks! I’ll take a look.