Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2000 07:56:10 -0800 (PST)
From:      David Wolfskill <dhw@whistle.com>
To:        freebsd-mobile@freebsd.org
Subject:   Re: Touchpad (on NEC Versa 6030X), FreeBSD 4.0-RC (20000307), & XF86 3.3.6
Message-ID:  <200003111556.HAA50327@pau-amma.whistle.com>
In-Reply-To: <200003110014.QAA45467@pau-amma.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
OK; I have something that actually seems to work (in X, not just XF86Setup).

Please note that the psm driver recognized the touchpad as a GlidePoint,
so the flag to force recognition as such (PSM_CONFIG_FORCETAP , 0x0800)
was not necessary in my case.

The current configuration has psm0 defined in the kernel with no flags
set.  X is set up to use /dev/sysmouse; moused is invoked as:

	moused -m 1=4 -m 2=1 -p /dev/psm0 -t auto

(That is, in rc.conf, I have 'moused_flags="-m 1=4 -m 2=1"'.)


But what I did that seemed to make things work -- which puzzles me sorely
-- is reverse the sense of the "button 4" recognition in src/sys/isa/psm.c,
thus:

===================================================================
RCS file: RCS/psm.c,v
retrieving revision 1.1
diff -u -r1.1 psm.c
--- psm.c	2000/03/10 22:52:16	1.1
+++ psm.c	2000/03/11 15:09:41
@@ -1820,7 +1820,7 @@
         ms.button = butmap[c & MOUSE_PS2_BUTTONS];
 	/* `tapping' action */
 	if (sc->config & PSM_CONFIG_FORCETAP)
-	    ms.button |= ((c & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
+	    ms.button |= (!(c & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
 
 	switch (sc->hw.model) {
 
@@ -1902,7 +1902,7 @@
 
 	case MOUSE_MODEL_GLIDEPOINT:
 	    /* `tapping' action */
-	    ms.button |= ((c & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
+	    ms.button |= (!(c & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN;
 	    break;
 
 	case MOUSE_MODEL_NETSCROLL:


As noted in an earlier message, it seems that the original code does
just the opposite of what is wanted.  Now, I know there's a *lot* I
don't know about PC hardware, and I'm no kernel hacker.  Further, I
greatly respect the folks who have been contributing to this code
base... all of which causes me to be rather skeptical as to my own
sanity regarding this.

Or maybe the machine I'm using has a bizarre hardware quirk that causes
it to behave in the opposite way that the code expects -- I'm not at all
sure how to determine this.

But I have a working solution for now -- I'm even able to manipulate the
"Virtual Desktop" in tvtwm, which is a most welcome change.

I'll be happy to work with folks to try to better understand what a
proper solution is -- offline.  I don't see any purpose to be gained by
me continuing to spam this list at the current stage of (my
non-)understanding, though I'll be pleased to summarize the results when
I have something I can understand.

(One possibility, for example, would be to use a flag to invert the
sense of the hacked statements above, so that a patch could be committed
that would continue to allow other systems to work, while also
permitting the machine that I have to work -- assuming, of course, that
this isn't a hardware bug in the latter.)

Thanks for putting up with my ravings,
david
-- 
David Wolfskill		dhw@whistle.com		UNIX System Administrator
voice: (650) 577-7158	pager: (888) 347-0197	FAX: (650) 372-5915


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003111556.HAA50327>