01-28-2016, 10:05 PM | #1 |
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
KoReader's suspend problem on Kobos
Since KoReader has its own forum now, I can start a thread for an old, much discussed problem.
The random battery drainage when KoReader is in suspend mode. I first noticed it around Aug/2014 and I did some experiments since then with no luck. Many people have tried various things without success. Lately I use this handy mod to power off the device instead of putting it to sleep. There was this post at the main KoReader thread that make me try once again to substitute the KoReader's suspend script with that of the CoolReader's. I used a 2015.05 version to extract the script. The result was that after a night in suspend, the battery went from 100% to 77%, which shows that nothing changed. At least with my Glo. But since there is similar behavior with other models, so maybe its a common problem with a common fix... |
01-29-2016, 03:06 AM | #2 |
Evangelist
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
|
I was one of those who was having significant battery drainage during suspend on my H2O, however a combination of the following changes seems to have fixed the issue for me:
1. Replaced the Koreader suspend.sh with the suspend.sh from Coolreader (vlasovsoft) 2. Within the new suspend.sh I commented out the line . $ROOT/wifi_off.sh (Koreader does not have wifi_off.sh in Root and hunting for it seemed to make the suspend.sh unreliable). I do not use wifi so simply commenting out the line works for me. 3. Within frontend/device/kobo/device.lua I commented out the line [59] = "Power_SleepCover" (this is because I have a sleepcover, which also seemed to add unreliability in the suspend process in Koreader, which has no direct option to disable Sleepcover). 4. Finally, but this may be completely unnecessary, I extended to "12" from "10" the time in the line for UIManager:scheduleIn in frontend/device/generic/device.lua All of my changes came from me sifting through the invaluable posts of much cleverer others both here and on Github. I don't know if they are all necessary, but they do seem to have worked for me. |
Advert | |
|
01-29-2016, 07:30 AM | #3 |
Evangelist
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
That's really strange, I mean, this business with suspending koreader not working.
For example, I don't use WiFi at all (with my H2O that is, not at all with my other devices) and I didn't change CoolReader's suspend script in any way. And while testing CoolReader's suspend script I used magetic cover to suspend device on and off. I know that my 50 days of suspending device on one charge might be just pure luck, although very long streak of luck. There also may be reasons why suspending doesn't work in same way for different kobo devices? |
01-29-2016, 11:04 AM | #4 | ||||
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Quote:
Quote:
Maybe its an older script? Mine checks for the wifi status with this: Code:
# disable wifi if lsmod | grep -q sdio_wifi_pwr ; then wlarm_le -i eth0 down ifconfig eth0 down /sbin/rmmod -r dhd /sbin/rmmod -r sdio_wifi_pwr fi Quote:
Quote:
I'll change that to 20 and see how it goes... |
||||
01-30-2016, 05:57 AM | #5 |
Evangelist
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
This is CoolReader's suspend script I'm using (just for everyone to be sure which one is used in my testing):
Code:
#!/bin/sh export PATH=$PATH:/sbin:/usr/sbin echo "suspend.sh: enter" handler() { kill -15 $pid echo 0 > /sys/power/state-extended echo "suspend.sh: killed" exit 1 } trap handler SIGTERM sleep 10 & pid=$! wait $pid # disable wifi if lsmod | grep -q sdio_wifi_pwr ; then wlarm_le -i eth0 down ifconfig eth0 down /sbin/rmmod -r dhd /sbin/rmmod -r sdio_wifi_pwr fi echo 1 > /sys/power/state-extended echo "suspend.sh: delay 2s (dragon)" sleep 2 & pid=$! wait $pid echo "sleeping... zzz-zzz-zzz-zzz :)" sync echo mem > /sys/power/state echo 0 > /sys/power/state-extended echo "suspend.sh: normal exit" |
Advert | |
|
01-30-2016, 09:06 AM | #6 |
Evangelist
Posts: 482
Karma: 5277078
Join Date: Oct 2009
Location: UK
Device: Kindle Voyage, Kobo Clara HD, Kobo H2O, Boox Poke 2
|
. $ROOT/wifi_off.sh will be found in the suspend.sh in the pbchess-2015.12_kobo build (the latest version, I think). The suspend.sh script differs from earlier builds.
|
01-30-2016, 05:32 PM | #7 |
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Thank you.
I was getting the coolreader builds from here, and I thought it was abandoned. Checking its forum, I found the 15.12 build and got the suspend.sh from there. I will try it after some days, because since I changed that delay value, the reader seems to behaves normally. Could be a coincidence, so I have to give it some more days... |
01-31-2016, 06:56 AM | #8 |
Evangelist
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
Looking at my version, it's 2015.07, so I used older version from latest in my testing.
|
02-01-2016, 08:37 AM | #9 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
If all it takes is another 2s more of delay, I'll take that .
|
02-04-2016, 08:29 AM | #10 |
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Well, the news are bad.
After some normal behavior but with a couple of big drainages (15-20% overnight) the final straw was that after a day left in suspend with 43%, it went dead (0%). So the delay is not working, or not working all the time, or is unrelated. The problem is that I don't have anything else to check, since as I saw, the older scripts are identical to the new one with the exception of the wifi_off section that is just separated to a script of its own (maybe to be used from elsewhere too). Something that could be worth checking is the preventfreeze script from KSM, that I can not disable otherwise my Glo freezes. I thing some of the other Kobo models don't need it. It could be nice if the suspend script could disable/enable it. The code is simple: Code:
while : do sleep 1 done Other than that I will up the delay to 30 just in case ... |
02-04-2016, 08:54 AM | #11 | |
Evangelist
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
Quote:
Did you tried suspend script I posted here? For some reason it looks like it works on my device. But, of course, further testing could disprove this. |
|
02-04-2016, 10:35 AM | #12 | ||
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Quote:
The only way I found to see the actual percent is by exiting the koreader and go to the KSM>Tools>checkbattery.sh, or Nickel. So yes, when you see 43% just in koreader it might be really much lower, but not in my case. Quote:
That version does not close the wifi, but other than that its the same. |
||
02-04-2016, 04:43 PM | #13 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
To be exact, there's a problem with what the OS (and/or the HW itself) tells us about the battery status in general, it's potentially as bad in nickel .
The battery status in the top menu should always be up to date (as far as the OS tells us). I don't know about the infinite loop script, since I don't use KSM and don't have an affected device anyway, but, yeah, killing it might be a good thing to try. But since it's not KOReader's job to launch it, it'd need some patching on KSM's side to make sure it's restarted if need be? Or something. |
02-05-2016, 07:58 AM | #14 |
Evangelist
Posts: 440
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
|
For faulty battery reading, I noticed that on numerous devices, not just kobos. Even my cell phone (or mobile, however it's called in your country) was stuck in 55% from different apps for battery monitoring for days, till I "forced" reading.
What I want to say, it really can be something deeper in system (i.e. linux), not koreader related. Only real problem I see here is that koreader's suspend script doesn't enable device's battery to last as long as it last with nickel or CoolReader. On the other hand, I have workaround, to shut device off. |
02-13-2016, 08:34 PM | #15 |
Fanatic
Posts: 509
Karma: 60774
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Just to conclude this experiment with the use of cool reader suspend script, I have to state that for my Glo it totally failed.
There where randomly times that it seemed it was working, but also times that I was losing more than 5% per hour (in suspend). The last one, was from 100% to 0% after almost 3 days in suspend (with no reading). It could have died earlier AFAIK but even like that is unusable. Maybe its my device, but until something new happens from the devs, its back to Shut down, which is not that bad after all! ;o) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Koreader running on Kobos (all of them, hopefully!) | giorgio130 | KOReader | 3517 | 03-24-2024 05:43 PM |
Aura H2O Problem with KSM and/or Koreader -> Nickel full freeze | johnnyb | Kobo Developer's Corner | 8 | 04-15-2015 02:18 AM |
Mini KOreader--Request to solve CHM parsing the Chinese code problem | sbwtxj | Kobo Developer's Corner | 0 | 11-01-2014 01:06 PM |
[Koreader] Rendering problem on KPW2 | natto | Kindle Developer's Corner | 1 | 04-10-2014 10:42 AM |
iLiad Reason for suspend problem | bitz | iRex Developer's Corner | 0 | 10-01-2007 06:41 PM |