Date: Sat, 20 Jan 2018 18:59:24 +0000 From: bugzilla-noreply@freebsd.org To: multimedia@FreeBSD.org Subject: maintainer-feedback requested: [Bug 225343] multimedia/v4l_compat: Incorrect EVIOCGMTSLOTS ioctl which breaks libevdev Message-ID: <bug-225343-12827-HpuFBLnhuE@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-225343-12827@https.bugs.freebsd.org/bugzilla/> References: <bug-225343-12827@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> has reassigned Bugzilla Automation <bugzilla@FreeBSD.org>'s request for maintainer-feedback to multimedia@FreeBSD.org: Bug 225343: multimedia/v4l_compat: Incorrect EVIOCGMTSLOTS ioctl which breaks libevdev https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225343 --- Description --- 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 FreeBSD because the ioctl takes the multitouch attribute to query as argument. Therefore, the ioctl must be marked as "read+write". Otherwise, the attribute 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 events 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 zero 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 fixes libevdev internal state. Thus, the next touch action does the right thing.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225343-12827-HpuFBLnhuE>
