From owner-freebsd-mobile@freebsd.org Mon Apr 17 11:00:00 2017 Return-Path: Delivered-To: freebsd-mobile@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 03C28D40F94; Mon, 17 Apr 2017 11:00:00 +0000 (UTC) (envelope-from jan.kokemueller@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 898D1D7A; Mon, 17 Apr 2017 10:59:59 +0000 (UTC) (envelope-from jan.kokemueller@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id d79so8310876wmi.2; Mon, 17 Apr 2017 03:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6SGpW05Sh3npRY/A3Eqioxmilsw8eDrxDFCzVJtH+IU=; b=JQVgrLnWXW2wgsqnTeiCd05cImO+Wd/jGVmfmjnQTQa2e2fB5K/tqJR53u82a2CEoE QYT76TSAQwnfgYiFxiZIfF5csMcQ9ek9/usbSkqh+XH6baqa0dIZ3/efw59hVr4sYV0B y0nKzB7u9O0n09z9BlEP63XwBWMEJSrBB9QG6+3ZqUtDz6t7PKDcx584EocGHXzPzmic B4wV4LMVhW/dZ4gESwv01ktTtTKlrRjMicd3dr6eTtnjL78mxCTxhoMF01V9kajGF6yg m26BM5yg0eSDtSWpO/nw6p+tIdxtSAQDIZmW5sUrT2KuTu5mMQ11JVjYrs1OmXk+bXiW rpUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6SGpW05Sh3npRY/A3Eqioxmilsw8eDrxDFCzVJtH+IU=; b=YA4qUTPSQ+fik7hKSSlTQGU9ii9RJia3y5+rmEu9tiWE09p/hFNJXLKStwlKs7d4ux Uvsl9TCAqe8JD/iq1h/i6X7yV6j3vbqLh2R4MM9ZzFDpmEFxi2ura5YGgpKmHEFChCC+ X81WpyUf5HR7/1vFiGgR63m9Xz5UXuwaiGmNt8sk/8TVOOw4p7f3d+9HumtwXlJLgcsF EDzSRbfrOodA/4yFfpygQnFr/Dpu0Bb9CubZEkyFTLRZ1giY0wfVYOBl/OrV/QBM09SV N++7WZii1s2zbfq+tu0413oX4kXl1B4lilAv9T7ngeutMUNa5JKJterGzsz9/MnZJlPW 8yow== X-Gm-Message-State: AN3rC/5iTyjD600WPLUcQYK64yi2FNv5FIUZqT5yE+hIlgo5/ofKoh7t 4ceyDzfH2Dr1ZQdb X-Received: by 10.28.158.82 with SMTP id h79mr8569404wme.59.1492426796941; Mon, 17 Apr 2017 03:59:56 -0700 (PDT) Received: from ?IPv6:2001:470:1f15:b1f:44c6:cb8a:223a:f4cc? ([2001:470:1f15:b1f:44c6:cb8a:223a:f4cc]) by smtp.googlemail.com with ESMTPSA id j26sm13818681wrb.19.2017.04.17.03.59.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 03:59:56 -0700 (PDT) Subject: Re: CFT: EVDEV support in psm(4) driver To: Vladimir Kondratyev , current@freebsd.org Cc: freebsd-mobile@freebsd.org References: <5fa9225de944d6cdac0b7e5749b452a9@kondratyev.su> From: =?UTF-8?Q?Jan_Kokem=c3=bcller?= Message-ID: <5446ec03-c501-a369-01fc-e58a7d8712d9@gmail.com> Date: Mon, 17 Apr 2017 12:59:55 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <5fa9225de944d6cdac0b7e5749b452a9@kondratyev.su> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2017 11:00:00 -0000 Hi Vladimir, this patch works great for me! I'm testing this with a semi-mt Synaptics touchpad and a TrackPoint of a Lenovo T420. I'm running 12-CURRENT (amd64) and Xorg 1.19.3 from Matthew's CFT with the libudev-devd backend. The Evdev devices are picked up correctly by libudev-devd and xf86-input-libinput (even the TrackPoint). I haven't tested this with xf86-input-synaptics (which is in maintenance mode) or xf86-input-evdev. I am not using xf86-input-mouse or xf86-input-keyboard. What works (everything): - true smooth scrolling with Xinput2 (tested with GTK3 Firefox or gtk3-demo) - TrackPoint scrolling holding the middle button - both horizontal/vertical scrolling - two finger scrolling powered by libinput (this semi-mt touchpad doesn't really support more gestures than this) The only thing that doesn't work out of the box is the mouse pointer on the VT console. It wouldn't be hard though to write a small tool that uses libinput to translate Evdev events into CONS_MOUSECTL ioctls needed for the VT pointer. Some comments: - PS2_MOUSE_SYNAPTICS_PRODUCT should be 0x0007, not 0x0009 (http://lxr.free-electrons.com/source/drivers/input/mouse/psmouse.h#L86) - The TrackPoint should be added with product id 0x000A as on Linux and with the INPUT_PROP_POINTING_STICK Evdev property set - I think it would be better if the same Evdev device names were exposed as on Linux (for example "SynPS/2 Synaptics TouchPad"). Many scripts using xinput to change device properties depend on the Linux device names. I've added a patch and comments to https://reviews.freebsd.org/D10265 . Even Linux 64-bit binaries work correctly with the created /dev/input/event* devices after applying those two patches here: - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218625 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218627 This will be very useful for Linux games using joysticks, game controllers etc. Cheers, Jan