From owner-freebsd-current@FreeBSD.ORG Thu Jan 1 05:26:16 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01A5616A4E0 for ; Thu, 1 Jan 2004 05:26:16 -0800 (PST) Received: from coruscant.rfc1149.org (rfc2549.org [217.160.130.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9884443D62 for ; Thu, 1 Jan 2004 05:24:46 -0800 (PST) (envelope-from arne@rfc2549.org) Received: by coruscant.rfc1149.org (Postfix, from userid 110) id 177A43D13; Thu, 1 Jan 2004 14:24:45 +0100 (CET) Received: from kamino.rfc1149.org (kamino.rfc1149.org [2001:8d8:81:11::2]) by coruscant.rfc1149.org (Postfix) with ESMTP id 6A6CD3CC6 for ; Thu, 1 Jan 2004 14:24:40 +0100 (CET) Received: by kamino.rfc1149.org (Postfix, from userid 1001) id 72C82623D; Thu, 1 Jan 2004 14:24:38 +0100 (CET) Sender: arne@kamino.rfc1149.org To: FreeBSD Current From: Arne Schwabe Date: 01 Jan 2004 14:24:38 +0100 Message-ID: <86n097dco9.fsf@kamino.rfc1149.org> Lines: 106 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on coruscant.rfc1149.org X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Spam-Level: Subject: Synaptics Touchpad xfree driver hack :) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2004 13:26:16 -0000 Hi, I changed from debian gnu/linux to freebsd 3 weeks ago. Almost everything with my Notebook worked fine but the Touchpad was not as good as in linux or windows. Since I really wanted to have my middle button of the trackpoint and the scrolling of the touchpad working I decided to try to port the XFree86 synaptics Driver for Linux. (A nice thing is that Synaptics has a full spec to the protocol used available online) Since I am a real C Newbie. (This is more or less my first time writing C), not everything is really clean, to be honest it is more a collection of hack I am afraid and this approch somewhat against the idea of sysmouse. :/ But it still works for me [tm] ;) The synaptics XFree86 driver *should* detect all features and use them like on linux. But for now initialisation of an attached second mouse is not done (I was too lazy to do it, and for me it works without it) I hope someone with more C skills then I can clean this mess a little up/advise me how to clean it up and I hope I have picked the right mailing list :) But I you want to try it: download my patches from plaisthos.de/synaptics: wget http://www.plaisthos.de/synaptics/synaptics-driver.diff wget http://www.plaisthos.de/synaptics/synaptics.kern.diff Apply the 2. Patch to your kernel source (My sources should be -current :)) (cd /usr/src/sys/; patch -p1 < /location/of/the/patch/synaptics.kern.diff) Rebuild your kernel and reboot. Check if my code recognized your Touchpad: Jan 1 12:41:29 kamino kernel: psm0: model Synaptics Touchpad, device ID 0-00, 2 buttons Copy /usr/src/sys/sys/mouse.h to /usr/include/sys, or do a make world (cp /usr/src/sys/sys/mouse.h /usr/include/sys) Download the Xfree Synaptics Driver Sources from http://w1.894.telia.com/~u89404340/touchpad/ wget http://w1.894.telia.com/~u89404340/touchpad/files/synaptics-0.12.2.tar.bz2 Unpack it and apply the patch: tar xfvj synaptics synaptics-0.12.2.tar.bz2 cd synaptics patch -p1 < synaptics-driver.diff To build it use gmake: gmake synaptics_drv.o (a plain gmake won't work, since the tools don't build at the Moment but they not so important) copy the driver to your XFree Installation: cp synaptics_drv.o /usr/X11R6/lib/modules/input Disable moused, in case it is running: killall moused Edit your XF86Config: In ServerLayout you should change your Corepointer line to: InputDevice "synaptics" "CorePointer" And now add this: Section "InputDevice" Driver "synaptics" Identifier "synaptics" Option "Device" "/dev/bpsm0" Option "Protocol" "psaux" Option "LeftEdge" "1900" Option "RightEdge" "5400" Option "TopEdge" "1900" Option "BottomEdge" "4000" Option "FingerLow" "25" Option "FingerHigh" "30" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "VertScrollDelta" "100" Option "MinSpeed" "0.02" Option "MaxSpeed" "0.18" Option "AccelFactor" "0.0010" Option "SHMConfig" "on" # Option "Repeater" "/dev/ps2mouse" EndSection Pray and start X :) If something goes wrong, let me now. I hope someone else besides me has some use of my hacking. Arne