Recently a mockup was posted for the power section in GNOME Settings here. The mockup has an option to limit the charging to a certail level to prolong battery health. While discussing the technical details on GNOME Settings matrix. We realised that the behaviour is going to be inconsistent across different machines based on the following points:
All OEMs don’t provide a way to set a charge threshold in the first place and even those who do keep the feature reserved for the “premium” line of products making it inconsistent even when considering a single OEM.
The implementation varies across different OEMs, there’s no universal way to set a charging threshold. The implemtation comes from out of tree modules and varies from manufacturer to manufacturer.
The threshold is not always configurable, like Lenovo allows enabling/disabling threshold but it’s locked around 80% and not changable, while as ASUS allows setting any threshold.
The information about charging thresholds for different devices that we have collected so far can be seen here
A possible alternate approach could be manually exposing ACPI methods for each vendor manually instead of using the interface that the modules provide.