Skip to content

Instantly share code, notes, and snippets.

@i3130002
Created October 12, 2023 17:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save i3130002/2caff36b88100ec6615424ffc5475774 to your computer and use it in GitHub Desktop.
Asus A15 2023 Battery Charging Threshold Linux
#Battery Threshold
# Add these Aliases to ~/.bashrc to be able to set battery charging levels to 50-60-70-80-90-100.
#(It appears that lower values than 53 will be ignored)
#Requires SUDO access
# Sources:
# https://www.linuxuprising.com/2021/02/how-to-limit-battery-charging-set.html
# https://askubuntu.com/questions/1006778/set-battery-thresholds-on-ubuntu-asus
# Alias:
alias battery50="echo 53 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
alias battery60="echo 60 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
alias battery70="echo 70 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
alias battery80="echo 80 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
alias battery90="echo 90 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
alias battery100="echo 100 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment