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

No response to touch before waking up from sleep #11844

Closed
enigmasc opened this issue May 18, 2024 · 10 comments
Closed

No response to touch before waking up from sleep #11844

enigmasc opened this issue May 18, 2024 · 10 comments

Comments

@enigmasc
Copy link

  • KOReader version: v2024.04-70-gdaf0fa4b4_2024-05-16
  • Device: Kobo Touch

Issues

No response to touch after opening Koreader. To have it work, I have to wait for Koreader to go into sleep mode automatically and then wake it up. Get it into sleep mode manually and then wake it up, no response.

v2024.04-71 has the same issue.

CRASH LOG:

[] Current time: 05/18/24-11:43:41
[
] Version: v2024.04-70-gdaf0fa4b4_2024-05-16

ffi.load: libs/libutf8proc.so.3
ffi.load: blitbuffer
ffi.load: fbink_input
ffi.load (assisted searchpath): ./libs/libfbink_input.so.1
[FBInk] /dev/input/event0: mxckpd = KEY | POWER_BUTTON | SLEEP_COVER | HOME_BUTTON | DPAD
[FBInk] /dev/input/event1: zForce-ir-touch = TOUCHSCREEN
[FBInk] [fbink_input_scan] open /dev/input/event2: No such device!
[ko-input] Forked off fake event generator (pid: 1329)
05/18/24-11:43:41 WARN Device:getKeyRepeat: EVIOCGREP ioctl on fd 7 failed: Function not implemented
05/18/24-11:43:41 INFO initializing for device Kobo_trilogy_C
05/18/24-11:43:41 INFO framebuffer resolution: {
h = 800,
w = 600
} --[[table: 0x2adb0620]]
ffi.load: libs/libmupdf.so
ffi.load: libs/libwrap-mupdf.so
ffi.load: sqlite3
ffi.load: libs/libfreetype.so.6
ffi.load: libs/libharfbuzz.so.0
ffi.load: libs/libzstd.so.1
ffi.load: libs/libcrypto.so.1.1
05/18/24-11:43:43 INFO opening file /mnt/onboard/Biographies/Out of Place (Vintage, 2000).epub
05/18/24-11:43:44 INFO Inhibiting user input
05/18/24-11:43:44 INFO Loading plugins from directory: plugins
05/18/24-11:43:45 WARN Error when loading plugins/kobolight.koplugin/_meta.lua cannot open plugins/kobolight.koplugin/_meta.lua: No such file or directory
05/18/24-11:43:47 INFO Restoring user input handling
05/18/24-11:51:20 INFO WakeupMgr: scheduling a chain of alarms for a wakeup in 259200
05/18/24-11:51:20 INFO WakeupMgr: scheduling wakeup in 259200 -> 1716263480
05/18/24-11:51:20 INFO WakeupMgr: scheduling wakeup in 193665 -> 1716197945
05/18/24-11:51:20 INFO WakeupMgr: scheduling wakeup in 128130 -> 1716132410
05/18/24-11:51:20 INFO WakeupMgr: scheduling wakeup in 62595 -> 1716066875
05/18/24-11:51:20 INFO Inhibiting user input
05/18/24-11:51:35 INFO Restoring user input handling
05/18/24-11:53:33 INFO WakeupMgr: scheduling a chain of alarms for a wakeup in 259200
05/18/24-11:53:33 INFO WakeupMgr: scheduling wakeup in 259200 -> 1716263613
05/18/24-11:53:33 INFO WakeupMgr: scheduling wakeup in 193665 -> 1716198078
05/18/24-11:53:33 INFO WakeupMgr: scheduling wakeup in 128130 -> 1716132543
05/18/24-11:53:33 INFO WakeupMgr: scheduling wakeup in 62595 -> 1716067008
05/18/24-11:53:33 INFO Inhibiting user input
05/18/24-11:53:34 INFO Restoring user input handling
05/18/24-11:53:46 INFO Powering off the device...
05/18/24-11:53:48 INFO Preparing to quit UIManager with exit code: 88
05/18/24-11:53:48 INFO UIManager: No dialogs left to show
05/18/24-11:53:48 INFO Tearing down UIManager with exit code: 88
[ko-input] Closed input device with fd: 9 @ idx: 2 (matched by idx)
[ko-input] Closed input device with fd: 8 @ idx: 1 (matched by idx)
[ko-input] Closed input device with fd: 7 @ idx: 0 (matched by idx)
Restoring original fb bitdepth @ 16bpp & rotation @ 3
[FBInk] Detected a Kobo Touch C (320 => Trilogy @ Mark 4)
[FBInk] Enabled Kobo w/o Multi-Touch quirks
[FBInk] Explicit EPDC wakeup isn't supported on this device
[FBInk] Clock tick frequency appears to be 100 Hz
[FBInk] Screen density set to 167 dpi
[FBInk] Variable fb info: 600x800, 8bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 2179072 bytes & line length: 608 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM (Default) base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Framebuffer pixel format: Y8
[FBDepth] Screen is 600x800 (608x3584 addressable, fb says 608x1792)
[FBDepth] Buffer is mapped for 2179072 bytes with a scanline stride of 608 bytes
[FBDepth] Current rotation is already 3!
[FBDepth] Switching fb to 16bpp @ rotation 3 . . .
Updating bitdepth from 8bpp to 16bpp
Sanitizing grayscale flag for bitdepths > 8bpp
Updating rotation from 3 (Counter Clockwise, 270°) to 3 (Counter Clockwise, 270°)
Bitdepth is now 16bpp (grayscale: 0) @ rotate: 3 (Counter Clockwise, 270°)
[FBInk] Detected a change in framebuffer bitdepth (8 -> 16)
[FBInk] Reinitializing...
[FBInk] Variable fb info: 600x800, 16bpp @ rotation: 3 (Counter Clockwise, 270°)
[FBInk] Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 2179072 bytes & line length: 1216 bytes
[FBInk] Canonical rotation: 0 (Upright, 0°)
[FBInk] Fontsize set to 16x16 (IBM (Default) base glyph size: 8x8)
[FBInk] Line length: 37 cols, Page size: 50 rows
[FBInk] Framebuffer pixel format: BGR565
[FBDepth] Screen is 600x800 (608x1792 addressable, fb says 608x1792)
[FBDepth] Buffer is mapped for 2179072 bytes with a scanline stride of 1216 bytes


@Frenzie Frenzie added the Kobo label May 18, 2024
@mergen3107
Copy link
Contributor

[FBInk] /dev/input/event0: mxckpd = KEY | POWER_BUTTON | SLEEP_COVER | HOME_BUTTON | DPAD
[FBInk] /dev/input/event1: zForce-ir-touch = TOUCHSCREEN
[FBInk] [fbink_input_scan] open /dev/input/event2: No such device!

@NiLuJe

@NiLuJe
Copy link
Member

NiLuJe commented May 18, 2024

I'm going to need verbose debug logs to see what's actually happening here.

Also, but less critically, the shell output from an ls -lash /dev/input, because WTH is going on with that ENODEV on a scandir walk o_O.

@NiLuJe
Copy link
Member

NiLuJe commented May 18, 2024

I have a sinking suspicion it's the old zForce deactivate/activate race rearing its ugly head again, as there's an open->close->open cycle going on with the new autoprobing (and I can't really use fdopen here to avoid the close->open).

That suspicion seems to be corroborated by the kernel sources, as open does run an activate command, and close a deactivate...

TL;DR: I'm also going to need the result from find /sys -name neocmd

@NiLuJe
Copy link
Member

NiLuJe commented May 18, 2024

You can also try to replace the libs/libfbink_input.so.1 by the one from the following archive (it'll sleep around the close to try to deal with the race).

fbink_input-zforce-race.tar.gz

@NiLuJe
Copy link
Member

NiLuJe commented May 18, 2024

That's still not verbose ;).

[Hamurger] > Help > Report a bug > Enable verbose logging

@enigmasc
Copy link
Author

That's still not verbose ;).

[Hamurger] > Help > Report a bug > Enable verbose logging

There you go. The last version that works on Kobo Touch without issues is v2024.04-34-gbaab32633_2024-05-11.

crash.zip

@NiLuJe
Copy link
Member

NiLuJe commented May 19, 2024

I'm mostly not seeing anything wrong in there.

Is the issue perhaps not reproduced on every startup?

e.g., the first series of launches after the update look perfectly sane.

The only launch that lacks input events is the final one at 6:55 where you ended up powering off the device.

Is that it?

In which case, see above: #11844 (comment) & #11844 (comment)

@NiLuJe
Copy link
Member

NiLuJe commented May 19, 2024

(If you don't happen to have SSH access, that find command is trivial enough and will only return one line, so you can do that from the Terminal plugin and screenshot the result).

NiLuJe added a commit that referenced this issue May 19, 2024
…11855)

Switch to a new `input.fdopen` API & wrapper so we can keep the fds opened by `fbink_input_scan` instead of closing them to re-open them right after that...

This should hopefully help on racy zForce devices that attempt to handle power management when opening/closing the device. We know this sometimes horribly fail to re-activate the IR grid (c.f., our manual activation on resume), but this apparently could also happen here (re: #11844) because of the quick succession of open->close->open.
@enigmasc
Copy link
Author

It's all good now after updating to ver2024.04-79-g4d9c6523a_2024-05-19. Thanks a lot!

@NiLuJe
Copy link
Member

NiLuJe commented May 20, 2024

Fixed via #11855

If anybody with a Touch C ever reads this, please get me the data requested in #11844 (comment), it could still be useful.

@NiLuJe NiLuJe closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants