-
-
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 Aura H2O: no input other than off/standby button registered after resume #1007
Comments
Are you using KSM, if so, does its sleep feature work for you? Is it reproducible when you run the reader in a SSH shell? |
Affirmative, I'm using KSM as per the installation instructions, except I added the debug flag. The KSM sleep feature doesn't seem to work at all. It's more of a full screen refresh after which it's business as usual. I imagine the full screen refresh is supposed to happen when coming out of sleep. The sleep feature in vlasovsoftlauncher seems to work perfectly. I put it to sleep in vlasovsoftlauncher overnight and the device claims the battery is still 100%.
I'm afraid you'll have to explain what you want me to do. Run the program from within a screen or tmux session to which I can reattach after coming out of sleep or something? |
Okay, after fixing the debug output (3334903), redirecting stderr to stdout for clarity (
I tried adding some sleep statements as follows, but contrary to my earlier suggestion that seems to have no effect.
|
Where did you put the
Oh, I mean just run koreader in a persistent ssh connection and try to suspend with ssh running. BTW, where can get the source code for vlasovsoftlauncher? If suspend/resume works for vlasovsoftlauncher, we might be able to steal some ideas from it ;) |
In
I expect that might block suspending? Then again, I suppose it wouldn't really matter in this case.
You can't get the source as such, but you seem to be able to get partials here. Specifically, there is the Kobo-specific Qt code. On line 18 of
Which makes me wonder, is the SDL-based input.open("/dev/input/event1") also opening it as For the suspend.sh script you need the main download, but it's functionally no different than the one in KOReader. I slightly modified it to make sure it's actually working and not just pretending to by merely displaying the suspend image:
Behold, no error messages and the wake-up date isn't printed until I actually resume the device.
I don't understand why it starts |
I think what you are seeing w/ regard to the suspend script is a historically grown mess. Kobo input interfacing does not use SDL. It uses the (old, thus implemented a bit crude) input.c/input.h interface in base. SDL follows its API. There is no opening of any device with SDL, as SDL provides the input events. That part of the input API is a NOP for SDL. The debug statements will produce output only when debugging is enabled - i.e. you start koreader with the "-d" flag. That "wait endlessly" should be read in context of the "wait 100msecs" above it. In any case the waiting ends by an event... But you're right, that's the place where an event should be detected. As for debugging missing events after wake-up from suspend, I think input.c is the place to start looking. BTW: we open with (O_RDONLY | O_NONBLOCK). |
By the way: I've long since wanted to clean up input.c/input.h. It should be an FFI-based interface rather than being Lua/C API. Also, there's still some "emulation" code in there, i.e. SDL-interfacing. That isn't actually used anymore - there is an FFI-based interface for SDL, including input, in the "ffi" subfolder now. |
That's what I was trying to convey: most of the debug stuff works but not all of it. Without
Well, technically it doesn't suspend at all. I didn't realize that initially. Although I don't think it should make a difference.
Just a thought. So that's not it, then. :) |
I finally got around to checking on
So it looks like it's the framebuffer that's be blocking standby, but it's unclear to me why that should be the case. The "waiting for VEE stable ,please retry suspend later" line comes from That's followed by this strange-looking stuff:
|
I come bearing hopeful news. I obtained what seems to be a proper sleep by executing
This would suggest that something KOReader does while preparing for suspend is in fact blocking the device's ability to suspend. I'll have to perform some further tests on this tomorrow or in the weekend to double check. Also I will have to disable all of KOReader's power button handling to see if input might be working correctly after resuming. |
nice, so you are able to freeze the screen and wake up afterwards with this method? could you point me to the download link for the latest kobo kernel source code? |
Just FYI, in a few hours (I hope), I'll be done with a large reorganisation of our device/input/screen handling code. |
Yes, the screen stops responding until I press the power button to resume. It's now also confirmed by the suspend log: the double checking I referred to previously (OTA updates overwrote my debugging aids):
The kernel source is available here. Commenting out the power button's definition in input.lua suffices so that I'm now able to confirm that input is still working after resume. Once the reorganization is done, I figure the best way to debug this is by disabling all suspend/resume actions except calling suspend.sh and working up from there by re-enabling it one by one. Unfortunately because it has to be tested on the device that might take a while. Btw, I just realized that |
It is changed back: koreader/frontend/ui/device.lua Line 241 in b0682b0
|
Right, but by disabling KOReader's power button handling that was never called. :) |
OK, so the H2O doesn't want us to show the screensaver. Maybe, there's a bug lurking in the screensaver code, maybe it's the order of things we do - we'll see. Thank you so much for debugging! |
Interesting, looking at the driver code, we will only run into the "waiting for VEE stable" error code path when current jiffies is less than a global value |
@houqp
Unfortunately, however, it also results in a lack of any log files being written after resuming. The KOReader log ends here:
But the problem isn't limited to KOReader. My |
Hm... it's weird that we get another |
No, I already tried that, although not extensively. I'll check what it does in that particular case later. |
Although I could swear I tried setting I was under the impression that the Something like that is probably a good idea regardless in case someone presses the power button twice within a really short time period. But with the 10 second delay it pretty much becomes a necessity. |
Implement UIManager:unschedule(action). Fixes #1007.
Includes: * [fix] LuaRocks 2 and 3 compat (koreader#1004) * [fix] Revert Android Noto patch (koreader#1007) * [fix] Don't crash on SDL < 2.9 (koreader#1008)
Includes: * [fix] LuaRocks 2 and 3 compat (koreader#1004) * [fix] Revert Android Noto patch (koreader#1007) * [fix] Don't crash on SDL < 2.9 (koreader#1008)
Quoting jlynton:
I'd noticed the problem, but I had more pressing matters to deal with. After suspending the error log reads
sh: write error: Operation not permitted
(cf. #301 ?). However, I don't think it's related to the observed behavior. Addingsleep 2
to the suspend.sh script gets rid of the error, but nothing more.I was trying to investigate whether it's related to screen_saver_mode, but disabling the
if Device.screen_saver_mode
check in frontend/ui/uimanager.lua has no effect.I'm stuck at this point because of debug output issues. I start the program with
./reader.lua -d /mnt/onboard 1>koreader.log 2>crash.log
, but mykoreader.log
always ends up empty after a forced shutdown or reset, no matter how long I wait before doing so. So I suppose it must be something other than changes not being written to the filesystem yet.The text was updated successfully, but these errors were encountered: