I have a hunc "this is a feature, not a bug" ;-), but with
the update to kernel 4.0, /proc/acpi/battery/BAT* is gone.
Is there a way (config option we could enable) to get this
back?
If not, how can I best re-implement something like the little
script below (which works for more than one battery in case
you are wondering about the complexity):
#!/bin/bash
sum() {
s=0;
while read l; do
i=`echo $l | cut -d' ' -f1`
printf "%5s " "$i"
s=$(($s+$i))
done
printf " = %s\n" "$s"
}
for v in "design capacity" "last full capacity" "remaining capacity" "rate"; do
printf "%18s = " "$v"
cat /proc/acpi/battery/BAT*/* | grep "$v:" | cut -d: -f2 | sum
done
Gerald
--
Dr. Gerald Pfeifer