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 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
Evangelist
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: 475
Karma: 445678
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: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
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: 6299991
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
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
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
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
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: https://www.mobileread.com/forums/sho...d.php?t=268453
ansman is offline   Reply With Quote
Old 12-11-2015, 08:39 AM   #12
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
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: https://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
Old 07-14-2023, 10:03 AM   #13
Kindleschokolade
Connoisseur
Kindleschokolade began at the beginning.
 
Posts: 57
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
Hello Peeps.
I am reactivating this thread as I'd like to also mess a bit with the kindle's sleep state in my system:
I am running a server on a raspberry pi and a kindle ( PW2 and PW1 ) which is connected to this raspberry pi via wifi and also usb.
The usb connection is also the charger for the kindle.
Whenever the raspberry is shutdown the kindle is not charged of course.
The kindle runs a small python server which can run various scripts. Mainly to display data read from the raspberry.
So after the raspberry has finished booting it will usually call one script via:
Code:
curl -s 10.10.10.155:8000/startScript/1
with 10.10.10.155 being the kindle's ip.
Problem is obviously that the kindle is usually in suspended mode and can not be automatically woken up by the raspberry it seems.
Reading up on the posts here it seems that the only way to keep the kindle responsible is to prevent the suspend state.
However in that case I would lose the charge after some hours and the device would be off anyways as it only gets charged when the raspberry is powered as well.

So I am thinking that maybe I could try to send some kind of usb-signal from the raspberry to wake the kindle from a suspended state.
Would this work?
Kindleschokolade is offline   Reply With Quote
Old 07-14-2023, 01:44 PM   #14
j.p.s
Grand Sorcerer
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: 5,275
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Two not very desirable possibilities.

1. Power down the kindle when the raspberry pi is shut down. When power is applied to a shut down kindle it will boot up. The kindle will take much longer to boot than the raspberry pi.

2. Put a powered USB hub between the raspberry pi and the kindle ans disable sleep on the kindle.
j.p.s is offline   Reply With Quote
Old 07-14-2023, 08:33 PM   #15
Kindleschokolade
Connoisseur
Kindleschokolade began at the beginning.
 
Posts: 57
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
Hm. Thanks. I will look into envelope 1.
The boot time is not very important, really.

Edit: Thanks again.
For my application this is the perfect solution.
Did not know that the kindle automatically boots when power is restored to the usb port.

Last edited by Kindleschokolade; 07-15-2023 at 07:20 PM.
Kindleschokolade is offline   Reply With Quote
Reply

Tags
suspend


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle touch 5.1.0 SSH password Oneill Kindle Developer's Corner 19 01-12-2018 04:27 PM
Can't SSH Into Kindle Touch magnetik Kindle Developer's Corner 28 11-18-2012 08:59 AM
17 Grey Levels on Kindle Touch? EternalCyclist Kindle Developer's Corner 5 11-06-2012 02:53 PM
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 01:24 AM.


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