Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2023, 07:32 AM   #1
noonas
Tinkerer
noonas began at the beginning.
 
noonas's Avatar
 
Posts: 10
Karma: 10
Join Date: Jan 2023
Location: Montreal
Device: Kobo Aura / Touch
Kobo Aura Deep Sleep command?

Hello there forum!

I am looking for a way to put my Kobo Aura (and Touch) in deep sleep and to WAKEW UP after a time or at a certain time.

I would like for my Dashboard to basically go in deep sleep during the night and during the day for periods of time and to wake up in the morning / evening.

I saw some posts but what I have tried does not seem to work and a link to some files rtcwake_kobo for example cannot be downloaded.



Any ideas?
noonas is offline   Reply With Quote
Old 03-21-2023, 01:53 PM   #2
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
The rtcwake binary in my KoboStuff package is patched to behave on recalcitrant i.MX boards, so it should Just Work (TM).

Just keep in mind you cannot enter suspend while Wi-Fi is enabled (that'll either hang or crash immediately or on wakeup, depending on the board).

See KOReader's suspend logic for all the gory details (which basically boil down to writing to 2 sysfs files, and some carefully tuned timing gymnastics. The sleep matters. A lot. As does the fact that this whole thing runs 15s *after* a suspend request). That's for suspend. We implement rtcwake ourselves, so I'll spare you that bit of hellscape .

Last edited by NiLuJe; 03-21-2023 at 01:58 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 03-21-2023, 02:01 PM   #3
noonas
Tinkerer
noonas began at the beginning.
 
noonas's Avatar
 
Posts: 10
Karma: 10
Join Date: Jan 2023
Location: Montreal
Device: Kobo Aura / Touch
Awesome, I will read up on this - and report back.
This means I need to disable wifi, sleep, enable wifi once back up
noonas is offline   Reply With Quote
Old 03-30-2023, 11:42 AM   #4
noonas
Tinkerer
noonas began at the beginning.
 
noonas's Avatar
 
Posts: 10
Karma: 10
Join Date: Jan 2023
Location: Montreal
Device: Kobo Aura / Touch
Where can I find the KoboStuff package s'il te plaît
noonas is offline   Reply With Quote
Old 03-30-2023, 12:44 PM   #5
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
It's over here: https://www.mobileread.com/forums/sh...d.php?t=254214

(When in doubt, it's linked in the Snapshot thread, which is pinned in the Kindle dev subforum).
NiLuJe is offline   Reply With Quote
Advert
Old 03-30-2023, 01:50 PM   #6
noonas
Tinkerer
noonas began at the beginning.
 
noonas's Avatar
 
Posts: 10
Karma: 10
Join Date: Jan 2023
Location: Montreal
Device: Kobo Aura / Touch
thats cool, thanks - so I have installed (on a TOUCH), I try to test it but fail - it hangs in the wakeup and re-enable WiFi..

Here is the script i use to test.
#!/bin/sh
sh wifidown.sh
sync
sleep 1
echo "sleeping..."
echo "Good night ZZzz" > sleeptest.log
rtcwake -m mem -s 5
sleep 2
sh wifiup.sh
echo "Good morning" > sleeptest.log


it seems to shut the wifi off, and maybe sleep? but it does not come back on

What I am trying to do (in Python, but can be called as a SH.) is to put the Kobo to Sleep at various times of the day (and over night) and wake up and resume.
noonas is offline   Reply With Quote
Old 03-30-2023, 02:12 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by noonas View Post
Awesome, I will read up on this - and report back.
This means I need to disable wifi, sleep, enable wifi once back up
You don't actually need WiFi on all the time. It's just a battery drain.
JSWolf is offline   Reply With Quote
Old 03-30-2023, 02:22 PM   #8
noonas
Tinkerer
noonas began at the beginning.
 
noonas's Avatar
 
Posts: 10
Karma: 10
Join Date: Jan 2023
Location: Montreal
Device: Kobo Aura / Touch
Thanks, well for one of my projects it need to be on as I pull data from the internet every. 5 min ..

As for another project it does not need to be on at all and as I was told, you need to turn off WiFi before you sleep - hence the turn off, sleep - turn on again trick I was trying to pull and failing
noonas is offline   Reply With Quote
Old 03-30-2023, 02:59 PM   #9
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Make sure Wi-Fi is *actually* down (specifically the chip having been *powered down*, not just network down).

Try to see if it works without re-enabling Wi-Fi straight away.

Try to see if it works without dealing with Wi-Fi whatsoever.

Remember my warnings about timings and pain (specifically mind your timings during the wifi power teardown; and sleep more before tripping suspend). . Refer to the KOReader scripts for details on all of the above.

Also, I don't quite remember how rtcwake works, but I would only use it to *setup* the alarm, not to actually trip the suspend. I'd handle that one myself (especially since you need to deal with the state-extended sysfs node, which is an ntx-special, so you *have* to do that yourself anyway).

Last edited by NiLuJe; 03-30-2023 at 03:01 PM.
NiLuJe is offline   Reply With Quote
Old 08-05-2023, 04:54 PM   #10
kobokindle64
Member
kobokindle64 began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2022
Device: kindle
Quote:
Originally Posted by noonas View Post
Thanks, well for one of my projects it need to be on as I pull data from the internet every. 5 min ..

As for another project it does not need to be on at all and as I was told, you need to turn off WiFi before you sleep - hence the turn off, sleep - turn on again trick I was trying to pull and failing

Hi there,

Did you get this working in the end? I am trying to achieve the same thing. I really like the KoboHUB project you published also.
kobokindle64 is offline   Reply With Quote
Old 08-10-2023, 10:53 PM   #11
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
I see where Frostschutz was able to record and play back a screen tap.

https://www.mobileread.com/forums/sh...8&postcount=19

Would it be feasible to record and play back a click of the sleep/power button?
Just tossing pasta at the wall...
elinkser is offline   Reply With Quote
Old 08-11-2023, 02:57 PM   #12
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You don't need to record anything, it's standard: it's just EV_KEY:KEY_POWER (the SleepCover has a few different less obvious key codes depending on devices, though, not that it matters here), so just push a properly setup evdev `struct input_event`.

But that doesn't matter if you're not running Nickel (or, whatever), as there'll be nothing to actually handle that input event .
NiLuJe is offline   Reply With Quote
Old 08-11-2023, 08:40 PM   #13
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
Quote:
Originally Posted by NiLuJe View Post
But that doesn't matter if you're not running Nickel (or, whatever), as there'll be nothing to actually handle that input event .

Darn. Too bad that part of Nickel can't be left running, while a 3d party app takes over...
elinkser is offline   Reply With Quote
Old 08-12-2023, 09:54 PM   #14
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,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Trust, me, you don't want that, it's more trouble than the perceived gains (see Kindles, where we keep powerd alive, and you get to enjoy weird mystical behavior that's way more annoying to deal with. It's great when it Just Works, but if you start trying to to wonky stuff, you're boned).
NiLuJe is offline   Reply With Quote
Old 08-13-2023, 03:30 PM   #15
elinkser
Groupie
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 185
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
Not to dispute what you're saying, since you've clearly walked the walk, but does KOReader not demonstrate that some kind of powerd, not necessarily Nickel's, could offer non-wonky functionality?
elinkser is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Aura One sleep cover Stingo Kobo Reader 50 11-05-2016 05:13 PM
Kobo aura HD stuck in sleep mode ire Kobo Reader 15 03-21-2016 07:22 PM
Kobo Aura HD frozen on sleep screen, Help please qwert Kobo Reader 11 02-23-2016 03:19 PM
Ended Kobo Aura HD Espresso w/sleep cover Fanchee Flea Market 3 10-09-2014 12:36 PM
Kobo Aura sleep cover Stingo Kobo Reader 10 06-27-2013 12:17 AM


All times are GMT -4. The time now is 03:59 AM.


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