I found a solution for setting up charging thresholds in dom0 without installing anything there, here, which is
echo '85' | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold
echo '75' | sudo tee /sys/class/power_supply/BAT0/charge_control_start_threshold
I set that to 40 for start threshold
and to 80 for end threshold
.
Question: Do you know how to make battery discharge after it reaches the limit I set for battery to stop charging while connected to the AC? Ex. it reaches 80% and then discharge to 40% and start charging once again and all that while connected to the AC? Maybe something to edit in charge_behaviour
in /sys/class/power_supply
? Also when it reaches 80%, when I click battery icon, it says Waiting for discharge
but it’s not discharging.