08-24-2013, 03:54 AM | #1 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
How to keep kindle alive? without physical touch? (using xdotool)
hi, i control my kindle via ssh, to turn the pages, this is done via xdotool.
after 10 minutes or so, the paperwhite goes to sleep, since it has not recieve any touch. because the 'touch' it is getting is form xdotool, not the screen. i do not want to disable the kindle from sleeping because, i still want my kindle to sleep. i do not want to have to remember to disable and then renable the sleeping each time i want to use my kindle remotely. is there any command that can be sent by terminal to keep the kindle alive? as in, send the command, and then the kindle thinks it just received input, and won't sleep for 10 minutes, unless you send this again. thanks a lot, i appreciate it |
08-24-2013, 06:22 AM | #2 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Disable screensaver:
lipc-set-prop com.lab126.powerd preventScreenSaver 1 Enable screensaver: lipc-set-prop com.lab126.powerd preventScreenSaver 0 |
Advert | |
|
08-24-2013, 06:24 AM | #3 |
( ͡° ͜ʖ ͡°){ʇ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
|
It's in the KUAL HELPER package, "As standard"
Prevent / Allow screensavers. |
08-24-2013, 08:58 AM | #4 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
PS: Your Kpw is not 'going to sleep' it is only clearing the screen.
If it actually went to sleep, your ssh link would stop responding. |
08-24-2013, 11:15 AM | #5 | ||
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Quote:
Obviously the KUAL helper buttons to disable/enable screensavers are not convenient here.. So.. the solution is.. Send command Code:
/usr/bin/powerd_test -p meeting zxczxc's requirement of.. Quote:
Last edited by nasser; 08-24-2013 at 11:17 AM. |
||
Advert | |
|
08-24-2013, 12:06 PM | #6 |
( ͡° ͜ʖ ͡°){ʇ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
|
you're not wrong. In fact IIRC I think it was me that setup that horrible xdotool hack with zxczxc. (It's on a thread somewhere) EDIT oh yeah: https://www.mobileread.com/forums/sho...47&postcount=1
TBH I think he would be best using the lipc-set-prop com.lab126.powerd preventScreenSaver 1 but you are correct. one can simulate a button push in that manner. |
08-24-2013, 12:47 PM | #7 | ||
Evangelist
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
|
Quote:
Quote:
|
||
08-24-2013, 01:32 PM | #8 |
( ͡° ͜ʖ ͡°){ʇ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 have to agree. your solution is better in this case.
Unsure if the wifi dies though... zxczxc will be able to tell us |
08-24-2013, 02:34 PM | #9 |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
oh wow all these replies!
ok, my mistake... when i meant sleep, i meant screensaver. in my setup (yes thanks again twobob, you helped me a lot!) i will be reading, and then eventually the screensaver will turn on, and the screen will go dark. if i was physcially pressing the screen, (i'm not sure how exactly but) the kindle receives that the screen was touched and so resets the timer that the screensaver will show. using the way i read books, this does not happen. i did not think i wanted to disable the screensaver, i knew this was a possibility, but i still want the screen saver to happen, just, when i am not using the device. when i am turning the pages via ssh, the kindle things i am not using the device. if i disable the screensaver, and close my cover (with magnet), will the kindle then show the screensaver and dim the light? does it just dim the light? or does nothing happen at all? if so, sure, i could disable the screensaver, but, i do not want to enable it when i am done reading. i just want to fall asleep. there is no command, or anything (that you guys know) that will make the kindle think i touched it? or, no way to reset the timer that must count down until the screensaver is shown? -edit. at the moment, when this happens, i simply have to manually press the power button, then continue reading. (just for information, i am not disabled or anything, just, i find it much more relaxing, ergonomic, and easier to not have to hold the kindle in bed) Last edited by zxczxc; 08-24-2013 at 02:39 PM. |
08-24-2013, 03:45 PM | #10 |
BLAM!
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
|
@zxczxc: IIRC, there's a lipc call to reset the timeout. Never tried it myself, and you will still need to periodically launch this command, so that's not terribly awesome, but it might work.
EDIT: Code:
lipc-set-prop com.lab126.powerd -i touchScreenSaverTimeout 1 May also want to investigate what the hell defer_suspend & suspend_grace do, but I suspect, as the name implies, that they're mostly for the tier 2 timeout (suspend). Last edited by NiLuJe; 11-30-2013 at 05:44 PM. |
08-24-2013, 04:15 PM | #11 | |
Addict
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
|
Quote:
although, how did you find to use -i with it? and how did you find that 1 is 10 minutes/600 seconds? or, how can you see there is more than one 'tier'? i just see this 'w Int touchScreenSaverTimeout', i would like to learn more when does my kindle do a tier 2 timeout/suspend? thank you very very much, and of course, everyone else for their help. -edit. it works perfectly, i timed my kindle to screensaver, it took 10 minutes, then i tried it again, after 9 minutes i sent the command, and one minute later it did not screensave, but it did 10 minutes later. perfect i will simply send this along with each page turn command i send very ugly... but does exactly what i want thanks! Last edited by zxczxc; 08-24-2013 at 05:24 PM. |
|
08-24-2013, 09:01 PM | #12 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
When you fall asleep in the middle of a page, the Kindle will also go to sleep sometime after you do. Then, when you wake and the Kindle wakes, you will both be on the same page. (Although your cell phone or whatever may have died in the meantime.) |
|
08-24-2013, 09:07 PM | #13 |
BLAM!
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
|
@zxczxc: See lipc-set-probe usage, -i is to set a property exposed as an int, which touchScreenSaverTimeout is, according to lipc-probe.
I happen to know the tier1 default timeout value because it hasn't changed since the K2, and I still remember it ;p (also, it's shown in the output of the status property of powerd). Why 1? Because I guessed that it was actually more like a boolean value, so 1 for true effectively triggers it, and resets the countdown . I haven't checked if we could make the countdown larger than the default t1 with a different value. The tier2 timeout used to be 60s after t1, but I don't know if it's still the same value on FW 5.x. Last edited by NiLuJe; 08-24-2013 at 09:10 PM. |
08-25-2013, 08:11 AM | #14 |
( ͡° ͜ʖ ͡°){ʇ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
|
Great solution.
|
08-25-2013, 09:35 AM | #15 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Concerning the "how did you know it was 600 seconds" - unfortunately, the property is write-only, so it won't show you its current value when using lipc-probe -v . But it could be determined indirectly, by looking at the lipc-probe output:
Code:
[root@kindle root]# lipc-probe com.lab126.powerd -v w Int touchScreenSaverTimeout w Int deferSuspend w Int wakeUp w Int rtcWakeup r Str state [active] w Int suspendGrace w Int addSuspendLevels rw Str logLevel [Current log level=info (Possible levels: all, perf, debug[9-0], info, warn, error, crit, none)] r Int battLevel [83] rw Int preventScreenSaver [0] rw Str logMask [0xffff0000] rw Int flIntensity [12] r Int flMaxIntensity [24] w Int abortSuspend w Int powerButton w Int flStartup r Str status [Powerd state: Active Remaining time in this state: 597.696795 defer_suspend:0 suspend_grace:0 prevent_screen_saver:0 drive_mode:off Battery Level: 83% Last batt event at: 83% Charging: Yes batt_full=0 Battery logging: On ] r Int isCharging [1] However, I'm not sure how to determine when it will enter suspend mode. (Actually, does the PW ever enter it at all?). This is the relevant lines from the output in screensaver mode: Code:
r Str status [Powerd state: Screen Saver Remaining time in this state: Unknown |
Tags |
sleep disable, sleep timer |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
E-Ink Keyboard Concept Marries Best Of Touch And Physical Keys | amjbrown | News | 22 | 02-05-2013 12:06 AM |
Kobo Touch Reset Solved - I'ts Alive ! | KTREADER | Kobo Reader | 0 | 09-01-2012 10:44 AM |
Kindle and Physical buttons | ewandeep | Sony Reader Dev Corner | 4 | 07-09-2012 10:12 AM |
Bargain (Kindle/Sony) Burned Alive: A Victim of the Law of Men ($1.99) | arcadata | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 11-30-2010 10:50 PM |
Kindle edition discount with physical purchase? | cjschmidt | Amazon Kindle | 9 | 02-11-2009 09:42 PM |