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-23-2019, 02:36 AM   #1
nunojpg
Junior Member
nunojpg began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2019
Device: KT4
Find out wakeup reason

After wakeup from sleep (echo mem > /sys/power/state), is there a reliable way, beside parsing dmesg, of finding it the wakeup was due to Button, RTC, or USB power?

OS is 5.12 (Linux 4.1).

Thanks!
nunojpg is offline   Reply With Quote
Old 09-23-2019, 08:50 AM   #2
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
What all have you tried and with what result?
(5.12.anything is rather new, you may be the first to have tried its behavior in this case.)

Last edited by knc1; 09-23-2019 at 08:53 AM.
knc1 is offline   Reply With Quote
Advert
Old 09-23-2019, 10:28 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,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
An rtc wakeup may trigger some extra logging from some of Amazon's stuff. But then again, maybe not if it wasn't setup by Amazon stuff ^^.

Otherwise, I don't think there's anything relevant in sysfs on those older kernels, but it can't hurt to take a look.
NiLuJe is offline   Reply With Quote
Old 09-23-2019, 03:20 PM   #4
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
try:
Code:
	
POWERD_STATES=`lipc-get-prop -s com.lab126.powerd state`
if [ "$POWERD_STATES" == "screenSaver" ] || [ "POWERD_STATES" == "suspended" ] ; then
	  # caused by RTC not by button press
fi
see https://www.mobileread.com/forums/showthread.php?t=322900 for more details, tested on 5.11
yparitcher is offline   Reply With Quote
Old 09-26-2019, 09:10 AM   #5
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 yparitcher View Post
. . . .
see https://www.mobileread.com/forums/showthread.php?t=322900 for more details, tested on 5.11
It has been almost a month now and you still haven't "attached the script".
(Use the "go advanced" editor choice to find and use the attachment functions.)
knc1 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RTC wakeup KT4 yparitcher Kindle Developer's Corner 1 09-26-2019 02:06 PM
Power consumption, sleep and wakeup issues ansman Kindle Developer's Corner 9 02-10-2016 03:46 AM
IQ PocketBook IQ: battery drain from random wakeup? hiaig PocketBook 10 03-15-2011 09:16 AM
【Best PDF Size】I find The reason of slowing When Read PDF file linlance Sony Reader 0 03-11-2010 08:13 AM


All times are GMT -4. The time now is 06:19 AM.


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