
Setting Up Adaptive Battery Charging on Ubuntu
🔺 Speed Scroll 🔺
🖥️ Welcome and thank you for visiting. Having an issue with your Windows 10 or 11 computer?
🔍️ Use the search tool 🔍️ above and you can find the answers to your issues. All searches remain in house.
📚️ Enjoy your stay and always RTFM.
To set up adaptive battery charging on Ubuntu, you can check if your laptop supports charge thresholds by running specific commands in the terminal. If supported, you can manually configure the battery charge limits using commands to set the start and end charging thresholds, or you can wait for future updates in GNOME that may provide a graphical interface for this feature.
Setting Up Adaptive Battery Charging on Ubuntu
Adaptive battery charging helps prolong the lifespan of your laptop’s battery by limiting the maximum charge level. Here’s how to set it up on Ubuntu.
Check Laptop Compatibility
- Open Terminal: Press
Ctrl + Alt + T. - List Power Supply: Run the command:
ls /sys/class/power_supply/- Look for your battery, usually named
BAT0,BAT1, etc. - Check Support: Run:
ls /sys/class/power_supply/BAT0- Replace
BAT0with your battery name. Look for files namedcharge_control_start_thresholdandcharge_control_end_threshold. If they exist, your laptop supports charge limiting.
Set Charge Limits
- Set Start Charging Level: To limit charging to 80%, run:
sudo sh -c "echo 80 > /sys/class/power_supply/BAT0/charge_control_start_threshold"Set Maximum Charge Level: To stop charging at 90%, run:
sudo sh -c "echo 90 > /sys/class/power_supply/BAT0/charge_control_end_threshold"Make Changes Permanent
To ensure these settings persist after reboot:
- Create a Systemd Service: Open terminal and run:
sudo nano /etc/systemd/system/battery-charge.serviceAdd the Following Lines:
[Unit]
Description=Set Battery Charge Maximum Limit
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo 90 > /sys/class/power_supply/BAT0/charge_control_end_threshold'
[Install]
WantedBy=multi-user.targetEnable the Service:
sudo systemctl enable battery-charge.serviceConclusion
After following these steps, your Ubuntu laptop will limit battery charging, helping to maintain battery health over time.
.

Linux

Linus Tools
Check out different Linux distros in your web browser with nothing to download at DistroSea.com

Here are some cheatsheets and quick references from QuickRef.ME

Learn Linux from MIT for FREE
edX.

Linux Basics YouTube Series
6 videos
Watch the Series.
“Linux Command Line & Bash Scripting Tutorial For Beginners"
176 videos
Watch the Series.
Java Tutorial For Beginners: - Step by Step tutorials.
133 videos
Watch the Series.



