Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2014, 11:01 AM   #16
Akirainblack
abibliophobic
Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.
 
Posts: 220
Karma: 219708
Join Date: Aug 2012
Device: KV jailbroken
Right you are, if you let me know when it's ready to test, thank you ramast.
Akirainblack is offline   Reply With Quote
Old 03-12-2014, 11:15 AM   #17
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
It works on my PW2.
dsmid is offline   Reply With Quote
Advert
Old 03-12-2014, 11:25 AM   #18
Akirainblack
abibliophobic
Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.Akirainblack ought to be getting tired of karma fortunes by now.
 
Posts: 220
Karma: 219708
Join Date: Aug 2012
Device: KV jailbroken
Thank you for that information as well dsmid. I eagerly await the updated package with your modifications included.
Akirainblack is offline   Reply With Quote
Old 03-13-2014, 12:53 PM   #19
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
Changed the script to be upstart service based on Dsmid's code.
Replaced the "sleep 60" pause with a better error handling
ramast is offline   Reply With Quote
Old 03-13-2014, 05:36 PM   #20
barba
Enthusiast
barba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughingbarba can shake the floor when laughing
 
Posts: 35
Karma: 63620
Join Date: Nov 2012
Device: Kindle Touch, Paperwhite 1 and Nook HD+ rooted
Cover Amazon

Ramast:

I have PW1 with original cover from Amazon.

When you open the cover its turn on

Could i use your script and How it will work?


Than you in advance
barba is offline   Reply With Quote
Advert
Old 03-14-2014, 12:47 AM   #21
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
I am using kindle paperwhite1 for testing though I don't have the magic cover.
I am sure it will work.
in your case the script wait few seconds after you close your cover and put your kindle into sleep mode to save battery (just like putting your laptop in sleep mode which make its battery last longer)
ramast is offline   Reply With Quote
Old 03-14-2014, 02:37 AM   #22
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
Closing the magic cover is the same as pushing the power button, there's no difference.
dsmid is offline   Reply With Quote
Old 03-14-2014, 02:43 AM   #23
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
@ramast:
Consider adding this stanza to make sure the service won't respawn when exited:
Code:
normal exit 0 TERM
Or test what happens when lipc-wait-event fails.

Last edited by dsmid; 03-14-2014 at 02:51 AM.
dsmid is offline   Reply With Quote
Old 03-14-2014, 09:46 AM   #24
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
script would respawn because we included the keyword respawn
I deleted this line and now it exit as expected when it fails.

I've upload the new version

Last edited by ramast; 03-14-2014 at 11:16 AM.
ramast is offline   Reply With Quote
Old 03-17-2014, 09:56 AM   #25
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Does this achive the same result of turning off the screen after the seven second power button press? Regarding battery consumption
Aeris is offline   Reply With Quote
Old 03-18-2014, 02:23 AM   #26
peterson
Connoisseur
peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.
 
Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
Quote:
Originally Posted by ramast View Post
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 ! ]
Are you sure this issue is not related to the ssh-over-wifi setup or something? Because it is completely non-reproducible for me on my Paperwhite 2, also my Kindle 3 Keyboard did not have this issue either. Both(*) have/had USBNET installed and both go/went to sleep.

On the PW2, what happens if I turn the device off (pressing the power button) is the following sequence of events:
  • screensaver starts
  • about 1-2 minutes later, powerd is firing readyToSuspend events (counting down 10, 7, 6, 2, 1)
  • ~10s after the first readyToSuspend event the device goes to mem sleep

If I see it correctly, your script triggers the mem sleep at the first readyToSuspend event (not sure this will be a good idea), so at best it saves 10s of non-mem sleep time (during which the device is idling). If you turn your device on/off 10 times a day, this saves 100 seconds of CPU and WiFi idling. I would guess this is not going to have a measurable effect.

This is tested on Kindle Paperwhite 2, firmware 5.4.3 jailbreaked, USBNET installed (but no connection via WiFi configured), USB cable plugged out (otherwise it is charging and won't sleep), WiFi on.
peterson is offline   Reply With Quote
Old 03-18-2014, 02:47 AM   #27
dsmid
Linux devotee
dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.dsmid ought to be getting tired of karma fortunes by now.
 
dsmid's Avatar
 
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
@peterson: I can confirm that my K3 and PW2 suspends to mem without any battery saver as well.
The log shows that nothing is running during the sleep, so it's a real suspend, not just a low-power mode. I suspected that Kindle wakes up time to time to check the todo events but this doesn't seem to be true.
That would mean the battery saver has zero effect on battery.
dsmid is offline   Reply With Quote
Old 03-18-2014, 03:01 AM   #28
peterson
Connoisseur
peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.peterson ought to be getting tired of karma fortunes by now.
 
Posts: 74
Karma: 889004
Join Date: Mar 2014
Device: Kindle PW2
Quote:
Originally Posted by dsmid View Post
I suspected that Kindle wakes up time to time to check the todo events but this doesn't seem to be true.
Well, there are ways to wake-up from a mem sleep :-)

I also can not reproduce ramast's claim that when doing the "echo mem" line (which is equivalent to the device suspending on its own) the device is not waking up anymore when plugging in the USB cable. For me it does wake up (it stays in screensaver, though, but the device is now on until I unplug the cable again).
peterson is offline   Reply With Quote
Old 03-18-2014, 08:42 AM   #29
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
i don't have PW2 I have PW1.
and before running this script there was always a big difference between turning kindle off with airplane mode on or off.
In one occasion - which made me write this software - my kindle's battery was critically low just because I forgot to turn off wireless before closing it two weeks earlier.

Since kindle PW1 also has readyToSuspend, I suppose it goes to standby mode instead of full sleep.
Apparently this is not the case for kindle PW2

Anyone with PW1 here to test and confirm?
ramast is offline   Reply With Quote
Old 03-18-2014, 08:46 AM   #30
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
And peterson you are right, my claim was not correct.
I took it back in the second comment in this post
ramast is offline   Reply With Quote
Reply

Tags
kindle5, paperwhite, power save, sleep


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Battery woes after using Jailbreak hack on Kindle 2 US edition ashu_dan Kindle Developer's Corner 6 08-18-2012 08:28 AM
Do you turn wifi off to save battery? jusmee Kobo Reader 24 02-20-2012 10:04 PM
Paid Hack Request: Photo Slideshow Hack for Kindle 3 chmreader Kindle Developer's Corner 0 05-25-2011 01:24 PM
Book titles hack? Time delay hack? re838uk Sony Reader 0 10-08-2009 05:29 AM
Does sleep mode actually save battery? spooky69 Sony Reader 20 01-23-2008 04:36 PM


All times are GMT -4. The time now is 03:08 PM.


MobileRead.com is a privately owned, operated and funded community.