Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 1997 16:53:13 -0500 (CDT)
From:      Christopher Yoder <cyoder@ionet.net>
To:        freebsd-questions@freebsd.org
Subject:   PS/2 Problem (A Tough One)
Message-ID:  <199709132153.QAA07673@ion1.ionet.net>

next in thread | raw e-mail | index | archive | help
Hello all,

   Here's a tough one for you all.  First let me start by giving you 
a little system info:

0. Problem: The mouse is very jumpy and unusable in X Windows. 

1. I'm running 2.2.2-RELEASE.  PS2 port and a 2 Button Microsoft PS2
   Mouse. (It's labeled "Mouse Port Compatible Mouse" on the bottom.)

2. I've removed the word disable from the "device psm0 ..." line in
   the kernel config.  I recompiled and confirmed that the system is
   seeing psm0 at irq 12 and port 0x60-0x64. 

3. I've made the /dev/psm0 device (with both 1 and 0 as minor). I'm
   not using moused.

4. I've set my XF86Config pointer to PS2 and device to /dev/psm0 (and 
   /dev/mouse -> /dev/psm0, but not concurrently).  

5. I've tried to recompile with /sys/i386/isa/psm.c's define of
   PSM_EMULATION set to on and to tell the XServer that I had a Microsoft
   mouse.

6. Showed the Cat to the mouse with no noticable effect on the mouse.
   Cat just shrugged and walked away.

Here's some of what I've tried in further detail:

I added this line to /sys/i386/isa/psm.c in the psminit function:

    log( LOG_DEBUG, "Status: %d X=%d Y=%d\n", sc->ipacket[0],
            sc->ipacket[1], sc->ipacket[2] );

in /var/log/messages this is what I see:
 "normal syslog header:" Status: 255 X=0 Y=255
 "normal syslog header:" Status: 254 X=255 Y=16
 "normal syslog header:" Status: 254 X=16 Y=32
 "normal syslog header:" Status: 255 X=255 Y=254
 "normal syslog header:" Status: 254 X=255 Y=16
 "normal syslog header:" Status: 255 X=255 Y=16
 "normal syslog header:" Status: 255 X=0 Y=0

And these only seem to show up when the mouse is moved, never when the buttons
are pressed and released. 


One thing I've noticed, in /sys/i386/include/mouse.h the PS2 data block
is defined as 3bytes. ie:

                     	0 = status 
                        1 = x data
                        2 = y data

In the book "The Indispensable PC Hardware Book" under the Keyboard and
Mice section, it states that a PS/2 mouse uses an 8byte data block. ie: 
   
                     	0 = status 
                        1 = reserved
                        2 = x data
                        3 = reserved
                        4 = y data
                        5 = reserved
                        6 = z data     
                        7 = reserved  

With this I've even set the block size to 8, but the results are that
the mouse get constrained to the bottom left 1/8 of the screen.

I've restored the original sources and recompiled.  As you would expect
this didn't fix anything, but I wanted to be sure to return to the start
as I've made a lot of changes.


Any help would be GREAT! :) I'd rather not re-write the drivers.. But
will if need be..

Christopher

P.S. Please reply to cyoder@ionet.net as I'm not on the lists as of yet.

=-------------------------------------------------------------------=
 Christopher D. Yoder                                    ioNET, Inc.
 Sr. Systems Administrator/Lead Programmer    Oklahoma's Largest ISP
                                                   Oklahoma City, OK
 Phone: (405) 270-7015                                 iam@ionet.net
 Fax: (405) 270-7055                                cyoder@ionet.net
 http://www.ionet.net/~cyoder/                  programmer@ionet.net
=-------------------------------------------------------------------=
 New Favorite Saying:              "We only have one life, LIVE IT!"
=-------------------------------------------------------------------=



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