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 08-24-2013, 03:54 AM   #1
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
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
zxczxc is offline   Reply With Quote
Old 08-24-2013, 06:22 AM   #2
aditya3098
Vala
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
aditya3098's Avatar
 
Posts: 599
Karma: 1588610
Join Date: Jan 2012
Location: Valinor
Device: Kindle touch (hacked to the core) 5.3.2.1
Disable screensaver:
lipc-set-prop com.lab126.powerd preventScreenSaver 1
Enable screensaver:
lipc-set-prop com.lab126.powerd preventScreenSaver 0
aditya3098 is offline   Reply With Quote
Advert
Old 08-24-2013, 06:24 AM   #3
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: 6029691
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.
twobob is offline   Reply With Quote
Old 08-24-2013, 08:58 AM   #4
knc1
99.44/100% On Holiday
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,182
Karma: 18200597
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.
knc1 is offline   Reply With Quote
Old 08-24-2013, 11:15 AM   #5
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..
Quote:
Originally Posted by knc1 View Post
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.
I think zxczxc is describing a peculiar scenario wherein:
  1. He's actually reading stuff on the PW (either directly or through vnc) and..
  2. He's doing page turning without touching the PW screen using xdotool(how?) and..
  3. He wants a means to 'wake up' the PW when it goes into screensaver mode

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
This either 'wakes up' the PW or puts it into screensaver mode..
meeting zxczxc's requirement of..
Quote:
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.

Last edited by nasser; 08-24-2013 at 11:17 AM.
nasser is offline   Reply With Quote
Advert
Old 08-24-2013, 12:06 PM   #6
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: 6029691
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.
twobob is offline   Reply With Quote
Old 08-24-2013, 12:47 PM   #7
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..
Quote:
Originally Posted by twobob View Post
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.
Well.. his requirement was also:
Quote:
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.
I'm quite lazy myself.. but don't know whether I'd go to the extent of setting up a bluetooth remote working through an android phone to control page turns on the Kindle..
nasser is offline   Reply With Quote
Old 08-24-2013, 01:32 PM   #8
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: 6029691
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
twobob is offline   Reply With Quote
Old 08-24-2013, 02:34 PM   #9
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
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.
zxczxc is offline   Reply With Quote
Old 08-24-2013, 03:45 PM   #10
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: 9,990
Karma: 17701002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@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
Works, the default tier 1 timeout is 600s.

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.
NiLuJe is offline   Reply With Quote
Old 08-24-2013, 04:15 PM   #11
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
Quote:
Originally Posted by NiLuJe View Post
@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
Works, the default tier 1 timeout is 600s.

May also want to investigate what the hell defer_suspe,d & suspend_grace do, but I suspect, as the name implies, that they're mostly for the tier 2 timeout (suspend).
ah, i just found out about lipc-probe -a from reading some thread about 20 minutes ago, and noticed touchScreenSaverTimeout, and have been testing it just now
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.
zxczxc is offline   Reply With Quote
Old 08-24-2013, 09:01 PM   #12
knc1
99.44/100% On Holiday
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,182
Karma: 18200597
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by zxczxc View Post
-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!
Ah, so.

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.)
knc1 is offline   Reply With Quote
Old 08-24-2013, 09:07 PM   #13
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: 9,990
Karma: 17701002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@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.
NiLuJe is offline   Reply With Quote
Old 08-25-2013, 08:11 AM   #14
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: 6029691
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.
twobob is offline   Reply With Quote
Old 08-25-2013, 09:35 AM   #15
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6727464
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]
This was right after touching something on the screen.

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
Maybe toying around with the loglevel property and looking at the logs could shed more light on this.
ixtab 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
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


All times are GMT -4. The time now is 01:26 AM.


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