PS/2 mice and MOL

Samuel Rydh mol-general@lists.maconlinux.org
Tue, 16 Mar 2004 14:03:47 +0100


On Mon, Mar 15, 2004 at 08:42:04AM +0000, Brian Ruth wrote:
> Hi all,
> 
> This is just a slight problem with MOL which I keep on meaning to bring up,
> then forget about. Anyway, probably worth a mention...
> 
> ...I'm using MOL on a number of IBM PReP RS/6000 boxes. These all have PS/2
> keyboard and mouse interfaces. I've noticed that when running MOL in console
> mode (via the framebuffer display), the mouse will often fail the first time
> MOL is started
>
> I'm assuming the problem could be something like MOL not initialising the
> mouse driver, or perhaps assuming it is in a different state. I think (though
> I could be wrong) that starting up and closing down X immediately before
> starting MOL seems to help, as perhaps that resets the PS/2 bus.
> 
> This seems to affect every version of MOL I've tried. I'm currently using the
> latest BK tree version.

I appears the data stream has become unsynced. The PS/2 protocol is
a multi-byte serial protocol. If the second byte of an event
is interpreted as the first byte, then things get weird.

I suspect you either have somebody else reading from the mouse device
(gpm?) or that somebody did not read an entire message before closing
the device.

One can make sure MOL eventually gets in sync by checking the
time difference between the first and second byte. If it is large
enough, then it should be safe to assume it really is the first byte.

/Samuel