From owner-freebsd-multimedia@freebsd.org Sat Jan 20 18:59:25 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48EBEEC04C9 for ; Sat, 20 Jan 2018 18:59:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 28ADD3323 for ; Sat, 20 Jan 2018 18:59:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 28115EC04C6; Sat, 20 Jan 2018 18:59:25 +0000 (UTC) Delivered-To: multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27BF3EC04C5 for ; Sat, 20 Jan 2018 18:59:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E8983322 for ; Sat, 20 Jan 2018 18:59:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id F16491ECA9 for ; Sat, 20 Jan 2018 18:59:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0KIxOct086366 for ; Sat, 20 Jan 2018 18:59:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0KIxOBG086364 for multimedia@FreeBSD.org; Sat, 20 Jan 2018 18:59:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: multimedia@FreeBSD.org Subject: [Bug 225343] multimedia/v4l_compat: Incorrect EVIOCGMTSLOTS ioctl which breaks libevdev Date: Sat, 20 Jan 2018 18:59:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dumbbell@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: multimedia@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jan 2018 18:59:25 -0000 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.=