View Single Post
Old 02-17-2018, 07:21 PM   #1
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,793
Karma: 103362673
Join Date: Apr 2011
Device: pb360
Turning off charging for long term USB power

I'm preparing to jb my KOA2 and began by looking over the mountable drive contents. I hadn't looked inside in a long time (Turns out I hadn't made the update preventor directory yet, so it's good I checked.

Anyway, there turned out to be a file
.fuse_hidden0000020c00000001
which I thought might have been put there by my laptop, but it has a 2017-10-13 time stamp, weeks before KOA2 release. Turns out it is a shell script.
Code:
#!/bin/bash

while true; do

CAPACITY=$(cat /sys/class/power_supply/max77796-battery/capacity)

if [ $CAPACITY -gt 70 ]; then
echo 0 > /sys/class/power_supply/max77796-charger/charging
elif [ $CAPACITY -lt 65 ]; then
echo 1 > /sys/class/power_supply/max77796-charger/charging
fi

sleep 30
done
The Voyage doesn't have a /sys/class/power_supply/max77796-charger directory and on the Voyage /sys/class/power_supply/max77696-charger directory doesn't have a charging entry.

Maybe I'm the only one that cares, but this looks like a good way to have a Kindle max out at 50% or so when on a charger long term.

Update:
Code:
echo 0 > /sys/class/power_supply/max77796-charger/charging
turns off charging and the kindle starts running on battery power instead of USB power.

Last edited by j.p.s; 03-03-2018 at 05:38 PM. Reason: update
j.p.s is offline   Reply With Quote