|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
I thought it was impossible to schedule a wake-up on Kobo. If Nickel is indeed doing so in some wacky non-standard way, we want to know how. |
|
![]() |
![]() |
![]() |
#17 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#18 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
|
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
![]() My H2O has a wacky non-standard implementation of the Linux touch protocol, and the framebuffer is wacky too. This is true of many Kobos to some degree. If the H2O has a method to schedule wake-ups, it's not one specified by the Linux kernel docs. It's therefore non-standard by definition. Whether it's wacky is in the eye of the beholder, but as long as the standard methods aren't practically unusable even a superior non-standard implementation is wacky by default. Not on H2O, but it's interesting to know that it's not just 2013-era devices running older firmware on which that works. |
|
![]() |
![]() |
![]() |
#20 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
The Glo HD is a generation newer than the H2O (MK.6 vs. Mk. 5). If comparing my Forma to my H2O has taught me anything it's basically that everything was terrible until Mk. 6, so this doesn't surprise me too much
![]() Last edited by NiLuJe; 09-05-2019 at 09:27 AM. |
![]() |
![]() |
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Incidentally, that's the kind of thing I meant when I asked if this "indeed happens on all Kobos?" As stated in the linked references I was well aware that it was possible on the Kobo Touch, for example.
Edit: I just updated from 4.5 to 4.15 to see if there was anything new in the Linux kernel. There wasn't, at least not in this regard, but I do notice the wording changed from background sync to automatic sync. Edit 2: also also, here's an example of a customized Kobo kernel without wacky behavior. Concretely, it sends EV_SYN so the touch events actually work how they should, it doesn't have a wonky framebuffer, and it supports multitouch because the hardware does. Last edited by Frenzie; 09-05-2019 at 08:39 AM. Reason: About new firmware. |
![]() |
![]() |
![]() |
#22 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Good news, I figured it out. The Kobo Aura H2O wakes up at the time of the alarm set through a relevant ioctl RTC_WKALM_SET call.
You can test this, for example, by using: Code:
rtcwake -m on -s 300 The key is that if rtcwake tries to perform a suspend-related action it detects that it can't, but if you just set the alarm the device will wake up from suspend at the specified time. So I'm going to go with likely standard, but still kind of weird? Because the /sys/class/rtc/rtc0/wakealarm method is just a convenient way to do the same thing without having to compile a program. |
![]() |
![]() |
![]() |
#23 |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
I continue to think it's not difficult. You have simply to check if the device is in sleeping mode, and if it continues to be in that state for more than 1 day, you do shutdown, poweroff or every other command that Kobo ships. This will work if Kobo does not send STOP signal to all background tasks when it goes in sleep mode (I don't think so). It's basically something like this:
Code:
start_time=$(date +%s) while true; do sleep 3 # or whatever you want. 10? Write 10 # there should be a way to check if the device is in sleeping mode device_is_sleeping=boh if [ $device_is_sleeping -eq 0 ] ; then start_time=$(date +%s) else current_time=$(date +%s) elapsed_time = $(echo "$current_time - $start_time | bc) if [ $elapsed_time -ge 86400 ] ; then poweroff fi fi done Alternatively, there's /etc/pm/sleep.d . If Kobo has this folder and it works, you can follow this SO answer. Last edited by Lucas Malor; 09-05-2019 at 04:07 PM. |
![]() |
![]() |
![]() |
#24 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
Except when a device is in suspend... it's in suspend. You can't interact with it via software. For all intents and purposes, it's dead to the (user-space) OS.
Hence the need to setup a *hardware* wakeup via rtc (which will in turn wake the kernel up). |
![]() |
![]() |
![]() |
#25 | |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Quote:
|
|
![]() |
![]() |
![]() |
#26 | |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Quote:
I don't think Kobo do a real suspend mode. It probably shows the sleep image and then send a STOP signal to nickel. |
|
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Apologies for the tautology, but when you're sleeping you're sleeping. If a script were running it wouldn't be sleeping.
![]() You need to schedule a wakeup in x time to shutdown. That's precisely what Nickel does, only for some absurd reason they don't include relevant values. I don't know if memory is bad enough of a concern to use 8-bit here in the first place, but you can just apply those 8-bits to hours and presto, you've got yourself a relevant realm of options at your disposal. What you want is for the device to shutdown completely to preserve battery if you should let it sit for a few days. About 3-7 days probably makes the most sense as a default, although personally I'd go for something closer to two weeks. |
![]() |
![]() |
![]() |
#28 |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Anyway, if there's a real suspend mode, so it should exists an /etc/pm/sleep.d . You have to learn to read the entire posts, Niluge
![]() |
![]() |
![]() |
![]() |
#29 | |
Pain in the arse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Quote:
![]() Please, try. Do a stupid script that append to a file the current date every X seconds, put Kobo in sleep mode, resume it after a while and see in the file if there's a gap in data. If so, you have to use /etc/pm/sleep.d, if the dir exists. Last edited by Lucas Malor; 09-05-2019 at 04:29 PM. |
|
![]() |
![]() |
![]() |
#30 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo Forma: changing button behaviour | franklekens | Kobo Reader | 5 | 02-05-2019 03:28 PM |
Aura ONE Kobo Aura ONE touchscreen generating random button presses, unresponsive | pl8o | Kobo Reader | 3 | 12-25-2018 04:04 AM |
Notification about power button presses for the K5 and hopefully for the KPW | PaulFreund | Kindle Developer's Corner | 2 | 04-15-2013 11:55 AM |
Simulating Button Presses Externally | inuxy | Kindle Developer's Corner | 58 | 08-28-2012 01:55 PM |
PRS-T1 How can I use back button as power button? | younghere | Sony Reader | 1 | 03-12-2012 06:37 PM |