Template:Battery Testing
Battery Charging and Testing
Confirm the Battery is Fully Charged
☐ Set the laptop on the testing shelf and make sure it is plugged in to a power outlet.
☐ To monitor the state of the battery, open a terminal and type:
watch -n3 -d cat /proc/acpi/battery/*/*
- If the battery seems like it is healthy and charging normally, check the Start box next to Battery Charge on the Keeper Label and let it finish charging.
Test Battery Life
☐ When the battery is fully charged, open a terminal and run:
batterytest
☐ Open a second Terminal (hint: press Super + T to quickly open a new terminal window) and run:
while : ; do stress-test ; sleep 300 ; done
☐ Disconnect the AC adapter from the power outlet, but keep it with the laptop for later.
☐ Get a Battery Testing label from the wall next to the testing shelf and stick it to the palm rest of the laptop.
How it works
The laptop will run 3 minutes ofstress-test
, then 5 minutes at idle, in a loop until it runs out of power and shuts off. For every minute the laptop is on during battery testing, a line of text is logged in a file calledbat_mon
. When battery test is run again, the script checks for thebat_mon
file and counts up the number of lines of text in the file, then outputs the number as the number of minutes the battery lasted.