I would like to control for setting my battery at a certain capacity (for ex.20%) then the laptop will be automatically standby or hibernate for long-lasting the battery. Is there any solution, please? Be noted: my Vostrol 3450, ubuntu 13.04, hibernate function is already rehabilitated.
The battery capacity I can find is in the file capacity as below:
I created the bash script:
#!/bin/bash load=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/capacity) min_load=20 if [ $load <= min_load ]; then pm-suspend fi
On terminal, I perform the cli for test:
Then the result failed showing:
/bin/battery-suspend: line 5: =: No such file or directory