View Single Post
Old 03-07-2014, 02:08 PM   #1
ramast
Member
ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'ramast knows the difference between 'who' and 'whom'
 
Posts: 18
Karma: 10000
Join Date: Mar 2014
Device: Kindle Paperwhite
New hack to save battery while not using kindle5

When you turn off your kindle by pushing the power button once, it remain running for little bit then raise "ReadyToSuspend" event a little bit after that your kindle goes into sleep mode to save your battery.
Problem is, applications running on kindle can receive the event and request that kindle remain running.
for example if amazon is downloading an update and doesn't wish to be interrupted

the script simply force the kindle going into sleep mode whether the running software liked it or not.

Change log:
* Battery saver is now more aggressive.
It no longer waits for "ReadyToSuspend" signal instead it put the device in sleep mode one minute after turning it off.
That behavior might not be desirable to many since any background operation happening at that time (book being downloaded, system update being downloaded, kindle syncing, ...) will be suspended

* Kindle wakeup when I unplug it from usb cable, and so script has been updated to also put it in sleep 1 minute after unplugging it (but only if its locked!)

Known issues:
Kindle doesn't come out of sleep if it enters sleep mode while there is an active ssh session, you will have to power it off then on again

I own kindle white for a while and noticed that when I turn it off (by pushing the power button) kindle doesn't really turn off it just turn the light of the screen off, show nice screen save and continue running.

I knew for sure its running when I installed usbnetwork and was able to access my kindle through wireless connection while it is supposedly turned off [ shocking ! ]

Anyway I've wrote this simple application which check every 10 minutes [ crontab job ] whether your kindle is turned on or off, if turned off the program put your kindle into sleep mode.

While in sleep mode your kindle will no longer be activated when you plug it into usb and you will have to activate it manually by pushing the power button.

the program put your kindle into sleep mode by issuing the command
echo "mem" > /sys/power/state
That also means you no longer have to worry about turning wifi off before switching kindle off

Notes:

This script is working fine for my kindle paperwhite but I take no responsibility for any damage that might cause to any one try this. USE AT YOUR OWN RISK!

The install script do many validations before doing the actual install to ensure it will not fail.
install log can be found in the root of your sdcard

Install will fail if you tried to install the program twice.
uninstall script is included

EDIT: updated the package to be upstart service instead of cron, Thanks Dsmid for your code contribution and suggestion.
EDIT2: If you have installed the original script, uninstall it before - or after doesn't matter - installing the new script
EDIT3: Fixed a small bug when handling lipc error. no need to uninstall the previous - upstart based - version before installing this one
Attached Files
File Type: zip batter_saver.zip (4.0 KB, 270 views)

Last edited by ramast; 03-25-2014 at 05:03 PM. Reason: coorecting information
ramast is offline   Reply With Quote