freebsd kernel with SKQ
Go to file
Alfred Perlstein de75fd6d2b Significantly reduce the "jitter" that is typical for PS/2 mice
when using a KVM.

There is no actual solution possible, but this gets us pretty close.

Typically when switching back to a FreeBSD box and moving the mouse
wild data is produced, because the protocol's validation/checksum
system is extremely weak it is impossible to determine that we're
out of sync before dropping several bogus packets to user land.

The actual solution that appears to offer the best clamping of
jitter is to buffer the mouse packets if we've not seen mouse
activity for more than .5 seconds.  Then waiting to flush that data
for 1/20th of a second.  If within that 20th of a second we get any
packets that do fail the weak test we drop the entire queue and
back off accepting data from the mouse for 2 seconds and then repeat
the whole deal.

You can still get _some_ jitter, notably if you switch to the FreeBSD
box, then move the mouse just enough to generate one or two packets.
Those packets may be bogus, but may still pass the validity check.

One way to finally kill the problem once and for all is to check
the initial packets for "wild" values.  Typically one sees packets
in the +/-60 range during normal operation, however when bogus data
is generated it's typically near the outer range of +/-120 or more,
those packets would be a good candidate for dropping or clamping.

I've been running with this for several weeks now and it has
significantly helped me stay sane even with a piece of junk Belkin
KVM causing wild jitter each and every time I switch.

Lastly I'd like to note that my experience with Windows shows me that
somehow the Microsoft PS/2 driver typically avoids this problem, but
that may only be possible when running the mouse in a dumb-ed down PS/2
mode that Belkin recommends on their site.
2003-12-11 11:28:11 +00:00
bin The uuidgen(1) program is WARNS=6 clean, so flag it as such. 2003-12-07 21:34:56 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r123394, 2003-12-10 16:46:08 +00:00
crypto Add a missing word. 2003-10-31 21:49:47 +00:00
etc Change rc.d/syscons to not need /usr/sbin/ispcvt to exist. This should 2003-12-10 15:48:49 +00:00
games Use WARNS level 2 instead of setting CFLAGS explicitly to -Wall. 2003-12-07 17:34:52 +00:00
gnu Add two additional headers for amd64 and x86. 2003-12-09 16:31:30 +00:00
include Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr 2003-12-08 07:22:42 +00:00
kerberos5 No need for two copies of this file; there is already a distribution 2003-11-17 14:59:06 +00:00
lib Fixed English error in previous commit. Fixed some older English errors. 2003-12-11 09:53:25 +00:00
libexec Only define CACHE_LINE_SIZE in one place.. 2003-12-11 04:49:37 +00:00
release Add hints about nForce3 issues 2003-12-08 22:38:39 +00:00
rescue Remove cxconfig and add sconfig 2003-12-03 17:12:35 +00:00
sbin Try to catch up with device name changes due to GEOM'ification. Remove 2003-12-08 10:50:36 +00:00
secure Explicitly add libz and libcrypto to LDADD for any ssh utilities missing 2003-08-19 07:45:03 +00:00
share Grammar. 2003-12-10 09:43:53 +00:00
sys Significantly reduce the "jitter" that is typical for PS/2 mice 2003-12-11 11:28:11 +00:00
tools Add a small program to test/measure with the RFC 2783 API for timing 2003-12-08 20:49:40 +00:00
usr.bin Fixed misplacement of __FBSDID(). Backed out editing of vendor id lines. 2003-12-11 10:58:29 +00:00
usr.sbin Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.h 2003-12-10 02:49:17 +00:00
COPYRIGHT
MAINTAINERS I'll maintain dhclient from now on. 2003-08-01 17:54:11 +00:00
Makefile Put on some factor 30+ bikeshed repellent and export the internal 2003-12-09 02:08:19 +00:00
Makefile.inc1 Fix a problem where 'make installworld' will fail and leave the 2003-12-09 00:42:44 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a note about MPTABLE_FORCE_HTT. 2003-12-10 15:59:20 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html