kern/80844: Increase compatibility of psm driver with KVM switches and scroll mouse

Tim H tim-freebsd at
Tue May 10 03:00:28 GMT 2005

>Number:         80844
>Category:       kern
>Synopsis:       Increase compatibility of psm driver with KVM switches and scroll mouse
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 10 03:00:27 GMT 2005
>Originator:     Tim H
>Release:        5.3
FreeBSD 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #2: Sat Jan 29 16:41:31 PST 2005     xxx at :/usr/obj/usr/src/sys/ATTAG  i386

     There have been many complaints in the archives about KVM switches and mouse scroll not working when switching between Windows/Linux and FreeBSD.  The problem seemed isolated to users of certain brands of KVMs and or setups, but I think I have found the cause and a solution.

The problem comes from the way FreeBSD probes for PS/2 wheel mice, and the inability of Logitech mice to switch protocols.  For illustration, consider two computers, FreeBSD and Windows connected via a KVM switch, using a Logitech mouse.  When FreeBSD is booted first, the psm driver correctly identifies Logitech mouse and sets it to MouseMan protocol.  When windows boots and the kvm makes the switch, the windows will force the mouse to switch to MS Intellimouse protocol.  When kvm switches back to FreeBSD, the psm driver tries to reset the logitech mouse to MouseMan protocol.  At this point the mouse will fail to make the switch, and the FreeBSD will use a generic ps/2 mouse protocol, losing the ability to use the scroll wheel.
     See Full Description
     Alter the ps/2 mouse probe order in psm.c in /usr/src/sys/isa/psm.c.  Move the lines 

    { MOUSE_MODEL_MOUSEMANPLUS,		/* Logitech MouseMan+ */
      0x08, MOUSE_PS2_PACKETSIZE, enable_mmanplus, },

below the lines

    { MOUSE_MODEL_INTELLI,		/* Microsoft IntelliMouse */
      0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli, },

so that logitech mouse will be probed as MS Intellimouse. Since all logitech mice are capable of emulating intellimouse, this should not cause any problems, and will allow KVM's to function properly.

More information about the freebsd-bugs mailing list