![]() |
#16 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
As a small follow up:
The behaviour seems to be inconstant. The kindle does not wake up everytime when the raspberry pi is powered up and boots. Maybe it could also be an issue with the cable? |
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,772
Karma: 103362673
Join Date: Apr 2011
Device: pb360
|
Are you sure that you are completely shutting down the kindle?
|
![]() |
![]() |
![]() |
#18 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
i run "shutdown -h now"
that should do it, no? |
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,772
Karma: 103362673
Join Date: Apr 2011
Device: pb360
|
Yes.
I guess that I haven't connected a powered USB to a shutdown kindle often enough to notice that sometimes that doesn't cause the kindle to boot. (I did check with one of my powered off kindles before I made the suggestion.) |
![]() |
![]() |
![]() |
#20 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
So this gets interesting here.
I have actually two kindle PW2 in my system. Both connected to the raspi. They both share the same configuration / jailbreak / custom python scripts. When I request the "shutdown -h now" command both do shutdown. However, if I do not cut the power to their USB port immediately, they reboot. If I do they stay shutdown. One of them however does not wake up automatically when the power is restored. The other does ... EDIT: after a couple more tries now the other one also does not wake on usb connect ... Last edited by Kindleschokolade; 07-18-2023 at 11:51 AM. |
![]() |
![]() |
![]() |
#21 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
Another follow up on the
lipc-set-prop com.lab126.powerd deferSuspend value Anytime the "Powerd state" changes this value gets set back to the default. So the perpectual "ready to suspend" responsive state is not easy to achieve when the device is connected to power on and off over times as it is in my installation. The moment the raspberry is shut down the kindle goes to first "Screen Saver" for 10 Minutes and then "Ready to suspend" for one minute. would surely be nice to have a hook in the system event when the power is changed to achieve more granular control. For now the only thing I could think of is a script which runs every couple of seconds checking on the "Powerd state" and setting "lipc-set-prop com.lab126.powerd deferSuspend" to a high value when the result is "Ready to suspend" |
![]() |
![]() |
![]() |
#22 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
Ok. So to whom it might concern:
I wrote a little shell script that checks the "Powerd state" and sets com.lab126.powerd deferSuspend to 3000000 if it's less then 10 Code:
#!/bin/sh while sleep 1; do r=`powerd_test -s` g=`echo $r | grep "Ready to suspend"` if [ ! -z "$g" ] then line=`echo "$r" | grep "Remaining time in this state:"` value="${line#*: }" if [ "${value%%.*}" -lt 10 ]; then lipc-set-prop com.lab126.powerd deferSuspend 3000000 fi fi done exit 0 and make sure it runs via cron. of course this will drain the kindles battery quite fast. In my case its not an issue as the device is usually started / woken up once a day. |
![]() |
![]() |
![]() |
#23 |
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
|
You might want to look into `lipc-wait-event`
![]() |
![]() |
![]() |
![]() |
#24 |
Connoisseur
![]() Posts: 59
Karma: 14
Join Date: Dec 2021
Device: kindle PW3
|
![]() ![]() Well it was worth doing some shell script syntax recap. here is the shorter one using the event: Code:
#!/bin/bash echo "com.lab126.powerd" |lipc-wait-event -m -l "readyToSuspend" | while read event; do g=`echo $event*| grep "readyToSuspend"` if [ ! -z "$g" ] then lipc-set-prop com.lab126.powerd deferSuspend 3000000 fi done ![]() |
![]() |
![]() |
![]() |
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 |