Thinkpad T560 Battery Usage Under Ubuntu 24

Information about batteries

List all power devices

$ upower -e
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/battery_BAT1
/org/freedesktop/UPower/devices/line_power_AC
/org/freedesktop/UPower/devices/DisplayDevice

Get information about one of the devices

$ upower -i /org/freedesktop/UPower/devices/battery_BAT1
native-path: BAT1
vendor: SANYO
model: 45N1775
serial: 219
power supply: yes
updated: Tue 31 Dec 2024 08:11:49 AM EST (25 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: discharging
warning-level: none
energy: 40.67 Wh
energy-empty: 0 Wh
energy-full: 60 Wh
energy-full-design: 60 Wh
energy-rate: 4.852 W
voltage: 11.286 V
charge-cycles: N/A
time to empty: 8.4 hours
percentage: 67%
capacity: 100%
technology: lithium-ion
icon-name: ‘battery-full-symbolic’
History (charge):
1735650649 67.000 discharging
History (rate):
1735650709 4.852 discharging
1735650679 5.101 discharging
1735650649 5.000 discharging

Charging Thresholds

Show the remaining battery percentage below which the battery will be charged.  The default is 0, which means the battery will always charge when on AC power.

$ cat /sys/class/power_supply/BAT1/charge_start_threshold
0

Change it to 5% so the battery won’t charge unless it has less than 5% of a full charge remaining :
$ sudo sh -c “echo 5 > /sys/class/power_supply/BAT1/charge_start_threshold”

Show the remaining battery percentage above which the battery will not be charged.  The default is 100, which means the battery will be charged until completely full.
$ cat /sys/class/power_supply/BAT1/charge_stop_threshold
100

Change it to 95%:
$ sudo sh -c “echo 95 > /sys/class/power_supply/BAT1/charge_stop_threshold”
Check what the battery is doing (returns discharging or charging):
$ cat /sys/class/power_supply/BAT1/status

References

How to Set Battery Charge Limit in Ubuntu 22.04 & 24.04