![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 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]# Cheers! |
![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Does the 'ready to suspend' mode consume less power than the 'screensaver' mode..?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
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
![]() |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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 ![]() |
![]() |
![]() |
![]() |
#5 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2014
Location: Grenoble, France
Device: PW2
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#8 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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) |
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#10 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#12 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
The cpu can't do that when it is suspended. |
|
![]() |
![]() |
![]() |
#13 |
Connoisseur
![]() Posts: 59
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 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? |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,729
Karma: 103020299
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. |
![]() |
![]() |
![]() |
#15 |
Connoisseur
![]() Posts: 59
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. |
![]() |
![]() |
![]() |
Tags |
suspend |
|
![]() |
||||
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 |