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 02-11-2021, 11:50 AM   #1
nimbulan
Junior Member
nimbulan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: Kindle 4
Extending/refreshing screensaver timer?

I've recently set up and old Kindle 4 (4.1.4) to act as a weather station, which seems to be a fairly common project. I am using the Online Screensaver Extension script (https://www.mobileread.com/forums/sh...d.php?t=236104) with the modifications to allow it function on Kindle 4 found in this post: https://www.mobileread.com/forums/sh...2&postcount=36

This works great...except that it only updates 4 or 5 times before stopping. Using the log file for the script, I was able to track down the problem:
Code:
Thu Feb 11 03:05:09 UTC 2021: wait_for called with 900, now=1613012709, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: 53.913745, Battery Level: 58% Battery logging: On
Thu Feb 11 03:20:22 UTC 2021: wait_for called with 900, now=1613013622, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: 41.375632, Battery Level: 56% Battery logging: On
Thu Feb 11 03:35:35 UTC 2021: wait_for called with 900, now=1613014534, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: 28.618913, Battery Level: 56% Battery logging: On
Thu Feb 11 03:50:47 UTC 2021: wait_for called with 900, now=1613015447, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: 15.851457, Battery Level: 56% Battery logging: On
Thu Feb 11 04:06:00 UTC 2021: wait_for called with 900, now=1613016360, Powerd state: Screen Saver, defer_suspend:0, Remaining time in this state: 3.076768, Battery Level: 56% Battery logging: On
Thu Feb 11 04:21:12 UTC 2021: wait_for called with 900, now=1613017272, Powerd state: Ready to suspend, defer_suspend:1, Remaining time in this state: 33.024700, Battery Level: 56% Battery logging: On
From these log entries, you can see that the "remaining time in this state" continues to decrease every time the Kindle wakes up to update the screensaver. Once the power state reaches "ready to suspend" the wifi no longer functions (and I'm not sure the screen can be updated at that point either.)

So I'd like to know if there's a command I can add to the script that would extend the time remaining in the screensaver state, or to refresh it somehow, so the script can continue running indefinitely without needing to keep it plugged in (since I understand that when plugged in, the Kindle will stay in screensaver mode indefinitely.) I am aware that the length of the time the screensaver is active can be modified through the t2_timeout setting, though no matter what value is set it would always be a fixed amount of time (also not sure if there's a maximum value.)

Any suggestions would be appreciated.
nimbulan is offline   Reply With Quote
Old 02-11-2021, 12:36 PM   #2
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,506
Karma: 5000046
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
How do you set t2_timeout setting?
I dug up my K4NT notes and I can see that I couldn't get it changed by editing or replacing the file, and I needed to use command (example is for timeout before Kindle goes to sleep):
Code:
mntroot rw
kdb set system/daemon/powerd/t1_timeout 600
mntroot ro
mergen3107 is offline   Reply With Quote
Advert
Old 02-11-2021, 01:06 PM   #3
hius07
Wizard
hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.
 
Posts: 1,179
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
More on t1_timeout
https://www.mobileread.com/forums/sh...d.php?t=127842
https://www.mobileread.com/forums/sh...d.php?t=271120
hius07 is online now   Reply With Quote
Old 02-11-2021, 02:24 PM   #4
nimbulan
Junior Member
nimbulan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: Kindle 4
Ah thank you that second thread has some very useful information. This command looks interesting
Code:
lipc-set-prop com.lab126.powerd -i touchScreenSaverTimeout 1
which resets the timer to enable the screensaver while in active mode. Unfortunately I do not see an equivalent command for what I want to do, which is to refresh the suspend timer while in screensaver mode. There are a couple other commands that look potentially useful such as suspendGrace, and abortSuspend, but I'm not 100% sure what they do.

I am also seeing that you can simulate pressing the power button, so I could potentially just trigger the Kindle to wake up then go back into screensaver mode.
nimbulan is offline   Reply With Quote
Old 02-12-2021, 02:51 PM   #5
nimbulan
Junior Member
nimbulan began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2021
Device: Kindle 4
I seem to have found a decent solution here. The command
Code:
lipc-set-prop com.lab126.powerd -i abortSuspend 1
when issued during the "ready to suspend" state immediately returns the Kindle to screensaver state with the full timer length. Some quick changes using this command allowed the script to continue to function long-term, though it would have gaps with several missing updates. I'm working on the scheduling logic to improve the reliability, so this should hopefully be a robust and reliable solution when I'm done.

Last edited by nimbulan; 02-12-2021 at 02:54 PM.
nimbulan is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending Author Metadata Soap-dodger Library Management 13 06-09-2019 10:58 PM
Sleep timer like the ipod sleep timer lmroces Kobo Reader 2 01-12-2019 11:58 AM
Extending Download Cover results loviedovie Calibre 2 07-15-2017 01:05 PM
Extending Overdrive Lending Period? CatherineStewart Kobo Reader 9 09-12-2016 01:26 AM
Amazon extending DXG Returns? nremondelli Amazon Kindle 3 08-01-2010 04:37 PM


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


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