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 09-15-2016, 08:36 AM   #241
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
The Github issues: first this one - then this one. There seems to be some progress, including new hope for the suspend issue on older devices, as well.

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 09-20-2016, 02:36 AM   #242
oldhasbeen
Enthusiast
oldhasbeen doesn't litteroldhasbeen doesn't litter
 
Posts: 32
Karma: 124
Join Date: Feb 2011
Device: Kobo Aura H2O
Question power consumption

I am currently fine tuning data on power consumption for Aura H2O (would most likely relate in principle to other models as well).
The battery current drain taken when idling in Nickel menu is about 2 mA. Running KSM 08 menu in idle needs approximately 10 mA.
Operating Koreader or any PB Chess application results in somewhat like 12 - 13 mA idle current. I cannot decide if KSM 08 uses power when another application is running. Is there a way to have KSM suspended while another app is active?
oldhasbeen is offline   Reply With Quote
Old 09-20-2016, 04:36 AM   #243
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
@oldhasbeen
I think there is nothing that should be needed to be suspended. KSM is rather a bundle of scripts and binary executables, than one executable. When you start an(other) application from KSM, no KSM binaries are kept running, but only scripts.

When you see the KSM main menu on the screen, the following KSM executables are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/kobomenu.sh
adds/kbmenu/kobomenu # This is the binary executable, the one that consumes power.

When KOReader is running, then from the KSM side, there are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/start_koreader.sh

When nickel is running, then from the KSM side, there are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/start_nickel.sh


Note: On default, there is one further KSM script running in the background, namely adds/kbmenu/onstart/preventfreeze.sh. You can disable it with the "configure" menu. (This needs rebooting to become effective, if I remember correctly).

As to your report on https://github.com/koreader/koreader/issues/2239, I guess you started nickel from KSM. If this is correct, then I would see the whole picture in this way: The binary kobomenu and KOReader have each about the same power consumption, when idle (10 or 12-13 mA average). Since both do basically the same job in this situation, I guess, namely waiting for user input, that seems reasonable. The outstanding thing is that nickel does the same job (waiting for user input) more efficiently.
tshering is offline   Reply With Quote
Old 09-20-2016, 07:48 PM   #244
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
So, it looks like that KSM don't add to battery drain, as almost same scripts run in background while koreader and nickel are used.

Maybe it is question how to optimize koreader to be more power efficient when running. But, it is not that big problem, as problem as koreader's suspend script (usually reader is longer suspended than running).

Maybe it is question of drivers, programming language, or something similar that makes koreader needing more power than nickel?
Alan_S is offline   Reply With Quote
Old 09-21-2016, 08:28 AM   #245
oldhasbeen
Enthusiast
oldhasbeen doesn't litteroldhasbeen doesn't litter
 
Posts: 32
Karma: 124
Join Date: Feb 2011
Device: Kobo Aura H2O
Smile

Quote:
Originally Posted by tshering View Post
@oldhasbeen
I think there is nothing that should be needed to be suspended. KSM is rather a bundle of scripts and binary executables, than one executable. When you start an(other) application from KSM, no KSM binaries are kept running, but only scripts.

When you see the KSM main menu on the screen, the following KSM executables are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/kobomenu.sh
adds/kbmenu/kobomenu # This is the binary executable, the one that consumes power.

When KOReader is running, then from the KSM side, there are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/start_koreader.sh

When nickel is running, then from the KSM side, there are running:
adds/kbmenu/onstart/ksmhome.sh
adds/kbmenu/onstart/start_nickel.sh


Note: On default, there is one further KSM script running in the background, namely adds/kbmenu/onstart/preventfreeze.sh. You can disable it with the "configure" menu. (This needs rebooting to become effective, if I remember correctly).

As to your report on https://github.com/koreader/koreader/issues/2239, I guess you started nickel from KSM. If this is correct, then I would see the whole picture in this way: The binary kobomenu and KOReader have each about the same power consumption, when idle (10 or 12-13 mA average). Since both do basically the same job in this situation, I guess, namely waiting for user input, that seems reasonable. The outstanding thing is that nickel does the same job (waiting for user input) more efficiently.
Thank You - that helps!
oldhasbeen is offline   Reply With Quote
Old 09-27-2016, 08:36 PM   #246
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
@tshering

I just tested something I noticed. I use koreader as main (acutally, only) reader and with it I use this small modification: https://www.mobileread.com/forums/sho...41&postcount=4

It adds option to quick toggle light and shut off device directly by using your power off script.

And here is the problem I noticed. When I shut off device and turn it on (even in next few seconds) there's a bit battery lost (well, this is a bit hard to tell), but also something more obvious: loss of about three minutes. Clock runs late by three minutes.

At first I thought it may be something caused by koreader, but jut now I tested, I exited koreader and powered off with KSM. There was about 3 minutes less.

I'm not sure what's going on and why clock is running late, but I hope you'll have some idea what's going on. You just need to first set time to be sure you have clock set correctly and then power off.

Please try and see if you also lose 3 minutes by powering off device. Or is it something H2O related?
Alan_S is offline   Reply With Quote
Old 09-28-2016, 04:00 AM   #247
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Alan_S View Post
@tshering

I just tested something I noticed. I use koreader as main (acutally, only) reader and with it I use this small modification: https://www.mobileread.com/forums/sho...41&postcount=4

It adds option to quick toggle light and shut off device directly by using your power off script.

And here is the problem I noticed. When I shut off device and turn it on (even in next few seconds) there's a bit battery lost (well, this is a bit hard to tell), but also something more obvious: loss of about three minutes. Clock runs late by three minutes.

At first I thought it may be something caused by koreader, but jut now I tested, I exited koreader and powered off with KSM. There was about 3 minutes less.

I'm not sure what's going on and why clock is running late, but I hope you'll have some idea what's going on. You just need to first set time to be sure you have clock set correctly and then power off.

Please try and see if you also lose 3 minutes by powering off device. Or is it something H2O related?
I do not have my Kobo with me. So I will test this only this night. I understand that the "small modification" has nothing to do with the time loss. Right. Did you try to power down from KSM without that koreader was running at all?

Last edited by tshering; 09-28-2016 at 04:03 AM.
tshering is offline   Reply With Quote
Old 09-28-2016, 12:49 PM   #248
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Alan_S View Post
Please try and see if you also lose 3 minutes by powering off device. Or is it something H2O related?
I do not lose 3 minutes. Maybe we are setting the time different. I am using two commands, the first is for setting the system time, and the next for synchronizing the hardware clock (otherwise the setting is lost when powering off), e.g.:
Code:
date 18:44:25
hwclock -w -u
tshering is offline   Reply With Quote
Old 09-28-2016, 07:27 PM   #249
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
Thanks, that was missing info. I didn't know that hardware clock isn't synchronized and it looks like it was 3 minutes off.

And yes, I mentioned, but it was a long text, I tested powering off from KSM, although "small modification" uses KSM's power off script (or can be made to use any power off script, but in my case it points to KSM's own).

Now I noticed there still is problem with "lost battery" from powering off. It may be something similar with clock problem.

I had (just tested powering off after I applied hwclock command) 100% before, after was 87% reported in koreader. Then I powered off again, than it showed 86%.

Is there a command to enable me to see real battery percentage, or something before I do power off and after? To be sure that it is just a question of battery percentage reading?

Or, is it possible that that much battery is lost? I do fast power off cycles, it looks strange how that much less battery I have after powering on.
Alan_S is offline   Reply With Quote
Old 09-28-2016, 07:51 PM   #250
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
How we can make script to automatically use both these commands?

For example, name of the script would be settime.sh, it would be run with same parameters as date (settime 23:12:11) and it would automatically set date to that time and afterward execute hwclock command.

Code:
#!/bin/sh

date $1
hwclock -w -u
How can I best run my newly created script settime.sh from KSM, or its terminal? Any suggestion how to set this up to easily set both system and hardware clock?
Alan_S is offline   Reply With Quote
Old 09-29-2016, 04:12 AM   #251
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Alan_S View Post
How we can make script to automatically use both these commands?

For example, name of the script would be settime.sh, it would be run with same parameters as date (settime 23:12:11) and it would automatically set date to that time and afterward execute hwclock command.

Code:
#!/bin/sh

date $1
hwclock -w -u
How can I best run my newly created script settime.sh from KSM, or its terminal? Any suggestion how to set this up to easily set both system and hardware clock?
I guess this should work:
Code:
#!/bin/sh
date "$*" 2>/dev/null && hwclock -w -u
I am unable to test it now.
tshering is offline   Reply With Quote
Old 09-29-2016, 04:42 AM   #252
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Alan_S View Post
I had (just tested powering off after I applied hwclock command) 100% before, after was 87% reported in koreader. Then I powered off again, than it showed 86%.
Is it the loss from 87% to 86%, or from 100% to 87% that bothers you? If it is from 87 to 86, I do not know how significant that difference is?

Quote:
Originally Posted by Alan_S View Post
Is there a command to enable me to see real battery percentage, or something before I do power off and after? To be sure that it is just a question of battery percentage reading?
If you use embryo's Measure battery duration for KSM, you can find the power status at the moment of powering off in /adds/kbmenu/t/log/uptime.txt. You can navigate to this file and read it with "tools > explore." You find the KSM 08 version in post #2. You can compare this to what KSM's check_battery.sh shows, after you reboot. The values are those provided by the system, how exactly they correspond to the real state of the battery I cannot say.

Quote:
Originally Posted by Alan_S View Post
Or, is it possible that that much battery is lost? I do fast power off cycles, it looks strange how that much less battery I have after powering on.
If you do fast power off cycles, does the power percentage continue to decrease each time? I mean after 10 times powering off do you go say from 86 to 78 or something like this?

Last edited by tshering; 09-29-2016 at 04:45 AM.
tshering is offline   Reply With Quote
Old 09-29-2016, 01:46 PM   #253
Ebri
Groupie
Ebri began at the beginning.
 
Posts: 150
Karma: 48
Join Date: Apr 2014
Device: Kindle Paperwhite 2, Kobo Aura HD
In nickel you also see some loss of the battery after reboot (Aura HD). As I know battery percentages are not too punctual, so indeed, i fit is 1-3% difference, then don't worry. If more... it is indeed strange.
Ebri is offline   Reply With Quote
Old 09-29-2016, 07:57 PM   #254
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
Quote:
Originally Posted by tshering View Post
I guess this should work:
Code:
#!/bin/sh
date "$*" 2>/dev/null && hwclock -w -u
I am unable to test it now.
How should I run this script (let's call it settime)?

./settime 20:44:21

This from terminal? Where should I put script in that case (what directory)? Please, advise on best way to create and run this script.

Also, maybe to include something like this in KSM? I see date options in KSM, but for some reason they don't work for me.

And thanks for code, can't karma your posts at the moment (did it too much before...).

Last edited by Alan_S; 09-29-2016 at 08:05 PM.
Alan_S is offline   Reply With Quote
Old 09-29-2016, 08:04 PM   #255
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
Quote:
Originally Posted by tshering View Post
Is it the loss from 87% to 86%, or from 100% to 87% that bothers you? If it is from 87 to 86, I do not know how significant that difference is?

If you do fast power off cycles, does the power percentage continue to decrease each time? I mean after 10 times powering off do you go say from 86 to 78 or something like this?
The problem was first drop, from 100% to 87% (this was last when I check, there was different numbers, but similarly significant drop).

Second cycle was more or less normal (87% to 86%), I guess this is something expected, reader uses a bit more power when powering, it also could "push" battery to a bit lower value from higher temporarily consumption.

I didn't do prolonged testings, just did two testing cycles, I guess that 10 cycles wouldn't go that low.

I also found your script for checking battery and when first used this, to check how KSM sees battery and then powering off and on, battery was at same level, so it is something with reading battery state from koreader (from which I call KSM's poweroff.sh).

I guess that everything is fine with KSM's power off script, just thing with time and sudden perceived battery percentage drop alarmed me.
Alan_S is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo-Adding alternative readers using Kobo Start Menu Ken Maltby KOReader 75 01-10-2020 01:35 PM
Kobo Start Menu tshering Kobo Developer's Corner 918 10-12-2017 02:32 PM
Kobo Start Menu 07 tshering Kobo Developer's Corner 644 03-02-2017 06:40 AM
QT Browser for Kobo Start Menu? gloriousglib Kobo Developer's Corner 1 05-24-2014 03:59 AM
Calibre start menu icon Cy1clown Calibre 1 02-06-2010 02:10 PM


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


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