Last active
September 14, 2026 18:36
-
-
Save MeganerdNL/542e9fdbbd90a9d9d87bf6dc4a6144c2 to your computer and use it in GitHub Desktop.
Oneshot systemd service file for the Framework 16 laptop to set battery charge limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Oneshot systemd service file for the Framework 16 laptop to set batery charge limit | |
| ## Defaults here is to stop charging at 80%. Customize as needed | |
| ## The framework 16 laptop does NOT support a start threshold (charge_control_start_threshold) atm (sept 2026) | |
| ## Place in: /etc/systemd/system/battery-charge-limit.service | |
| ## Reload after making: sudo systemctl daemon-reload | |
| ## Enable and start: sudo systemctl enable --now battery-charge-limit.service | |
| [Unit] | |
| Description=Set battery charge limit | |
| ConditionPathExists=/sys/class/power_supply/BAT1/charge_control_end_threshold | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/bin/bash -c "echo 80 > /sys/class/power_supply/BAT1/charge_control_end_threshold" | |
| RemainAfterExit=yes | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment