View Single Post
Old 07-20-2023, 05:07 PM   #22
Kindleschokolade
Connoisseur
Kindleschokolade began at the beginning.
 
Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
Ok. So to whom it might concern:
I wrote a little shell script that checks the "Powerd state" and sets com.lab126.powerd deferSuspend to 3000000 if it's less then 10
Code:
#!/bin/sh 
while sleep 1;
do 
r=`powerd_test -s`
g=`echo $r | grep "Ready to suspend"`
if [ ! -z "$g" ]
then
	line=`echo "$r" | grep "Remaining time in this state:"`
	value="${line#*: }"
	if [ "${value%%.*}" -lt 10 ]; then
		lipc-set-prop com.lab126.powerd deferSuspend 3000000
	fi
fi
done
exit 0
I start it via a conf file in /etc/upstart/
and make sure it runs via cron.


of course this will drain the kindles battery quite fast.
In my case its not an issue as the device is usually started / woken up once a day.
Kindleschokolade is offline   Reply With Quote