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-26-2022, 11:13 PM   #841
kobo-a-one
Junior Member
kobo-a-one began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2022
Device: Kobo A1
hi guys,

I am experiencing some weird battery drain while Plato is in the sleep mode.
Model: Kobo Aura One (Mark 6, Model Number: 373, Firmware: 4.31.19086) WIFI and Sync is <OFF>

The problem occurs, when after reading a book and putting KA1 into sleep mode with the battery at ~86%. Next morning, in ca 8hrs, battery drops to ~43%.

1) there is a "System Info" tab that shows CPU load average in 3 columns like 0.3% / 3.2% / 4.5%. Could you explain what these 3 values stand for? Like hourly/daily/weekly or something else? (I am seeing some spikes up to 43% in the first column while waking up the reader from sleep in the morning)


2) is there a way to check system log, I'd like to see what's running in the background and perhaps identify a rouge process.

thanks in advance!

Last edited by kobo-a-one; 03-26-2022 at 11:17 PM. Reason: Added WiFi status
kobo-a-one is offline   Reply With Quote
Old 03-27-2022, 05:04 AM   #842
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by kobo-a-one View Post
The problem occurs, when after reading a book and putting KA1 into sleep mode with the battery at ~86%. Next morning, in ca 8hrs, battery drops to ~43%.
It might be worth checking that the Went to sleep …, Woke up … messages in info.log match your description.

Quote:
Originally Posted by kobo-a-one View Post
1) there is a "System Info" tab that shows CPU load average in 3 columns like 0.3% / 3.2% / 4.5%. Could you explain what these 3 values stand for?
Those are the load averages for the last one, five and fifteen minutes.

Quote:
Originally Posted by kobo-a-one View Post
2) is there a way to check system log, I'd like to see what's running in the background and perhaps identify a rogue process.
You can access the underlying Linux layer via Telnet or SSH.
baskerville is offline   Reply With Quote
Advert
Old 03-28-2022, 11:31 PM   #843
kobo-a-one
Junior Member
kobo-a-one began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2022
Device: Kobo A1
Quote:
Originally Posted by baskerville View Post
It might be worth checking that the Went to sleep …, Woke up … messages in info.log match your description.
You might be actually right, after checking the log:

event: Went to sleep on March 28, 2022 at 16:20. - closed the sleep cover after finishing the reading and the battery was at ca 95%

event: Woke up on March 28, 2022 at 16:46. Probably because of some movement in the bag where the kobo was, the system went online again. I haven't used the ereader during this time, neither powered it on manually.

event: Went to sleep on March 29, 2022 at 07:30. after checking the KA1 in the morning - battery was at 0% and I powered it off via the button at the back of the device.

Code:
Went to sleep on March 28, 2022 at 13:02.
Woke up on March 28, 2022 at 15:15.
Went to sleep on March 28, 2022 at 15:48.
Woke up on March 28, 2022 at 15:59.
Went to sleep on March 28, 2022 at 16:20.
Woke up on March 28, 2022 at 16:46.
Went to sleep on March 29, 2022 at 07:30.
Woke up on March 29, 2022 at 07:30.
Went to sleep on March 29, 2022 at 07:32.
Woke up on March 29, 2022 at 07:43.
Went to sleep on March 29, 2022 at 07:44.
Woke up on March 29, 2022 at 07:44.
I suspect the sleep cover is the culprit:
a) either it's powered on due to involuntary movements while being inside the bag;
b) or there is another process that wakes the reader up; (needs investigation)

would it be possible to control the behavior of the sleep cover from the Plato itself? say be able to enable/disable it? also perhaps power off automatically if the system is on for N minutes and there is no "activity"?

I will try to disable the Sleep Cover completely in Nickel and test again.

Quote:
Originally Posted by baskerville View Post
Those are the load averages for the last one, five and fifteen minutes.
Thank you, this makes sense now. Perhaps it would be more informative if we could add a bit more info about the timeframes in the description field, something like "1M | 5M | 15M"

Quote:
Originally Posted by baskerville View Post
You can access the underlying Linux layer via Telnet or SSH.
Could you point me to the right manual how to do that? AFAIK there is no sshd daemon running by default and it will require some installation.


Another quick question if I may

Is there a way to customize the keyboard layout? I can't get used to the "backspace" being on the left rather than in its usual position on the right? I tried to modify json file with the layout swapping the positions but it causes the plato to crash whenever the keyboard is called.

Thank you for your help.
kobo-a-one is offline   Reply With Quote
Old 03-28-2022, 11:40 PM   #844
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,529
Karma: 13088847
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
@kobo-a-one you can customize the layout. Look under .adds/Plato/keyboard-layouts. Edit the .json of your language. It should be fairly apparent what to do
Barty is offline   Reply With Quote
Old 03-29-2022, 04:39 AM   #845
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by kobo-a-one View Post
I suspect the sleep cover is the culprit:
a) either it's powered on due to involuntary movements while being inside the bag;
b) or there is another process that wakes the reader up; (needs investigation)
b) is impossible. An alarm is the only programmatic way of waking up a device.

Quote:
Originally Posted by kobo-a-one View Post
would it be possible to control the behavior of the sleep cover from the Plato itself? say be able to enable/disable it? also perhaps power off automatically if the system is on for N minutes and there is no "activity"?
In contrib/Settings-sample.toml, you'll find the descriptions of the relevant settings: sleep-cover, auto-suspend and auto-power-off.

Quote:
Originally Posted by kobo-a-one View Post
Could you point me to the right manual how to do that (Telnet, SSH)?
I'm using this Telnet package.

There's also this SSH package by @NiLuJe.

Quote:
Originally Posted by kobo-a-one View Post
Is there a way to customize the keyboard layout?
Yes there is: duplicate the layout you want to customize. Give it a new name, modify it and set it as the default layout in Settings.toml. Modifying english.json in-place isn't a good idea: since it belongs to the distribution archive, it would be overwritten when updating Plato.

Quote:
Originally Posted by kobo-a-one View Post
I can't get used to the "backspace" being on the left rather than in its usual position on the right? I tried to modify json file with the layout swapping the positions but it causes the plato to crash whenever the keyboard is called.
You might have a typo in one of the key names. The errors that might occur when loading keyboard layouts will be logged as of ef52407.
baskerville is offline   Reply With Quote
Advert
Old 03-29-2022, 07:58 AM   #846
kobo-a-one
Junior Member
kobo-a-one began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2022
Device: Kobo A1
Quote:
Originally Posted by baskerville View Post
In contrib/Settings-sample.toml, you'll find the descriptions of the relevant settings: sleep-cover, auto-suspend and auto-power-off.
Excellent. I have adjusted the parameters, as follows and will test again if it solves the problem. (99% sure it will)

Code:
sleep-cover = false
auto-share = false
button-scheme = "natural"
auto-suspend = 10
auto-power-off = 3
However, it is a bit strange that previously, when I was using the default config, neither auto-suspend nor auto-power-off didn't kick in after the device was dormant for over 10 hrs lying in the bag, and it the battery drained until 0%...

Quote:
Originally Posted by baskerville View Post
I'm using this Telnet package.

There's also this SSH package by @NiLuJe.



Quote:
Originally Posted by baskerville View Post
Yes there is: duplicate the layout you want to customize. Give it a new name, modify it and set it as the default layout in Settings.toml. Modifying english.json in-place isn't a good idea: since it belongs to the distribution archive, it would be overwritten when updating Plato.



You might have a typo in one of the key names. The errors that might occur when loading keyboard layouts will be logged as of ef52407.
That worked, I guess there was an issue with the file encoding when I saved the modified json first time.

@Barty Thanks for the tips as well.



Oh, and I just noticed that you are the creator of Plato program and wanted to thank you one more time for all your hard work, developing such a great product, and finding time to reply here. Now my Kobo is "alive" and super fast again. haha.
kobo-a-one is offline   Reply With Quote
Old 03-31-2022, 05:44 PM   #847
HknGrss
Enthusiast
HknGrss began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Oct 2021
Device: Kobo
How did the new version affect the Kobo Sage battery life?
In the old version the battery was draining very fast. How is it now?
HknGrss is offline   Reply With Quote
Old 04-02-2022, 04:29 AM   #848
Occivink
Member
Occivink began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2016
Device: Kobo Aura One
I can also report a spurious wake-up leading to full discharge issue on my kobo aura one. It happens rarely (twice that I can remember over the course of around 6 months). The latest occurrence was recently, yesterday evening I noticed that the battery was drained even though it should still have some juice, and today I see this in the log:
>Woke up on March 30, 2022 at 00:16.
>Went to sleep on March 30, 2022 at 07:47.
I definitely did not keep it open this long myself.

I also do not have a sleep-cover, nor is there anything/anyone that could pressing the button to wake the device up. What's surprising is that the auto-sleep does not kick in.
Occivink is offline   Reply With Quote
Old 04-02-2022, 05:22 AM   #849
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by kobo-a-one View Post
However, it is a bit strange that previously, when I was using the default config, neither auto-suspend nor auto-power-off didn't kick in after the device was dormant for over 10 hrs lying in the bag, and the battery drained until 0%...
Could you overwrite your Plato binary with the one present in the attached archive? It contains a modified version of Plato that logs all the raw input events (the cover events are encoded as key presses). (You'll have to set sleep-cover back to true.)

If you manage to reproduce the drain, please post the relevant excerpt from info.log.

@Occivink: you can also participate to the trial.
Attached Files
File Type: zip plato-log_input-01.zip (2.01 MB, 90 views)
baskerville is offline   Reply With Quote
Old 04-03-2022, 05:46 AM   #850
Occivink
Member
Occivink began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Oct 2016
Device: Kobo Aura One
I've installed the new binary. It might take a while, but I'll let you know if/when I can reproduce it. Thanks for you help, as always
Occivink is offline   Reply With Quote
Old 04-18-2022, 01:05 PM   #851
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Plato 0.9.27

I've released Plato 0.9.27.
baskerville is offline   Reply With Quote
Old 05-22-2022, 06:08 PM   #852
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,529
Karma: 13088847
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
@baskerville : a coding question, if you don't mind.

In Plato, what's the best way to extract the class of current paragraph in selection, if present? e.g., given

Code:
<p class="indent">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent tempus, quam vel elementum tincidunt, turpis diam elementum est, quis mattis eros erat vel velit. Nullam bibendum, libero ac gravida imperdiet, purus metus cursus tortor, sed pharetra tortor odio sed nibh. Aliquam in congue quam, vel vulputate turpis. 
</p>
I want to get the value "indent"

TIA
Barty is offline   Reply With Quote
Old 05-24-2022, 04:15 AM   #853
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by Barty View Post
In Plato, what's the best way to extract the class of current paragraph in selection, if present?
I'm not sure what you mean by current paragraph in selection?

The text layer doesn't have the classes. They are only present in the XML representation.

What are you trying to achieve?
baskerville is offline   Reply With Quote
Old 05-24-2022, 12:07 PM   #854
Barty
doofus
Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.Barty ought to be getting tired of karma fortunes by now.
 
Barty's Avatar
 
Posts: 2,529
Karma: 13088847
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
Quote:
Originally Posted by baskerville View Post
I'm not sure what you mean by current paragraph in selection?

The text layer doesn't have the classes. They are only present in the XML representation.

What are you trying to achieve?
What I want to do is long press somewhere inside a paragraph and have an option like "Normalize as indented paragraph". This will attach a custom rule to the stylesheet according to a user-defined template, such as

Code:
.indent {
    margin: 0;
    padding: 0;
    text-indent: 1.5em;
}
The idea is to lazily tweak CSS. I'm only interested in 2 cases: normal, indented paragraphs; and unindented paragraphs (such as at start of chapters). It's not possible to set the rule in epub-user.css since most of the time, the class name is something random like .calibre5 or .tx1, etc. The idea is to somewhat standardize the formatting w/o the nuclear option of "ignore document CSS".
Barty is offline   Reply With Quote
Old 05-25-2022, 07:59 AM   #855
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: 444
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
Quote:
Originally Posted by Barty View Post
The idea is to lazily tweak CSS.
If selection is Some(Selection { start: TextLocation::Dynamic(offset), .. }), then offset is an absolute byte offset that refers to a particular position in the spine seen as a continuous byte stream.

You can find the underlying vertebra using EpubDocument::vertebra_coordinates. You'll then need to parse that file as XML and find the element with the biggest byte offset less or equal to offset - start_offset.

I guess you'll also have to store the additional rules in the reading state.
baskerville is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) chrox KOReader 568 06-22-2024 03:07 AM
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill Kindle Developer's Corner 1268 02-27-2024 11:49 AM
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill KOReader 1219 01-27-2024 02:29 PM
v3 vs. v3+ as a pdf/DjVu reader hedonism_bot HanLin eBook 7 11-02-2010 08:16 PM


All times are GMT -4. The time now is 01:13 AM.


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