Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 12-09-2019, 04:47 PM   #16
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 400000
Join Date: Nov 2019
Location: US
Device: PW4
I have to concede a good point. Cron will be a pita if you let the Kindle sleep.
Junket is offline   Reply With Quote
Old 12-09-2019, 05:11 PM   #17
j.p.s
Wizard
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: 2,920
Karma: 47037221
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by Junket View Post
I have to concede a good point. Cron will be a pita if you let the Kindle sleep.
To get back to the thread topic, the practical solution is:
  • Connect external battery or charger.
  • disable sleep (search on ~ds)
  • Forget cron and use an infinite loop with a 58 second sleep, then micro nano or whatever sleep until the next minute boundary. Tune to taste.
j.p.s is offline   Reply With Quote
Old 12-22-2019, 06:22 PM   #18
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 60
Karma: 11789
Join Date: Dec 2019
Device: PW4
An update for you on this project. I have the clock working and it looks real nice on the e-ink screen.
Basic process was:
jailbreak and install KUAL (thanks Junket)
install python and write the clock code
Here's a shot:
handyguy is offline   Reply With Quote
Old 12-22-2019, 06:25 PM   #19
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 60
Karma: 11789
Join Date: Dec 2019
Device: PW4
I am now working on minimizing battery usage, fetching the correct time occasionally, adding the date to the display, although I like the current minimalist look. Maybe try my hand at a weather display.
handyguy is offline   Reply With Quote
Old 12-22-2019, 06:30 PM   #20
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 60
Karma: 11789
Join Date: Dec 2019
Device: PW4
I will post the code once I am satisfied with it.
handyguy is offline   Reply With Quote
Old 12-22-2019, 11:05 PM   #21
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 400000
Join Date: Nov 2019
Location: US
Device: PW4
Nice. Keep up the good work!
Junket is offline   Reply With Quote
Old 12-24-2019, 07:33 AM   #22
mattzz
Member
mattzz began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
I did a quick hack building a clock based on a Kindle PW.

It is supposed to run from battery.
After screen update the Kindle is put to suspend to RAM for the reminder of the minute. Creating the PNG takes a couple of seconds so the update will be a couple of seconds late.

This is an early development stage, we'll see where this leads to.

https://github.com/mattzzw/kindle-clock
mattzz is offline   Reply With Quote
Old 12-25-2019, 02:04 PM   #23
mattzz
Member
mattzz began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
Doh. I just discovered the fbink tool (thanks NiLuJe!). That will make things a lot easier (and faster!).
mattzz is offline   Reply With Quote
Old 12-27-2019, 06:52 PM   #24
mattzz
Member
mattzz began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
Quote:
Originally Posted by handyguy View Post
At 1440 turns/day, I guess the next question is how long would a charge last at that rate?
I don't mind charging it up periodically, or maybe hacking in a bigger battery...
Hm, if we assume (rough ballpark figures)
  • 1600mAh battery (Kindle PW)
  • 100mA load for 10 seconds every minute
this would give us 4 days of runtime.
Bring the active time down to 5 seconds and we'd end up with 8 days (and so on).

Still not great for a battery operated clock.
mattzz is offline   Reply With Quote
Old 12-27-2019, 11:18 PM   #25
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 400000
Join Date: Nov 2019
Location: US
Device: PW4
E-ink displays are bi-stable and only consume microwatts when refreshed. Even optimized, the processor, wifi and front light consumption will be significant.

Accurate figures are not easy to pin down. With many possible variables, actual power consumption is best measured. Display manufacturer's claim that it takes about 7 mj/cm2 for a full screen switch (refresh). If a refresh is < 400 ms, then a full screen refresh would use about .014 mAh per refresh or some 20 mAh per day. Which would be about 77 days per charge if we were to ignore processor and wifi power.

Real life figures would probably see screen updates using far less current. But dwarfed by processor and wifi current. As a clock the Kindle should be able to spend the majority of time suspended so it would seem reasonable to expect an optimized clock to draw less power than regular reading. So > 6 weeks if you believe Amazon's battery claims for the PW4.
Junket is offline   Reply With Quote
Old 12-28-2019, 04:55 AM   #26
mattzz
Member
mattzz began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Feb 2014
Device: pw, pw2
I was not referring to the power consumption of the display. The display and the display updates are the least of my concerns.

I was referring to the power consumption of the cpu (a couple of seconds every minute) and wifi (10-30 seconds every hour).

What numbers would you suggest for them?
mattzz is offline   Reply With Quote
Old 12-28-2019, 08:10 PM   #27
yparitcher
Enthusiast
yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!yparitcher rocks like Gibraltar!
 
Posts: 26
Karma: 100068
Join Date: Feb 2019
Device: K4 KT4
a few helpful tips. (i made a custom dynamic screensaver generator, and ran into many of the same issues)

you can unload the amazon screensaver module with lipc allowing the kindle to suspend without showing a screensaver by

Code:
lipc-set-prop -s com.lab126.blanket unload screensaver
and when bailing out a corresponding
Code:
lipc-set-prop -s com.lab126.blanket load screensaver
this module also takes care of refreshing the screen on wake-up so take care when disabling it



you can then register for sleep and wakeup events and trigger your script on wakeup and then resetting the wakeup timer & going back to sleep all with lipc

Code:
lipc-wait-event -m com.lab126.powerd goingToScreenSaver,wakeupFromSuspend,readyToSuspend | while read event; do
	case "$event" in
		goingToScreenSaver*)
			custom_function;;
		wakeupFromSuspend*)
			custom_function;;
		readyToSuspend*)
			custom_function;;
	esac
done;
to set the wakeup timer use
Code:
lipc-set-prop com.lab126.powerd rtcWakeup xxx
replacing xxx with a integer amount. one limitation. this property can only be set in the readyToSuspend state.

the kindle suspend state cycle is like this:

Awake -> goingToScreenSaver -> ScreenSaver -> readyToSuspend -> Suspended -> wakeupFromSuspend -> ScreenSaver -> outOfScreenSaver -> Awake

i am not sure how long the kindle spends in the ScreenSaver & readyToSuspend states. it might be longer than a minute and therefore useless to you. however you can try what what koreader does to prompt a suspend: https://github.com/koreader/koreader...owerd.lua#L103

Code:
lipc-set-prop com.lab126.powerd powerButton 1
to simulate a power button press. this might speed up the suspend procces (not sure i never tested this.)



you can see my work here (in shell) https://github.com/yparitcher/kindle...zman_backround
the project currently uses the lipc C interface https://github.com/yparitcher/kindle-zmanim
yparitcher is offline   Reply With Quote
Old 12-28-2019, 10:24 PM   #28
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 400000
Join Date: Nov 2019
Location: US
Device: PW4
Quote:
Originally Posted by mattzz View Post
I was referring to the power consumption of the cpu (a couple of seconds every minute) and wifi (10-30 seconds every hour).

What numbers would you suggest for them?

PW4 has a 1500 mAh battery, PW/2/3 are usually said to be 1420 - 1470 mAh. If you can suspend a significant amount of time as several posters suggest is possible to set (above, here) & minimize wifi use, a month or more on battery should be an attainable goal.

Creating the header below should forestall aggressive checks for firmware updates when wifi is enabled:
touch /var/local/system/SKIP_UPDATE_CHECK
Junket is offline   Reply With Quote
Old 12-29-2019, 03:00 AM   #29
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
Posts: 60
Karma: 11789
Join Date: Dec 2019
Device: PW4
Without any battery optimization, front light off, running wifi/ntpupdate once/day, and only writing on the screen what has changed minute to minute, I am getting just over 3 days of battery life on my python based clock.

Last edited by handyguy; 12-29-2019 at 03:11 AM.
handyguy is offline   Reply With Quote
Old 12-29-2019, 04:27 AM   #30
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 400000
Join Date: Nov 2019
Location: US
Device: PW4
Quote:
Originally Posted by handyguy View Post
I am getting just over 3 days of battery life on my python based clock.

That's actually encouraging. Since it takes more than a minute to transition to a lower power state your processor was probably running in the highest power state (albeit, otherwise idle) the entire time.

active > screen saver > waiting for suspend > suspend

As solutions exist to define wake from suspend events, forcing the processor to suspend or at least screensaver mode would considerably reduce power consumption. Also your apparent approach of only connecting to wifi once a day or perhaps a few times should suffice to keep your PW4 clock time accurate. It shouldn't be necessary to connect hourly as implied in an earlier post.
Junket is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-900 PRS-900 Clock Hack? Dahak Sony Reader 13 06-18-2010 03:33 AM
clock hack for EBW 1150??? the7gerbers Fictionwise eBookwise 1 02-18-2009 10:32 AM
Sony Reader hack: clock in status bar vvv Sony Reader 20 04-26-2007 06:11 PM


All times are GMT -4. The time now is 09:10 AM.


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