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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2013, 05:34 AM   #1
sirpoot
Junior Member
sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.sirpoot can successfully navigate the Paris bus system.
 
Posts: 2
Karma: 36392
Join Date: Sep 2013
Device: Kindle Touch
Kindle touch suspend levels, and how to sleep while maintaining SSH

Hi everyone,

I wanted to make my Kindle change its screensaver every 3 hours or so. I tried using cron, then I found that it doesn't work because the Kindle went to sleep.

After meddling for a few hours with powerd, I discovered that Kindle has 4 power levels: Active, Screen Saver, Ready to suspend, and sleep.

Active stays on for 10 minutes, Screen Saver stays on for 1 minute, and Ready to suspend stays on for 5 seconds. See log:

Code:
[root@kindle root]# /usr/bin/powerd_test -s
Powerd state: Active
Remaining time in this state: 581.725642
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s
Powerd state: Screen Saver
Remaining time in this state: 56.331120
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s
Powerd state: Screen Saver
Remaining time in this state: 0.984457
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s
Powerd state: Ready to suspend
Remaining time in this state: 4.947582
defer_suspend:0
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On
My SSH connection will not drop as long as the state is Active, Screen Saver or Ready to Suspend. In any of these modes, I can wake up the Kindle up using "lipc-set-prop com.lab126.powerd wakeUp 1".

com.lab126.powerd has a property called deferSuspend that is supposed to change the amount of time left in the "Ready to Suspend" state. When you run it in Active or Screen Saver state, it gives the error:

com.lab126.powerd failed to set value for property deferSuspend (0x8 lipcErrNoSuchProperty)

I discovered that the property can only be set DURING THE READY TO SUSPEND STATE. That means after 11 minutes of leaving your Kindle alone you have a 5 second window to change the time left in "Ready to Suspend" state. See my logs:

Code:
csuspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

com.lab126.powerd failed to set value for property deferSuspend (0x8 lipcErrNoSu                                                                                        chProperty)
[root@kindle root]# /usr/bin/powerd_test -s; lipc-set-prop com.lab126.powerd def
erSuspend 1000
^[[APowerd state: Screen Saver
Remaining time in this state: 0.124960
defer_suspend:0
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

com.lab126.powerd failed to set value for property deferSuspend (0x8 lipcErrNoSu                                                                                        chProperty)
[root@kindle root]# /usr/bin/powerd_test -s; lipc-set-prop com.lab126.powerd def
erSuspend 1000
Powerd state: Ready to suspend
Remaining time in this state: 4.070775
defer_suspend:0
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s; lipc-set-prop com.lab126.powerd def
erSuspend 1000
Powerd state: Ready to suspend
Remaining time in this state: 999.684285
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s; lipc-set-prop com.lab126.powerd def
erSuspend 3000000
Powerd state: Ready to suspend
Remaining time in this state: 995.529458
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]# /usr/bin/powerd_test -s; lipc-set-prop com.lab126.powerd def
erSuspend 3000000
Powerd state: Ready to suspend
Remaining time in this state: 2999997.991570
defer_suspend:1
suspend_grace:0
prevent_screen_saver:0
drive_mode:unknown
Battery Level: 88%
Last batt event at: 88%
Charging: No
batt_full=0
Battery logging: On

[root@kindle root]#
This means I can put my Kindle in perpetual low-power mode while displaying a nice picture on the screen.

Cheers!
sirpoot is offline   Reply With Quote
Old 09-02-2013, 05:56 AM   #2
nasser
Addict
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 281
Karma: 371106
Join Date: Feb 2010
Device: Too many..
Does the 'ready to suspend' mode consume less power than the 'screensaver' mode..?
nasser is offline   Reply With Quote
Old 09-02-2013, 10:56 AM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 6,969
Karma: 6553737
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
Ha, thanks for looking into this, not knowing exactly how that (deferSuspsend) powerd prop behaved was bugging me .
NiLuJe is offline   Reply With Quote
Old 01-30-2014, 11:12 AM   #4
moutemoute
Junior Member
moutemoute began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2014
Location: Grenoble, France
Device: PW2
A big thank you sirproot.
This problem was bugging me as well and I'm now able to use my scripts in screensaver mode.

Nice work
moutemoute is offline   Reply With Quote
Old 01-31-2014, 04:52 AM   #5
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6029347
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I too feel that I should add my support to this.

Great research.
twobob is offline   Reply With Quote
Old 02-01-2014, 08:46 AM   #6
moutemoute
Junior Member
moutemoute began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2014
Location: Grenoble, France
Device: PW2
Quote:
Originally Posted by nasser View Post
Does the 'ready to suspend' mode consume less power than the 'screensaver' mode..?
After a few measures, it seems to be exactly the same consumption.
moutemoute is offline   Reply With Quote
Old 12-07-2015, 05:15 PM   #7
tomas01
Junior Member
tomas01 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2015
Device: Kindle touch
Hi,
anyone knows how to do it permanent, after reboot Ready to suspend is back at 5sec. When I am charging - state is screen server time unknown and right after charger disconnection countdown for 60sec screen server state and 5sec Ready to suspend state.
I have Kindle touch.
thx
tomas01 is offline   Reply With Quote
Old 12-07-2015, 07:50 PM   #8
knc1
¯\_(ツ)_/¯ <- Clueless
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 11,560
Karma: 11828159
Join Date: Feb 2012
Location: Central Texas
Device: Nothing KV or newer, not interested.
Ah, just what do you want to achieve?

Strictly speaking, you can't put the cpu to sleep and continue to have ssh access, the ssh access requires a running cpu.

Do you want to prevent the screen saver from showing up?
(The 5-series Kindles can go into a state that shows the screensaver, but it isn't 'asleep' because ssh (over USB) continues to work.)

if so, try:
home -> search -> enter:
;ds
(or maybe ~ds or `ds - I don't recall the magic character for the K5)
knc1 is offline   Reply With Quote
Old 12-10-2015, 01:09 PM   #9
tomas01
Junior Member
tomas01 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2015
Device: Kindle touch
Hi,
I need running cron - png download each 12 min. (5 tines per hour - weather station and forecast info) status Ready to suspend is great cron is running, ssh access, png full screen, but charger will change the remaining time in Ready to suspend back to 5 sec.
I already did some how to weather info on kindle, but none worked for me.
Did not try kite.
Now I would like to have this Ready to suspend state with really long time - running cron, ssh and its easy to do, but the drawback is all is back after charger is plugged in.
PS: disable screen server doesn't work for me, I tried many options ;ds ;disablescreenserver ;disscrn ;disable screensever
tomas01 is offline   Reply With Quote
Old 12-10-2015, 04:26 PM   #10
knc1
¯\_(ツ)_/¯ <- Clueless
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 11,560
Karma: 11828159
Join Date: Feb 2012
Location: Central Texas
Device: Nothing KV or newer, not interested.
So leave the charger connected.

You will have to anyway, the Kindle only has about 1-1/2 to 2 hours of run-time in its battery.
knc1 is offline   Reply With Quote
Old 12-11-2015, 03:51 AM   #11
ansman
Junior Member
ansman began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2015
Location: Davos
Device: DXG
Hah, quite similar approach to my project...

Ready for suspend is never reached when usb is plugged in, right? If you need to run it without power, than you should use the suspend state to save battery, otherwise your forecast display will starve ~15 hours later... Yesterday, I found how to wake the device from suspend: http://www.mobileread.com/forums/sho...d.php?t=268453
ansman is offline   Reply With Quote
Old 12-11-2015, 08:39 AM   #12
knc1
¯\_(ツ)_/¯ <- Clueless
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 11,560
Karma: 11828159
Join Date: Feb 2012
Location: Central Texas
Device: Nothing KV or newer, not interested.
Quote:
Originally Posted by ansman View Post
Hah, quite similar approach to my project...

Ready for suspend is never reached when usb is plugged in, right? If you need to run it without power, than you should use the suspend state to save battery, otherwise your forecast display will starve ~15 hours later... Yesterday, I found how to wake the device from suspend: http://www.mobileread.com/forums/sho...d.php?t=268453
No - the poster I was replying to required a running cron and sshd.
The cpu can't do that when it is suspended.
knc1 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
Can't SSH Into Kindle Touch magnetik Kindle Developer's Corner 28 11-18-2012 08:59 AM
K5 17 Grey Levels on Kindle Touch? EternalCyclist Kindle Developer's Corner 5 11-06-2012 02:53 PM
K5 Kindle touch 5.1.0 SSH password Oneill Kindle Developer's Corner 18 06-18-2012 11:23 AM
Kindle Touch SSH access? firite Kindle Developer's Corner 3 05-03-2012 09:36 AM
So no sleep or suspend? How about RESUME? Asterra iRex 1 12-28-2007 01:55 PM


All times are GMT -4. The time now is 05:13 PM.


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