Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-05-2019, 04:45 PM   #31
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by Lucas Malor View Post
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.
That happens to look something like this:
Code:
02/01/11-12:22:29 INFO  Kobo WiFi: disabling WiFi
02/01/11-12:22:45 INFO  Kobo suspend: going to sleep . . .
02/01/11-12:22:45 INFO  Kobo suspend: asked the kernel to put subsystems to sleep, ret: true
02/01/11-12:22:47 INFO  Kobo suspend: waited for 2s because of reasons...
02/01/11-12:22:47 INFO  Kobo suspend: synced FS
02/01/11-12:22:47 INFO  Kobo suspend: asking for a suspend to RAM . . .
02/01/11-12:22:47 INFO  Kobo suspend: ZzZ ZzZ ZzZ? Write syscall returned:  true
02/01/11-12:26:54 INFO  Kobo suspend: woke up!
02/01/11-12:27:09 ERROR Kobo suspend: putting device back to sleep, unexpected wakeups: 1
02/01/11-12:27:09 INFO  Kobo suspend: going to sleep . . .
02/01/11-12:27:09 INFO  Kobo suspend: asked the kernel to put subsystems to sleep, ret: true
02/01/11-12:27:11 INFO  Kobo suspend: waited for 2s because of reasons...
02/01/11-12:27:11 INFO  Kobo suspend: synced FS
02/01/11-12:27:11 INFO  Kobo suspend: asking for a suspend to RAM . . .
02/01/11-12:27:11 INFO  Kobo suspend: ZzZ ZzZ ZzZ? Write syscall returned:  true
02/01/11-12:29:36 INFO  Kobo suspend: woke up!
02/01/11-12:29:36 INFO  Kobo resume: clean up after wakeup
02/01/11-12:29:36 INFO  Kobo resume: unflagged kernel subsystems for resume, ret: true
The "unexpected wakeup" is the RTC_WKALM_SET I purposefully scheduled before suspending.
Frenzie is offline   Reply With Quote
Old 09-05-2019, 04:56 PM   #32
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
I'm sure I can learn also from Frenzie. It's the inactivity that drive me mad. Instead of discussing that something is impossible, try it.
Lucas Malor is offline   Reply With Quote
Old 09-05-2019, 05:00 PM   #33
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Frenzie, it's a stupid four line script. Can you please test it?

Code:
while true ; do
    sleep 3
    current_date=$(date -Iseconds)
    echo "$current_date" >> tempus_fugit.txt
done

Last edited by Lucas Malor; 09-05-2019 at 05:04 PM.
Lucas Malor is offline   Reply With Quote
Old 09-05-2019, 05:17 PM   #34
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by Lucas Malor View Post
It's the inactivity that drive me mad. Instead of discussing that something is impossible, try it.
Your slogan try it could apply to a few of your own statements:

Quote:
Originally Posted by Lucas Malor
I remember there's a way to check if Kobo is in sleeping mode. Probably `nickel` process is in stopped state, but also other third party programs stops nickel.
Quote:
Originally Posted by Lucas Malor
halt does not do a shutdown.
Quote:
Originally Posted by Lucas Malor
I don't think Kobo do a real suspend mode. It probably shows the sleep image and then send a STOP signal to nickel.
You seem confused about ACPI daemon as the only way to suspend a system.
You seem confused about the differences between halt and shutdown -h on a embedded device.

I would start for trying to probe my own points.

I'm not saying you have no reason in your past experiences but sometimes humans reach wrong conclusions.

I came to the conclusion that sleep mode didn't work because I was debugging a Kobo using usbnet module, which in fact prevents the device sleep. I had to watch a few places to know that I was wrong as my experiment was the thing to lead me to wrong conclusions.

So: are you sure that you're not preventing the system from falling asleep by writting stuff to a file?. If you are sure please explain how do you know. If not please try it
pazos is offline   Reply With Quote
Old 09-05-2019, 05:50 PM   #35
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
@Lucas Malor: But poweroff does, and poweroff *is* the halt applet in busybox (this is incidentally why I linked to the source of the applet because it made that fact fairly obvious, even if you're not familiar with busybox's applet backend) .

----

And, yeah, your script will definitely get shafted by a suspend, resuming only on... resume .

(EDIT: And someone already mentioned KOReader's own sleep script logging as an example, so, good job, everyone ).

I'm not familiar with /etc/pm/sleep.d, but that sounds like something controlled by a fancy-ish init system, which, err, is definitely not applicable to the Kobo, since they're using one of the simplest boot process out there (especially as opposed, to say, a Kindle, where upstart's depgraph can induce chtulhuesque nightmares). .
(It's also not the case on my desktop w/ OpenRC, FWIW).

EDIT: Wheee, missed a new page! .

Last edited by NiLuJe; 09-05-2019 at 05:53 PM.
NiLuJe is offline   Reply With Quote
Old 09-05-2019, 05:51 PM   #36
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
@Lucas Malor I did, rather extensively, back in 2014 to get the H2O to suspend reliably. If you get a log without interruptions it means that the device failed to suspend, for example because a particular module is still loaded. In order to suspend successfully, you must do it with a script. Wifi or USB will block it. If you don't wait at least 4 seconds after unloading all necessary modules then the H2O will almost certainly not suspend. If there's a full screen update you have to wait up to 8 seconds to suspend reliably. NB The H2O is an outlier.

The log I posted before shows exactly the same thing as the one below. I literally "tried it" half a dozen times this afternoon in order to get the result where the log was interrupted.
Code:
2011-02-01T19:09:37+0100
2011-02-01T19:09:40+0100
2011-02-01T19:09:43+0100
2011-02-01T19:09:46+0100
2011-02-01T19:09:49+0100
2011-02-01T19:09:52+0100
2011-02-01T19:09:55+0100
2011-02-01T19:09:58+0100
2011-02-01T19:10:01+0100
2011-02-01T19:11:53+0100
2011-02-01T19:11:56+0100
2011-02-01T19:11:59+0100
2011-02-01T19:12:02+0100
2011-02-01T19:12:05+0100
2011-02-01T19:12:09+0100
Frenzie is offline   Reply With Quote
Old 09-05-2019, 05:55 PM   #37
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
To bounce off @pazos's USBNet comment: surprisingly enough, Mk.7 devices *will* enter suspend while in USBNet, which was a welcome surprise (because it indeed made debugging this kind of stuff more annoying).
NiLuJe is offline   Reply With Quote
Old 09-05-2019, 05:57 PM   #38
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
TL;DR: Don't pick a fight about suspend on Kobos with a bunch of guys who lost a *lot* of sleep trying to figure out exactly how it behaved when working on KOReader ^^.
NiLuJe is offline   Reply With Quote
Old 09-06-2019, 04:15 AM   #39
baskerville
Evangelist
baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.baskerville ought to be getting tired of karma fortunes by now.
 
baskerville's Avatar
 
Posts: 446
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Here's a simple script to check if the alarm system works:
Code:
#! /bin/sh

set -e
WAKE_ALARM=/sys/class/rtc/rtc0/wakealarm
# Cancel an existing alarm.
echo 0 > "$WAKE_ALARM"
# Set an alarm one second into the future.
echo +1 > "$WAKE_ALARM"
# Check that the pseudo-file contains a Unix Epoch.
grep -q '^[0-9]\+$' "$WAKE_ALARM"
# The alarm should fire while we're sleeping.
sleep 2
# And now, the pseudo-file should be empty.
test -s "$WAKE_ALARM"
baskerville is offline   Reply With Quote
Old 09-06-2019, 06:28 AM   #40
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
@baskerville That's precisely why I mistakenly thought the H2O couldn't schedule a wake up. To illustrate using your lines:
Code:
[root@(none) ~]# cd /sys/class/rtc/rtc0/
[root@(none) rtc0]# ls
date           hctosys        power          time
dev            max_user_freq  since_epoch    uevent
device         name           subsystem
Code:
[root@(none) rtc0]# WAKE_ALARM=/sys/class/rtc/rtc0/wakealarm
[root@(none) rtc0]# echo 0 > "$WAKE_ALARM"
-sh: can't create /sys/class/rtc/rtc0/wakealarm: nonexistent directory
Nevertheless, the H2O can wake up if you ioctl RTC_WKALM_SET in spite of not having a /sys/class/rtc/rtc0/wakealarm sysfs file.

You can still query the state through /proc/driver/rtc.

Code:
# ./rtcwake -m on -s 300
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup using /dev/rtc0 at Tue Feb  1 12:26:53 2011
^C
[root@(none) sbin]# cat /proc/driver/rtc
rtc_time        : 12:22:10
rtc_date        : 2011-02-01
alrm_time       : 12:26:53
alrm_date       : 2011-02-01
alarm_IRQ       : yes
alrm_pending    : no
24hr            : yes
Frenzie is offline   Reply With Quote
Old 09-06-2019, 05:49 PM   #41
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Quote:
Originally Posted by pazos View Post
Your slogan try it could apply to a few of your own statements
I can't, because I broken my old Kobo with ssh and all other modifications I made. And now I have no time to dedicate, because I work.
Lucas Malor is offline   Reply With Quote
Old 09-06-2019, 09:45 PM   #42
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by droopy View Post
Hello, My Forma is a 3-week-old baby, and I love it so much. I spend so much time looking at her and picking her up whenever I am -- in line, lying down, in the bathroom, in the bus.

I think I'm ready to enhance her now in the form of patches/tweaks.

First thing I'd like to do is extend the "Automatically Power Off After" period to something longer than 60 minutes. (60 minutes is the longest period available in the Settings). Is there a patch/tweak that will auto power off my Forma after 24 hours of no taps/button-presses?
There is a way to do that. After seeing all the roundabout stuff in this thread, I decided to have a quick look and see if there is any way to increase the maximum timeout. Here are a few notes I made while looking into this:

Code:
N3PowerWorkflowManager::setupAlarm is called (this seems to be what allows it to power off during a sleep, etc):
    Gets PowerSettings::getAutoOffMinutes and PowerSettings::getAutoSleepMinutes
    Runs ::configureWakup for ::powerOff and ::requestSleep depending on values of autoOffMinutes autoSleepMinutes
    ::configureWakeup:
        Multiplies provided minutes by 60000 (min -> ms)
        Schedules a wakeup, when triggered, calls the provided function

N3PowerWorkflowManager::pollBattery (does the check, called through Qt's object system):
    Gets PowerSettings::getAutoOffMinutes and PowerSettings::getAutoSleepMinutes
    Multiplies each by 60000 (min -> ms)
    Compares with PowerManager::timeLastUsed
    Performs an action if needed

It seems that these two locations are the only ones which matter.

From a quick glance, it appears that it should be fine to patch these multipliers as long as they fit in a 64-bit signed
integer. But, note that the multiplier is a 32-bit signed integer. But, to be safe, don't make the largest possible timeout
longer than 596 hours (~35800 minutes), as I haven't checked all the places where it is used.
And here is a quick patch I put together for 4.15.12920 (untested, but it should work):

Code:
Larger Sleep/Power-off timeouts:
  - Enabled: no
  # Multiplier in N3PowerWorkflowManager::configureWakeup
  - ReplaceBytes: {Offset: 0xA1194C, FindH: 04 FB 05 F5, ReplaceH: 4F EA C5 45} # mul r5(dest), r4(multiplier), r5(mins)  -> lsl r5, r5, #19
  # Multiplier in N3PowerWorkflowManager::pollBattery
  - ReplaceBytes: {Offset: 0xA13692, FindH: 08 FB 00 F8, ReplaceH: 4F EA C0 48} # mul r8(dest), r8(multiplier), r0(mins)  -> lsl r8, r0, #19
  - ReplaceBytes: {Offset: 0xA136C2, FindH: 02 FB 00 F2, ReplaceH: 4F EA C0 42} # mul r2(dest), r2(multiplier), r0(mins)  -> lsl r2, r0, #19
  # Menu text
  - BaseAddress: 0xD48754
  - ReplaceString: {Offset: 0, Find: "5 mins\0", Replace: "8m"}
  - ReplaceString: {Offset: 8, Find: "10 mins", Replace: "34m"}
  - ReplaceString: {Offset: 16, Find: "15 mins", Replace: "1h1m"}
  - ReplaceString: {Offset: 24, Find: "30 mins", Replace: "4h4m"}
  - ReplaceString: {Offset: 32, Find: "45 mins", Replace: "12h5m"}
  - ReplaceString: {Offset: 38, Find: "60 mins", Replace: "24h1m"}
  # Values
  - BaseAddress: 0
  - ReplaceInt: {Offset: 0xACF230, Find: 5,  Replace: 1}
  - ReplaceInt: {Offset: 0xACF3F6, Find: 5,  Replace: 1}
  - ReplaceInt: {Offset: 0xACF288, Find: 10, Replace: 4}
  - ReplaceInt: {Offset: 0xACF432, Find: 10, Replace: 4}
  - ReplaceInt: {Offset: 0xACF2C4, Find: 15, Replace: 7}
  - ReplaceInt: {Offset: 0xACF46C, Find: 15, Replace: 7}
  - ReplaceInt: {Offset: 0xACF300, Find: 30, Replace: 28}
  - ReplaceInt: {Offset: 0xACF4A6, Find: 30, Replace: 28}
  - ReplaceInt: {Offset: 0xACF33C, Find: 45, Replace: 83}
  - ReplaceInt: {Offset: 0xACF4E0, Find: 45, Replace: 83}
  - ReplaceInt: {Offset: 0xACF378, Find: 60, Replace: 165}
  - ReplaceInt: {Offset: 0xACF518, Find: 60, Replace: 165}
And for custom values:
Spoiler:
Code:
python3>>> lsls=19; hrfrac=lambda ms: ms/1000/60/60; print("\n".join([f"{n} {int(hrfrac(n<<lsls))}h{int((hrfrac(n<<lsls)%1)*60)}m" for n in range(1, 255)]))
1 0h8m
2 0h17m
3 0h26m
4 0h34m
5 0h43m
6 0h52m
7 1h1m
8 1h9m
9 1h18m
10 1h27m
11 1h36m
12 1h44m
13 1h53m
14 2h2m
15 2h11m
16 2h19m
17 2h28m
18 2h37m
19 2h46m
20 2h54m
21 3h3m
22 3h12m
23 3h20m
24 3h29m
25 3h38m
26 3h47m
27 3h55m
28 4h4m
29 4h13m
30 4h22m
31 4h30m
32 4h39m
33 4h48m
34 4h57m
35 5h5m
36 5h14m
37 5h23m
38 5h32m
39 5h40m
40 5h49m
41 5h58m
42 6h7m
43 6h15m
44 6h24m
45 6h33m
46 6h41m
47 6h50m
48 6h59m
49 7h8m
50 7h16m
51 7h25m
52 7h34m
53 7h43m
54 7h51m
55 8h0m
56 8h9m
57 8h18m
58 8h26m
59 8h35m
60 8h44m
61 8h53m
62 9h1m
63 9h10m
64 9h19m
65 9h27m
66 9h36m
67 9h45m
68 9h54m
69 10h2m
70 10h11m
71 10h20m
72 10h29m
73 10h37m
74 10h46m
75 10h55m
76 11h4m
77 11h12m
78 11h21m
79 11h30m
80 11h39m
81 11h47m
82 11h56m
83 12h5m
84 12h14m
85 12h22m
86 12h31m
87 12h40m
88 12h48m
89 12h57m
90 13h6m
91 13h15m
92 13h23m
93 13h32m
94 13h41m
95 13h50m
96 13h58m
97 14h7m
98 14h16m
99 14h25m
100 14h33m
101 14h42m
102 14h51m
103 15h0m
104 15h8m
105 15h17m
106 15h26m
107 15h34m
108 15h43m
109 15h52m
110 16h1m
111 16h9m
112 16h18m
113 16h27m
114 16h36m
115 16h44m
116 16h53m
117 17h2m
118 17h11m
119 17h19m
120 17h28m
121 17h37m
122 17h46m
123 17h54m
124 18h3m
125 18h12m
126 18h21m
127 18h29m
128 18h38m
129 18h47m
130 18h55m
131 19h4m
132 19h13m
133 19h22m
134 19h30m
135 19h39m
136 19h48m
137 19h57m
138 20h5m
139 20h14m
140 20h23m
141 20h32m
142 20h40m
143 20h49m
144 20h58m
145 21h7m
146 21h15m
147 21h24m
148 21h33m
149 21h41m
150 21h50m
151 21h59m
152 22h8m
153 22h16m
154 22h25m
155 22h34m
156 22h43m
157 22h51m
158 23h0m
159 23h9m
160 23h18m
161 23h26m
162 23h35m
163 23h44m
164 23h53m
165 24h1m
166 24h10m
167 24h19m
168 24h28m
169 24h36m
170 24h45m
171 24h54m
172 25h2m
173 25h11m
174 25h20m
175 25h29m
176 25h37m
177 25h46m
178 25h55m
179 26h4m
180 26h12m
181 26h21m
182 26h30m
183 26h39m
184 26h47m
185 26h56m
186 27h5m
187 27h14m
188 27h22m
189 27h31m
190 27h40m
191 27h48m
192 27h57m
193 28h6m
194 28h15m
195 28h23m
196 28h32m
197 28h41m
198 28h50m
199 28h58m
200 29h7m
201 29h16m
202 29h25m
203 29h33m
204 29h42m
205 29h51m
206 30h0m
207 30h8m
208 30h17m
209 30h26m
210 30h35m
211 30h43m
212 30h52m
213 31h1m
214 31h9m
215 31h18m
216 31h27m
217 31h36m
218 31h44m
219 31h53m
220 32h2m
221 32h11m
222 32h19m
223 32h28m
224 32h37m
225 32h46m
226 32h54m
227 33h3m
228 33h12m
229 33h21m
230 33h29m
231 33h38m
232 33h47m
233 33h55m
234 34h4m
235 34h13m
236 34h22m
237 34h30m
238 34h39m
239 34h48m
240 34h57m
241 35h5m
242 35h14m
243 35h23m
244 35h32m
245 35h40m
246 35h49m
247 35h58m
248 36h7m
249 36h15m
250 36h24m
251 36h33m
252 36h42m
253 36h50m
254 36h59m

Last edited by geek1011; 09-06-2019 at 09:49 PM. Reason: Fixed offset for N3PowerWorkflowManager::configureWakeup
geek1011 is offline   Reply With Quote
Old 09-07-2019, 06:19 AM   #43
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,751
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by NiLuJe View Post
To bounce off @pazos's USBNet comment: surprisingly enough, Mk.7 devices *will* enter suspend while in USBNet, which was a welcome surprise (because it indeed made debugging this kind of stuff more annoying).
As an aside, I should probably specify that the device will suspend with USB plugged in as long as it's just charging.

Quote:
Originally Posted by geek1011 View Post
From a quick glance, it appears that it should be fine to patch these multipliers as long as they fit in a 64-bit signed
integer. But, note that the multiplier is a 32-bit signed integer. But, to be safe, don't make the largest possible timeout
longer than 596 hours (~35800 minutes), as I haven't checked all the places where it is used.
Very nice! That should make the OP quite happy indeed.
Frenzie is offline   Reply With Quote
Old 09-07-2019, 12:40 PM   #44
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Quote:
Originally Posted by NiLuJe View Post
@Lucas Malor: But poweroff does, and poweroff *is* the halt applet in busybox (this is incidentally why I linked to the source of the applet because it made that fact fairly obvious, even if you're not familiar with busybox's applet backend) .
From halt.c you linked:

Code:
//config:config HALT
//config:	bool "halt (4 kb)"
//config:	default y
//config:	help
//config:	Stop all processes and halt the system.
//config:
//config:config POWEROFF
//config:	bool "poweroff (4 kb)"
//config:	default y
//config:	help
//config:	Stop all processes and power off the system.
It seems they are the same binary that can halt, poweroff and shutdown. So in Busybox poweroff is *not* halt. It has the same binary, that it's probably called with a flag that do a poweroff. It must be so, or it has no reason to make an alias for halt to a known command name that do something different.

Last edited by Lucas Malor; 09-07-2019 at 12:45 PM.
Lucas Malor is offline   Reply With Quote
Old 09-07-2019, 01:00 PM   #45
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,804
Karma: 7025947
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by Lucas Malor View Post
From halt.c you linked:

Code:
//config:config HALT
//config:    bool "halt (4 kb)"
//config:    default y
//config:    help
//config:    Stop all processes and halt the system.
//config:
//config:config POWEROFF
//config:    bool "poweroff (4 kb)"
//config:    default y
//config:    help
//config:    Stop all processes and power off the system.
It seems they are the same binary that can halt, poweroff and shutdown. So in Busybox poweroff is *not* halt. It has the same binary, that it's probably called with a flag that do a poweroff. It must be so, or it has no reason to make an alias for halt to a known command name that do something different.
They are called based on the applet name (either a link to busybox, or specified as the first argument). Each mode changes the flag sent to reboot. And halting and powering off is slightly different. Halting doesn't remove power. Powering off does (but not on the Kobo, as I don't think it has POWER_RESET_IMX, but I haven't actually checked).

Also, regarding your earlier comment about /etc/pm/suspend.d, that is for pm-utils, which isn't even usually used on systemd anymore, so you won't even find it on most modern distros. The Kobo doesn't have pm-utils either, and it doesn't need it. And it does have a real suspend mode, which is why it sets a RTC alarm to wake it up. The reason why your script may have worked before is the periodic wake-up for syncing.
geek1011 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
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


All times are GMT -4. The time now is 08:35 AM.


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