-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zforce_ts / cyttsp5 touchscreen troubles (Kobo / Tolino) #9506
Comments
That'd be SDL, so I'm curious as to what it's actually outputting. I only have a vague experience with it, do we have a way to dump whatever it's sending right now? I don't remember if anyone's ever worked on devices with an actual touchscreen and SDL, does that ring a bell for anyone? (Also, I don't think we have OTAs for the Debian builds, and I happen to have landed a fair bit of refactoring to gesture detection since the release, so I would discourage testing on the release ;)). |
Do you mean devices as in things like the Kobo Clara HD? 'cause the SDL stuff works great on a touchscreen, also multitouch (to be precise, the events are picked up by SDL; I haven't worked on forwarding them to front).
Not on ota.koreader.rocks but you can grab 'em from Gitlab. |
should I try to record someting with evemu-device/evemu-record? osk-sdl in test mode works at the same setup. https://github.com/koreader/koreader/actions/workflows/build.yml?query=branch%3Amaster seems to produce only macOS stuff? So building master myself would be a starting point? |
Oh yeah! Works fine here:
I also tried a couple of years ago a RPi with a touchscreen, running without X. SDL worked as is in the framebuffer (w/EGL driver) but failed to register input events. Didn't play much with the thing but the ts was MT-B and I think most of the code we already have can be repurposed for a device like that that uses generic linux events as input and sdl as output. Back to OP issue, it could be something with the implementation of the ts drivers. Maybe it can be reproduced on other sdl apps? |
I tried osk-sdl in test mode on top of X and it gets its events. SDL here seems to get its events through X. |
Yeah, only macOS is built on GitHub, the rest is built over on GitLab, you should find the debian stuff in the build artifacts. |
I have no experience with SDL, but, FWIW, the SDL -> evdev mapping happens here. At a very quick glance, it won't do multi-touch (and I have no idea how SDL even reports that ;p). While fixing it would be nice, the proper solution (here, but especially for the fbdev kernels) would probably be a custom platform àla prstux that properly pokes at the evdev stuff directly and only uses SDL/fbdev for output like @pazos said. Depending on how much stuff needs to be implemented it might make sense to make it a subclass of the sdl/kobo platforms. |
Sure it will, just handle the finger stuff instead of pretending it's a mouse click. As I said above I might do that someday if I were slightly bored, but that's a somewhat unlikely proposition… |
Oh, yeah, I meant "as-is" ^^. |
well, it causes some library conflicts between mesa (oough, I hope it is not used) and libstdc++, so I cannot easily test that one. But I did some research using the last release |
touchfix.txt |
What's the exact error, for future reference? (I'm assuming SDL is responsible for pulling in mesa for OpenGL output, FWIW). EDIT: It doesn't do so directly on my desktop, so there may be hope there... EDIT²: I don't recall if the debian builds might not also be shipping some libs from the build env as a poor man's workaround, which might not help the situation (ping @pazos). |
depends on the use-case If running on top of X11/weston amoung other apps, it is probably a bad idea to use evdev directly, because then it is assumed to handle input just like any other application and use whatever is configured. If it is running more in a standalone way, things might be different. |
I'd need to double-check because I'm unfamiliar with the SDL_Event giant sack of union'ed structs, but that indeed looks like a bug (e.g., accessing the wrong layout in the union). |
it includes some libraries, especially the libstdc++, creating mess here
without the c**p at the beginning of the path, the following open should be successful
Doing
And starting again:
|
That's... interesting. And also rings a bell? (#9091). It's possible the lack of MT support in the code flags the wrong stuff as down/up and as such doesn't generate contatc moves or... something? |
generated events out of fingermotion have zero x/y, probably something rounding down the float ranging from 0..1) to zero. |
Re: #9506 (comment) I can't comment on the funky LD_LIBRARY_PATH (ping @pazos), but shipping the STL in Debian builds is definitely an oversight on my part ;). |
It's essentially doing I'm... not quite sure where that S.w/S.h comes from, but I'm assuming it's supposed to be the SDL window's dimensions, and I would guess those are 0 here for... some reason? (EDIT: I'm assuming the actual dx/x & dy/y floats in the actual SDL events are sane?) |
event.tfinger.x/y are zero.
Tested with that snippet. S.w/h are sane. |
Huh. What about the deltas? (As I could imagine an optimization where they left computing updated positions to the caller solely based on the delta data?) |
debian is like the emulator. It repurposes sdl2 from the target to avoid X11/wayland deps. The rest is the same, with the exception of a couple of fonts. |
I get same values for tfinger.x if I ssh -X desktop on the ebookreader and start koreader on the desktop cpu (=amd64 arch, both sides use debian bullseye). |
What about tfinger.dx & tfinger.dy? (If those are sane, dealing with it properly would require having a sane tfinger.x & tfinger.y on FINGERDOWN, though). |
ok, fond the root issue SDL_TouchID and SDL_FingerID size conflict |
oops, totally misleading typo |
Once again foiled by ffi-cdecl's inability to leave C99 typedefs alone... Also, refreshed against SDL 2.24.0 Re: koreader/koreader#9506
Goddamnit. Nice catch. I went on a hunt for those a while ago, but I obviously missed those, thanks! |
NiLuJe/koreader-base@6235941 ought to fix it then ;). EDIT: Nope, not just yet... |
Once again foiled by ffi-cdecl's inability to leave C99 typedefs alone... Also, refreshed against SDL 2.24.0 Re: koreader/koreader#9506
Take two at koreader/koreader-base@9160d36 should actually fix it for realz ^^. |
Once again foiled by ffi-cdecl's inability to leave C99 typedefs alone... Also, refreshed against SDL 2.24.0 Re: koreader/koreader#9506
I build the deb target overnight and installed it. Seems to work now. |
Once again foiled by ffi-cdecl's inability to leave C99 typedefs alone... Also, refreshed against SDL 2.24.0 Re: koreader/koreader#9506
* Android: Make sure sdcv can find the STL * DocCache: Be less greedy when serializing to disk, and only do that for the *current* document ;). * CanvasContext: Explicitly document API quirks. * Fontlist: Switch the on-disk Persist format to zstd (it's ever so slightly faster). * Bump base for koreader/koreader-base#1515 (fix #9506)
Environment
Issue
Touchscreen does not interact properly with KOReader
DISPLAY=:0 xte "mouseclick 1"
(e.g. from a ssh session)Steps to reproduce
start koreader in environment described above and try to interact with it.
The text was updated successfully, but these errors were encountered: