Skip to contentSkip to conversation

FYI PS/2 Mouse problems -- userland issue

DISCUSSION Stephen Satchell 4 participants 6 messages Aug 21, 2001

lore
Share & tools
lore
#0 lore raw

Last week I had asked about mouse problems. I have discovered the root cause. This affects you if (1) you are using a KVM switch and (2) you have a "wheel" mouse.

The problem is that sometime during system initialization the mouse is being configured as a generic PS/2 mouse (no wheel). This works fine...until you switch the mouse away from the system. Depending on the KVM switch you are using, the mouse MAY reset itself into its native mode. In the case of the Logitech wheel mice, this means that each mouse event sends four codes instead of three. The X mouse support doesn't like that very much. :)

This MAY be a kernel issue depending on where I locate the mouse initialization code. If it is in the kernel, then there will need to be a patch to allow the mouse to be re-initialized into the mode everyone expects.

Satch

#1 lore raw
Quoted 3 lines · Stephen Satchell

This MAY be a kernel issue depending on where I locate the mouse initialization code. If it is in the kernel, then there will need to be a patch to allow the mouse to be re-initialized into the mode everyone expects.

The kernel has nothing to do with reinitializing the mouse: X has to do that. I was looking into this a few months ago when the installer's mouse probe code stopped working on 2.4, and it became apparent that there is lots of userland code that doesn't do the right thing to handle mouse hot plug reinitialization. gpm and X both need bugfixing in this area. As for the kernel, it needs a few improvements during 2.5: I plan to submit a patch that replaces much of the existing pc keyboard/mouse code with state machine driven code that doesn't block interrupts out for long periods of time, as well as fixing a few of the lockup issues the current driver has.

-ben

#2 lore raw
Quoted 5 lines

As for the kernel, it needs a few improvements during 2.5: I plan to submit a patch that replaces much of the existing pc keyboard/mouse code with state machine driven code that doesn't block interrupts out for long periods of time, as well as fixing a few of the lockup issues the current driver has.

Their already is a replacement driver using the input api avaliable that I was planning to intergrate into 2.5. It fixed alot of the issues people are having now.

#3 lore raw
Quoted 3 lines · James Simmons

Their already is a replacement driver using the input api avaliable that I was planning to intergrate into 2.5. It fixed alot of the issues people are having now.

Whether it uses the input api or the existing scheme doesn't matter to me. What's important is that the interrupt disables and udelay()'s are removed, so I'll gladly merge my work with whatever else people have prepared. I would've done it sooner, but changing the keyboard driver is an area of compatibility with sufficiently many hazzards that it's not reasonable for 2.4.

-ben

#4 lore raw
Quoted 2 lines

Whether it uses the input api or the existing scheme doesn't matter to me.

Tonight I will post the input PS/2 stuff for people to try out.

#5 lore raw
In reply to Stephen Satchell
Quoted 4 lines · Stephen Satchell

This MAY be a kernel issue depending on where I locate the mouse initialization code. If it is in the kernel, then there will need to be a patch to allow the mouse to be re-initialized into the mode everyone expects.

The kernel (2.2.15--2.2.17, 2.4.x--2.4.8) had code to reinitialize a plain PS2 mouse upon a reconnect event.
It caused too many problems on mouses that are not plain PS/2, but eg. synps2 (Synaptics touchpad). Those are not happy being reinitialized ...

The code has been disabled in 2.2.18/2.4.9 therefore. Use psaux-reconnect boot param to get the code back.

But normally your mouse driver (gpm or X11) has to do the reinitialization anyways, because it knows about the specific reinitialization sequence a mouse needs.
The kernel can't handle it, unless you put the whole collection of drivers there.

Regards,

Signature · 3 lines
Kurt Garloff  <[email protected]>                          Eindhoven, NL
GPG key: See mail header, key servers         Linux kernel development
SuSE GmbH, Nuernberg, DE                                SCSI, Security