Summary: | Pinch recognized but Swipe | ||
---|---|---|---|
Product: | Wayland | Reporter: | Francecso <postadelmaga> |
Component: | libinput | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | benjamin.tissoires, peter.hutterer, postadelmaga |
Version: | 1.5.0 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
evemu-record log
libinput-debug-event Log 3 Finger Swipe with fingers in line ( Up - Down x 2 times ) 3 Finger Swipe with fingers NOT in line ( Up - Down x 2 times ) Kernel git config Kernel config git (new) event-debug: short swipe not recognized Kernel config git (new 2) event-debug with git kernel RMI4 |
Description
Francecso
2016-12-12 13:26:54 UTC
I am running libinput 1.5.3 use evemu-record to record a few of these sequences please, then I can have a look on what's happening, thanks. Created attachment 128458 [details]
evemu-record log
Created attachment 128459 [details]
libinput-debug-event Log
Thanks Peter, I have recorded a couple of swipe up and down with 3 finger using `evemu-record` and `libinput-debug-event` ( I run them in the same ) Let me know if you need anything else rightyo, checked what's happening and tp_gesture_same_directions() at the end of tp_gesture_handle_state_unknown() isn't triggered by your gesture, i.e. it looks like the points are moving into different directions. not sure why yet but I'm seriously ETIME-ing here. if you know C, start in tp_gesture_handle_state_unknown and put a few printfs in to figure out what exactly is going on. use ./tools/event-debug --verbose to test so you don't have to restart all the time. Sorry I can't do more right now, this needs detailed analysis and that's what you can do best with the hardware in front of you :) Created attachment 128508 [details]
3 Finger Swipe with fingers in line ( Up - Down x 2 times )
Created attachment 128509 [details]
3 Finger Swipe with fingers NOT in line ( Up - Down x 2 times )
Alright, I am a dev but I work on PHP/JS so my C skills are quite basic ( last time I touched some C code is about 10 ys ago ) ... anyway the suggested mod are quite trivial so I was able to implement them, here my modifications to `tp_gesture_handle_state_unknown()`: http://pastebin.com/gu3QuCJw Now the problem is I am not sure what to do with the log :) What I can see it that the pinch is recognized most of the time when I swipe but the 3 fingers are not perfect in line, for example the middle finger above the other two( something like _-_ ). I have attached to logs containing one swipe up, one swipe down repeated 2 times, the first log is with all fingers inline the second with the fingers _-_ Let me know what else I can do, thax Note: I am not sure this is relate but sometime I get this message: " kernel bug: Touch jump detected and discarded ... " (In reply to Francecso from comment #9) > What I can see it that the pinch is recognized most of the time when I swipe > but the 3 fingers are not perfect in line, for example the middle finger > above the other two( something like _-_ ). one important thing: your touchpad can only track the position of 2 fingers at a time. for the third finger we merely get a "finger is down" bitflag but no position. So we cannot differ between a 3fg swipe and a 3fg pinch. If you fingers are set down in the order index, middle, ring, then chances are that it looks more like the start of a pinch gesture based on the finger position. This is solved with the switch to RMI4 in kernel 4.10, that will at least give us tracking of more than 2 fingers. But the real issue here is likely that we switch to pinch too early, as soon as we have 2 fingers down. In many cases, you have 2fg down before the third finger is detected. This definitely needs fixing. > Note: > I am not sure this is relate but sometime I get this message: > " kernel bug: Touch jump detected and discarded ... " That's also something that should be fixed with RMI4 and can also be the reason for the misdetection. I'll try to fix the above first, then we can look at this one separately. ok, after playing around with this on my touchpad here and looking at your recording, the issue seems to be that when putting the fingers down we get a massive cursor jump, sometimes across half the touchpad (also likely the source of the error message). This jump triggers the direction detection, making it look like a pinch. Fixing this requires quite a few hacks, so first I need to know if this is still an issue with the RMI4 support. Please test dmitry's kernel here: http://lkml.iu.edu/hypermail/linux/kernel/1612.2/00646.html Note that's an early v4.10 kernel, some stability issues are expected. Once installed, the touchpad will come up with some weird-looking name (SYN002 or similar) that's how you know it's using the RMI4 protocol. I have installed and compiled the given kernel but nothing looks to be changed and I also still have the error "libinput error: kernel bug: Touch jump detected and discarded ..." During the compilation I was prompted for some `RMI4` modules so I have included them ( just to be sure everything is correct I am attaching the .config used for compilation ) "... weird-looking name (SYN002 or similar)" -> where should I check this name ? Created attachment 128594 [details]
Kernel git config
it says in the kernel config: # CONFIG_RMI4_CORE is not set # CONFIG_HID_RMI is not set # CONFIG_MOUSE_SYNAPTICS_I2C is not set you'll definitely need rmi4-core, enable the other two as well, just in case. (In reply to Francecso from comment #12) > "... weird-looking name (SYN002 or similar)" > -> where should I check this name ? run sudo evemu-describe and it gives you a list of devices detected. The SynPS/2 synaptics touchpad will still be there but it won't send events. Instead, it'll be something with a name like "Synaptics TM3053-004" Created attachment 128598 [details]
Kernel config git (new)
I think this last kernel is ok ( see details below ) sudo evemu-describe ( still does not show the weird name ) Available devices: /dev/input/event0: AT Translated Set 2 keyboard /dev/input/event1: Lid Switch /dev/input/event2: Sleep Button /dev/input/event3: Power Button /dev/input/event4: PC Speaker /dev/input/event5: Video Bus /dev/input/event6: Video Bus /dev/input/event7: Dell AIO WMI hotkeys /dev/input/event8: HDA Digital PCBeep /dev/input/event9: HDA Intel PCH Headphone /dev/input/event10: HDA Intel PCH HDMI/DP,pcm=3 /dev/input/event11: HDA Intel PCH HDMI/DP,pcm=7 /dev/input/event12: HDA Intel PCH HDMI/DP,pcm=8 /dev/input/event13: SynPS/2 Synaptics TouchPad /dev/input/event14: XiaoMi USB 2.0 Webcam ... Anyway now: - Pinch / Swipe now looks ok !!! - sometime I still have the " ...Touch jump detected and discarded ..." (not very frequently )(not very frequently ) What I have noted is that when the swipe is really short sometime is detected: - a swipe but it does not trigger the relative `libinput-gestures` event (maybe it is a problem related to `libinput-gestures` ? - sometimes it detects a scroll - sometimes it is just say GESTURE_STATE_UNKNOWN Find attached a log with the swipe not recognized. This last issue is not so annoying: - 99% of the swipe (excluding the short one) are now recognized as expected :) but I thought it was worth to share it ( from my understanding libinput aim is to become a new standard in Linux ) In case you want to dig into it you find attached a log with 3 swipe Thank you very much for your help. Let me know if you want to dig more into the Touch Jump issue and the short swipe issue and what kind of info I can submit. = KERNEL Config Details ( extract from 'Kernel config git (new)') = CONFIG_RMI4_CORE=m CONFIG_RMI4_I2C=m CONFIG_RMI4_SPI=m CONFIG_RMI4_SMB=m CONFIG_RMI4_F03=y CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_F11=y CONFIG_RMI4_F12=y # CONFIG_RMI4_F30 is not set (not very frequently )CONFIG_RMI4_F34=y CONFIG_RMI4_F54=y CONFIG_RMI4_F55=y // I forgot this :( ( if it is important I'll recompile, just let me know ) # CONFIG_MOUSE_SYNAPTICS_I2C is not set Created attachment 128599 [details]
event-debug: short swipe not recognized
Huston we have a problem: My touchpad is not working at all now :( the pointer is displayed but it doesn't move and xinput doesn't show the device anymore. What I did: - I have recompiled the kernel adding the module: CONFIG_MOUSE_SYNAPTIC_IC2 - I rebooted the new kernel -> touchpad not working anymore Even if I boot the stock kernel the pointer Any idea what is going on here ? Ok I have solved skip my last 3 comments. I have compiled again the kernel with all the modules you suggested So far I cannot see any difference. Result with the GIT kernel: - Pinch is recognized instead of the Swipe - I don't see the weird name in `sudo evemu-describe` output - Still have the jump bug ( the reason why I though it is was working better is because I patched the `libinput` code to always recognize a Swipe ) ------------------------------------------------------------------------------ I am attaching the whole kernel configuration here the summary of the modules enabled: CONFIG_MOUSE_SYNAPTICS_I2C=m CONFIG_RMI4_CORE=m CONFIG_RMI4_I2C=m CONFIG_RMI4_SPI=m CONFIG_RMI4_SMB=m CONFIG_RMI4_F03=y CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_F11=y CONFIG_RMI4_F12=y CONFIG_RMI4_F30=y CONFIG_RMI4_F34=y CONFIG_RMI4_F54=y CONFIG_RMI4_F55=y I also have this xorg configuration file ( I am not sure if it can be any impact on the RMI4 thing not working ): Section "InputClass" Identifier " touchpad catchall" Driver "libinput" MatchIsTouchpad "1" Option "Tapping" "1" Option "DisableWhileTyping" "0" Option "TappingDragLock" "0" EndSection Let me know in case you need more informations Created attachment 128623 [details]
Kernel config git (new 2)
sorry, what I thought got merged is apparently still missing. At least I couldn't figure out how to get this one to work either. Benjamin's branch here should include everything: https://github.com/bentiss/linux/commits/synaptics-rmi4-v4.9-rc7%2B After booting, as root do: # echo 1 > /sys/module/psmouse/parameters/synaptics_intertouch # echo -n rescan > /sys/bus/serio/devices/serio1/drvctl That should work, except that at least for me it says: [ 556.052727] rmi4_smbus 9-002c: failed to get SMBus version number! Benjamin, any hints? Created attachment 128646 [details]
event-debug with git kernel RMI4
I have followed your instruction and attached a log with event-debug and the new kernel. Here my findings: - I do not see the weird name for the Touchpad - the jump bug looks solved - checking `event-debug` logs looks now better recognizing the SWIPE however libinput-gesture do not register any swipe/pinch now I also noted sometime I SWIPE and also the 3 finger tap get triggered. (In reply to Francecso from comment #24) > - I do not see the weird name for the Touchpad Your touchpad is now the "Synaptics TM3254-001" device, so this indicates RMI4 works. The old device stays around, but that's a cosmetic issue only, it doesn't send events. > - the jump bug looks solved ok, great, that's what I was hoping for. > - checking `event-debug` logs looks now better recognizing the SWIPE > however libinput-gesture do not register any swipe/pinch now > > I also noted sometime I SWIPE and also the 3 finger tap get triggered. hmm, not good, we may need some better handling there. I'm not sure about libinput-gesture though, event-debug uses the events as libinput provides them but iirc libinput-gesture depends on debugging output which is an unstable API. (In reply to Peter Hutterer from comment #22) > sorry, what I thought got merged is apparently still missing. At least I Yes, I did not manage to get everything in shape for v4.10. Ongoing process for v4.11 (crossing fingers). For the record, what we are missing now is just the binding from PS/2 and the report of the trackstick buttons through the trackstick node. > couldn't figure out how to get this one to work either. Benjamin's branch > here should include everything: > https://github.com/bentiss/linux/commits/synaptics-rmi4-v4.9-rc7%2B Yep, that's the one with all my patches. > > After booting, as root do: > > # echo 1 > /sys/module/psmouse/parameters/synaptics_intertouch > # echo -n rescan > /sys/bus/serio/devices/serio1/drvctl > > That should work, except that at least for me it says: > [ 556.052727] rmi4_smbus 9-002c: failed to get SMBus version number! > > Benjamin, any hints? Not sure why this is happening. Which laptop are you using? If it's one of the thinkpads, that's an issue we an solve out of the scope of this bug. Actually the more annoying bug here is that when I move the cursors sometime the tap is triggered. Should I open a new bug report for this problem ? Regarding this bug I am not sure if you have enough info on my side or whatelse I can do. (In reply to Francecso from comment #27) > Actually the more annoying bug here is that when I move the cursors sometime > the tap is triggered. > > Should I open a new bug report for this problem ? yes please, different problem so we need a separate bug. Sorry for late reply: I am actually running the last git code and Wayland ( before I was using xorg ) so far the behavior look much better. ( The main issue is now 3 fingers slide sometime act as 2 fingers scroll sometime as 3 fingers slide ... btw 4 fingers slide looks working fine ) You can close this bug: I'll open a more specific bug report in case I'll face other problems and once you'll release a new stable version of libinput. In the meanwhile, I want to thank you for your support and the amazing work you are delivering to the community :) Ok, thanks. I'm closing this as "moved" because I'm not sure what the correct resolution would be otherwise :) RMI4 should improve things and let's work on the other things one-by-one as we go along ver 1.8.1 I just want to confirm this is now working fine: - now all swipes are correctly recognized. ( it looks the pinch with 3 finger has been dropped in favor of the swipe ) Thanks you guys for making linux super cool :) |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.