-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Kobo: Unable to *read back* a previously set RTC alarm on a Touch C #10996
Comments
do i change
|
If by "rebuild", you meant restart, then, yeah. Can't do it from within KOReader's text editor, because the settings will be overwritten on exit. That leaves USBMS, or whatever else you might want to do, as long as it's done while KOReader isn't running. |
a quick |
Standby keeps the lights on and the input wakeup sources active; suspend actually goes into full suspend to ram. You probably shouldn't be using standby on such an old device, it won't serve much purpose, and it hasn't been optimized for, so it's likely to suffer a large wakeup latency penalty. |
Isn't the AutoStandby plugin disabled on anything other than PB? |
Yes, but AutoSuspend provides an opt-in standby timer elsewhere ;). EDIT: Which is what I thought was implied here, since once shouldn't even be aware of the standalone AutoStandby plugin on Kobo. |
UPDATE: |
Check debug logs for |
|
The most simple solution is shown in #9182 |
Thanks @zwim that's what I was thinking of in https://www.mobileread.com/forums/showthread.php?t=356479 but I was missing a key component. |
@zwim can you explain the math behind 3/24 resulting in 3 hours? I can't wrap my head around it |
Numberpicker just picks a number. If this number stands for a day you can force with the colon not to check limits. |
@zwim I tried your method, still nothing, it does not power off. |
There's only one log, the slightly unfortunately named You'll need to enable verbose debug logging first, though (and restart KOReader). c.f., the issue template for all the gory details about logging. |
Unrelated, but
sounds extremely unclear. Unless the Touch C has yet another wonky quirk, night mode is honored no matter what. Keep in mind we do "fix" images while in night mode so that they don't look like negatives, which is perfectly normal. |
attached to this is crash.log |
Okay, the RTC on your device is dead (or at the very least its "setting a wakeup alarm" bits are), and you have a suspend timer lower than the shutdown timer, so it fails to wakeup during suspend to trigger shutdown ;). Given that device, it's also possible that RTC alarms just never worked, period. You'd have to double-check with a sane Touch C to confirm. Which would involve going back in time, so, good luck ;o). |
idk sometimes when I turned the kobo off with koreader the image of the book i'm reading has inverted color, idk why |
uhh is it bad? why the standard kobo interface autosuspend fine then? can it be repaired? |
Either it's aware of some quirks of the rtc chip we're not, or it just never suspends or shuts down properly (either are a possibility ;)). |
is there a way I can troubleshoot this further? |
If you can find a way to set an rtc alarm in a way that actually sticks, sure. |
You can also enable developer mode in Nickel, with the power management related bits enabled in the dev menu logging knobs, then check the syslog. As well as stracing Nickel to see if it does something funky with the rtc (or nothing at all). |
Is the book in question an ePub or a PDF?
Which one? If that was with #10996 (comment), then, first, I'd like to see the logs from it; and, yes, do double-check that #10996 (comment) still works. |
Also, does this always happen? Does it happen when going to suspend? Does it happen if you trigger a shutdown manually (via the Exit menu)? |
epub
before patching, I'm gonna share the crash.log (I hope it's the right one and not the old one, but it should be constantly dumping right? checked and it has today's date) |
it happens at seemingly random, both in sleep mode, power off mode, and sometimes even in "awake" mode; i'm gonna try to get out of a pattern of it and see if it's really random or it's triggered by something |
here is a log when this happened; i just turned on the kobo from standby mode |
Yup, that was the right one, and it confirms that the new approach ought to be more correct ;o).
That's enough of a pattern to tell me that it's a kernel issue ;). It vaguely rings a bell, so it must have been affecting a few other devices at some point. There's nothing we can do about it, given its random and "not our bug" nature, but you can work it around by disabling HW inversion. Here's a user patch doing just that. |
so do I apply the patch suggested here? |
Yup, (revert the previous one before, of course) |
I apply the user patch that you mention (I think, I plopped it in ~/.adds/koreader/patches), do I close this issue or further investigation or testing is needed? |
I'm just waiting on confirmation that the new rtc/suspend/shutdown patch works ;). |
uhh do you want the current log? |
That, too. But mainly an actual confirmation that it actually works? ;o). |
i'm an idiot, the actual patch works, the device does goes in autopoweroff after the set time. the color inversion one is acting.. funny, I permanently have everything negative now. anyway here's the log. |
Oh, you'll have to toggle nightmode off and on again for the userpatch not to screw things up, yeah. |
Actually, you might even need to drop the userpatch, restart KOReader, disable nightmode; apply the userpatch, restart; and then it'll behave. It swaps a flag that is assumed to be sort of immutable, so if the state changes while nightmode is enabled, shit happens ;). |
I roughly followed this procedure, but the user patch still screwed it up. I will try again with this exact procedure and report back though |
(re: userpatch) Works as expected this way on my end, FWIW ;). |
@NiLuJe confirmed, that patch makes the autopoweroff work fine, still testing the user patch for the color inversion thing |
I've just updated the userpatch to fix the breakage, which only happened when starting KOReader with both the patch applied and nightmode enabled. |
UPDATE: The patch for the autopoweroff is working fine, but the user patch is not; just started my kobo to read, and after starting koreader i was greeted with negative covers, no matter night mode being on or off |
#worksforme with the fixed revision, so, smells like PEBCAK ;). |
probably :/ i'll try to debug to debug some more. do I close the issue? since the main problem, the autopoweroff patch works for me |
It'll get closed automatically once the PR is merged ;). |
👍 thanks for the support! |
We've had a couple reports over the years of broken alarm reads on old NTX boards (in... every sense of the word; this only seems to affect old i.MX RTCs, true, but more specifically really old devices, with possibly dying batteries). e.g., koreader/koreader#7994 & koreader/koreader#10996 While there *is* an ioctl that is supposed to help with this sort of stuff by reporting on the state of RTC's battery voltage, in my own testing on much less broken RTCs, it was extremely unreliable (especially when it matters most, i.e., right after a wakeup), so, that's kind of a no-go. Thankfully, when this occurs, the returned alarm is *extremely* obviously bogus: `1`, as in, Epoch. TL;DR: Just ignore such return values and assume the alarm did indeed fire properly, we already validate against both the task and the current time, double-checking the actual alarm is just a defensive and pedantic guard against... something... setting alarms behind our back, which should never really happen in the first place, least of all on the affected platform (Kobo) ;). Also actually implement honoring WakeupMgr's character device selection, in case we ever need to actually use something other than rtc0 ;).
Does your feature request involve difficulty completing a task? Please describe.
no, it does not
Describe the solution you'd like
i would like to set the autoshutdown timer in hours, not days; on my standard kobo I have standby in 15 minutes, and poweroff in 2 hours, and I would like to replicate that with koreader
Describe alternatives you've considered
I.. haven't tried anything else, guilty as charged
Additional context
I don't think there is more needed? I have a kobo n905c
The text was updated successfully, but these errors were encountered: