Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Insane Battery Usage? Libra 2 #307

Closed
seniorm0ment opened this issue Jul 28, 2023 · 18 comments
Closed

[Bug] Insane Battery Usage? Libra 2 #307

seniorm0ment opened this issue Jul 28, 2023 · 18 comments

Comments

@seniorm0ment
Copy link

Not sure if it is specifically Plato related, but it seemed to happen around the same time.

Kobo Libra 2, the device can be around 96% charged. Then after about a day and a half of it being in sleep, using the sleep cover (shows Plato's sleeping menu when opening the cover and then switches to Plato) so it seems like it is sleeping.

But after about a day and a half of no usage just being in sleep, I turn the device on (open sleep lid) and it's already at 17%. From just being at 96% a day and a half ago.

@seniorm0ment seniorm0ment changed the title Insane Battery Usage? Libra 2 [Bug] Insane Battery Usage? Libra 2 Aug 5, 2023
@seniorm0ment
Copy link
Author

Been playing around with it. It's really hard to tell if Plato is the exact cause, but it seems that way.
I exited Plato and left it on Kobo's main screen, and put it to sleep. I checked back 2 days later and it still had plenty of battery.

I did the same but launched Plato first, and then put it to sleep. 2 days later I check on it, and it is completely dead.
The backlight is not on when the cover is shut (I peeked). And it shows it's sleeping. So it seems to be working as intended, but it seems like maybe there is some CPU or Memory leak possibly that is killing the battery, despite being in "sleep" mode.

@baskerville
Copy link
Owner

Can you replace your Plato binary with the one attached in this comment and post the contents of info.log after having witnessed a battery drain?

plato-0.9.38-log_events-01.zip

@neabb
Copy link

neabb commented Aug 9, 2023

I want to corroborate that I too experience massive battery drain when idle with sleepcover on my Libra 2 whilst Plato is running.
I installed Plato pretty much immediately after I purchased my Kobo - it is a lot better than stock! But I noticed stock is able to operate for weeks - Plato seems to run down after a few days.

I will also install the file you have provided and send through logs when I get home.

@neabb
Copy link

neabb commented Aug 10, 2023

Want to follow up - either I have installed the file into ".adds\plato" and overwritten the binary, currently I can not get it to work as Plato gets stuck at launch and crashes back to Nickel.

Total reinstall of OCP Plato from mobileread fixed it, collecting logs now!

@seniorm0ment
Copy link
Author

Haven't had a chance to do the log events Plato, but if I can find some time I will.
I have done a reinstall of Plato though since this issue, and I didn't notice resolution. But curiously @neabb can you link the mobileread page you downloaded from?
Because I am using the one click install that has NickelMenu+Plato (no KOReader)

@neabb
Copy link

neabb commented Aug 13, 2023

Hi @seniorm0ment

I believe we are getting it from the same source.
Here is the link to the MobileRead forum topic:
https://www.mobileread.com/forums/showthread.php?t=314220
I just use the one called Plato but it shouldn't really matter which you choose after installing KFMon (I don't believe they interact with eachother at all).

Kobo Plato One Click

@neabb
Copy link

neabb commented Aug 13, 2023

I haven't experienced any egregious battery drain since installing the events log binary (which I'm guessing is identical to the latest release. In about 2 days, I have lost 9% battery without usage. I'll keep you posted and submit the logs when something egregious happens.

@baskerville
Copy link
Owner

the events log binary which I'm guessing is identical to the latest release

The only difference is that it writes every input event to standard error.

@neabb
Copy link

neabb commented Aug 13, 2023

Touching base with a development.

Attached is the info file.

info.log

Last night I launched Plato on my Libra 2, shut the sleep cover on the main menu and left it over night on ~93%. Ideally I wanted to leave it over the span of several nights but... when I opened the sleep cover this morning (~10 hours)... it was back on NickelMenu and with 10% battery drained. I had noticed I had been seeing a lot more of Nickel recently... figured it was just because of the drain...

So not only is something seemingly intensive happening in the background draining the battery, something dubious is causing a crash... sounds like a mystery for the great Baskerville...

@NiLuJe
Copy link
Contributor

NiLuJe commented Aug 14, 2023

@baskerville: Devices with physical keys have key repeat enabled. Assuming the code knows this and doesn't just assume the device should be kept awake because it keeps getting new input events, this should be pretty harmless and not prevent the kernel from ultimately entering suspend (although, admittedly, it's been a while since I double-checked).
And since everything is terrible and sleep covers are implement as an EV_KEY and not an EV_SW, they do repeat, which is hilarious, as the log perfectly shows (value is 2 for a repeat, and 59 is one of two codes for a SleepCover) ;).

Because I neither actually trust the fact that it shouldn't prevent suspend to hold true; because it make logs a right old mess; and because it's just plain useless noise & work for the input loop; we disable key repeat on suspend in KOReader (via the EVIOCSREP ioctl).

(I don't recall if I ever checked what Nickel does, because it takes a patch to prevent it from grabbing event0, and I'm too lazy ;p).

@baskerville
Copy link
Owner

@neabb Thanks for the log.

@NiLuJe The device never goes to sleep (otherwise the log would contain a Went to sleep on… entry): Plato ignores the VAL_REPEAT for this key code and unfortunately, the cover goes straight into VAL_REPEAT without any VAL_PRESS beforehand!

@NiLuJe
Copy link
Contributor

NiLuJe commented Aug 14, 2023

Well, that's... new ;D.

I've seen some janky logs from all kinds of wonky or chattering hall sensors, but that one is weird.

I... don't really see a sensible way of handling that that couldn't backfire in fun and interesting ways. (e.g., assuming the first REPEAT is a PRESS if a PRESS was never caught, but then you have to hope that you'll actually get a RELEASE at some point ;D).

@baskerville
Copy link
Owner

@neabb Could you, using the same binary, provide the log for the following sequence of actions :

  • Put the device to sleep using the power button.
  • Wait 30 seconds.
  • Close the cover.
  • Wait 5 seconds.
  • Open the cover.

@neabb
Copy link

neabb commented Aug 15, 2023

@baskerville
info.log

@baskerville
Copy link
Owner

Please try the attached binary: the device should now sleep properly when the cover is closed.

plato-0.9.38-cover_repeat-01.zip

@neabb
Copy link

neabb commented Aug 16, 2023

Just wanted to report my usage with the latest binary 'plato-0.9.38-cover_repeat-01':

Last night battery status: 99%
This morning battery status: 99%
Tonight's battery status: 99%
Needless to say, I haven't done much reading...

Otherwise a tremendous success - Plato on Libra 2 with Sleep Cover is fixed! No more massive drain.
Thank you very much for fixing that @baskerville

@seniorm0ment
Copy link
Author

seniorm0ment commented Oct 7, 2023

Just updated to the latest Plato release

It seems like battery life has improved, however still seems like a good bit of drain. I read for about 30min the other night on a full charge, put it to sleep, it's been 2 days sitting on the table idle sleeping, checked today and it has about a quarter of battery left.

Edit: It turned on for a min, now it seems like it's dead so maybe it was on the verge of dying. So yeah battery life still seems not amazing like it should be

@rafcon-dev
Copy link

Just updated to the latest Plato release

It seems like battery life has improved, however still seems like a good bit of drain. I read for about 30min the other night on a full charge, put it to sleep, it's been 2 days sitting on the table idle sleeping, checked today and it has about a quarter of battery left.

Edit: It turned on for a min, now it seems like it's dead so maybe it was on the verge of dying. So yeah battery life still seems not amazing like it should be

Might want o try the latest version, some battery isues have been solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants