From owner-freebsd-mobile@FreeBSD.ORG Tue Feb 21 11:22:56 2006 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F0D516A420 for ; Tue, 21 Feb 2006 11:22:56 +0000 (GMT) (envelope-from dumbbell@freebsd.org) Received: from tabatha.dolphian.net (tabatha.dolphian.net [213.91.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1AD743D55 for ; Tue, 21 Feb 2006 11:22:55 +0000 (GMT) (envelope-from dumbbell@freebsd.org) Received: from [192.168.100.139] (LAubervilliers-151-11-77-139.w193-251.abo.wanadoo.fr [193.251.68.139]) (authenticated bits=0) by tabatha.dolphian.net (8.13.3/8.13.3) with ESMTP id k1LBMnw8024074 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT) for ; Tue, 21 Feb 2006 12:22:54 +0100 (CET) (envelope-from dumbbell@freebsd.org) Message-ID: <43FAF809.60106@freebsd.org> Date: Tue, 21 Feb 2006 12:22:49 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20060205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-mobile@freebsd.org X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [PATCH] Fixes and improvements for Synaptics Touchpads X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 11:22:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I sent a similar mail a month ago on freebsd-current@ but didn't get any feedback, so I try here. In this new mail, I begin with the content of the previous mail about the initialization of the touchpad. After that, I'll talk about coordinates filtering and virtual scrolling. 1. Initialization correction The Synaptics TouchPad on my laptop (Asus V6V, Synaptics TouchPad V5.9) doesn't work at all with FreeBSD -CURRENT (neither with 6-STABLE). In psm.c:psmprobe(), the touchpad reverts back to Relative mode (default mode) just after auxiliary kbdc ports are disabled. A workaround is to send a Read Mode Byte command: the touchpad is again in Absolute mode. Because I don't know if other laptops/touchpad versions work with current psm(4), I'd be happy with success/failure reports with this patch from people who have (working or not) touchpads. To enable Synaptics support, you must add this line to your /boot/loader.conf: hw.psm.synaptics_support="1" If psm(4) gurus think this isn't the right way to fix it, please tell me. The patch is available at: http://people.freebsd.org/~dumbbell/synaptics/psm-synaptics-abs_mode-c.patch 2. Coordinates filtering This next patch processes raw coordinates to improve the smoothness of the movements. The algorithm is almost the same as before but corrects the behaviour when the finger doesn't move or move slowly. Also, the pointer won't "jump" when the finger taps or leaves the touchpad. Like the current driver, this patch still simulates right and middle click with two and three fingers tap respectively. It adds the support for tap-hold (to move a window with a single finger for instance). To tweak the behaviour, one can use the same sysctl's as before. The patch is available at: http://people.freebsd.org/~dumbbell/synaptics/psm-synaptics-filtering-c.patch (it includes the previous one) 3. Virtual scrolling To simulate wheels, one can define a margin around the touchpad for virtual scrolling. When an action starts inside this area, the driver won't report X/Y movements but changes in the Z axis. It supports vertical and horizontal scrolling and both can be used at the same time when the finger goes to diagonal (not sure with this expression). The margin may be tuned with the hw.psm.synaptics.directional_scrolls sysctl (expressed in touchpad units; the touchpad widhth and height are both 6143). The patch is available at: http://people.freebsd.org/~dumbbell/synaptics/psm-synaptics-virtualscrolling-c.patch (it includes the two above) As with the first patch, I'd be happy with success/failure reports. Best regards, - -- Jean-Sébastien Pédron http://www.dumbbell.fr/ PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFD+vgJa+xGJsFYOlMRApJVAJ9OdbgXIiBNNLL6lYqIy/Z5orFOcwCcCy9Z JJNSQBrHowIDeZfDVD3ODD4= =Tcze -----END PGP SIGNATURE-----