Bug 103567 - [regression] Middle-click emulation broken
Summary: [regression] Middle-click emulation broken
Status: RESOLVED INVALID
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-03 22:59 UTC by Sami B.
Modified: 2017-12-13 05:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Sami B. 2017-11-03 22:59:59 UTC
Hi,

I have middle-click emulation enabled in Cinnamon (although `sudo libinput list-devices` says that it is not; is it because it doesn’t show per-user settings or does Cinnamon use some other mechanism?).

It used to work perfectly, but I recently upgraded libinput from 1.8.3 and 1.9.1, and since then, it often gets “stuck”, meaning that subsequent left clicks will be considered middle clicks until I right click again to “unstick” it (or occasionally the other way around, possibly depending on which button I happen to hit first when emulating the middle click).

After downgrading to 1.8.3 again and rebooting, the issue goes away completely.

I had a look through the recent messages on the mailing list and it looks like this patch could be the culprit, but I am far from being 100% sure: https://lists.freedesktop.org/archives/wayland-devel/2017-October/035551.html

Thanks.
Comment 1 Sami B. 2017-11-04 10:56:54 UTC
Sorry, I realized that the patch I pointed to has not been merged yet.

I will try to bisect the issue later today.
Comment 2 Sami B. 2017-11-04 15:12:07 UTC
I haven’t been able to reproduce the issue. I suppose that it was the reboot that fixed the issue, with nothing to do with libinput.

Sorry for the noise.
Comment 3 Sami B. 2017-11-04 17:57:14 UTC
Someone on IRC just mentioned a very similar problem (left click -> buttonpress 1, buttonrelease 1; right click -> buttonpress 3, buttonrelease 3; left+right click -> buttonpress 1, buttonpress 3, buttonrelease 1) which was solved by unplugging the mouse and plugging it back in, so there might be a recent regression after all. If it happens to me again, I will try to use evemu to capture the problem.
Comment 4 Sami B. 2017-11-04 18:06:12 UTC
Could the problem be caused by libinput entering “debounce mode” for the device, following https://github.com/wayland-project/libinput/commit/55d1bb1217388e99b9405654c14881a9ebf8f880?
Comment 5 Peter Hutterer 2017-11-06 05:54:27 UTC
could be, though button bouncing generally stops when the button numbers are mixed. I recommend running libinput debug-events --verbose because it'll print when debouncing activates.

Run evemu-record with the --autorestart flag, that way you can leave it running with a short pause to get a new recording. It'll help produce a short recording to reproduce the issue.

Also, libinput-debug-events can be run from the build tree without the need for restarting the session etc, making it ideal for e.g. bisecting.
Comment 6 Peter Hutterer 2017-11-15 04:07:19 UTC
probably a dupe of bug 103636. There's a patchset+branch to rework the debouncing code here: https://lists.freedesktop.org/archives/wayland-devel/2017-November/035782.html

please give that one a test, thanks.
Comment 7 Peter Hutterer 2017-12-13 05:51:31 UTC
closing after a month in needinfo


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.