Date: Sat, 20 Jan 2018 18:59:24 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 225343] multimedia/v4l_compat: Incorrect EVIOCGMTSLOTS ioctl which breaks libevdev Message-ID: <bug-225343-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225343 Bug ID: 225343 Summary: multimedia/v4l_compat: Incorrect EVIOCGMTSLOTS ioctl which breaks libevdev Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: multimedia@FreeBSD.org Reporter: dumbbell@FreeBSD.org Flags: maintainer-feedback?(multimedia@FreeBSD.org) Assignee: multimedia@FreeBSD.org The `EVIOCGMTSLOTS` ioctl is used to query a touchpad's multitouch state. libevdev calls it to initialise its internal state. On Linux, this ioctl is marked as "read". However, this is incorrect on Fre= eBSD because the ioctl takes the multitouch attribute to query as argument. Therefore, the ioctl must be marked as "read+write". Otherwise, the attribu= te doesn't make it to the evdev kernel driver and ioctl(2) returns EINVAL. The visible consequence of this problem is libinput: when you use it as your input DDX in X.Org (the same happens with Wayland probably), some touch eve= nts early in a session are dropped. You have to release and start another touch move do what you wanted in the first place (move the cursor, scroll, ...). The reason is that the multitouch state in libevdev has all fields set to z= ero at first (because the ioctl(2) failed). And when it receives a first touch event which indicate a tracking ID for 0, libevdev thinks there is a bug because the tracking ID is already set to 0, and decides to drop the entire touch action. Here is the message from libevdev: BUG: Device "..." received a double tracking ID 0 in slot 0. When the finger is released, the kernel sends a tracking ID of -1 which fix= es libevdev internal state. Thus, the next touch action does the right thing. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225343-13>