Bug 98634 - middle button of generic serial mouse works in text mode, but not in X
Summary: middle button of generic serial mouse works in text mode, but not in X
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-mouse
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-07-06 06:54 UTC by Alexandre Oliva
Modified: 2007-04-18 16:55 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2004-09-21 11:33:21 UTC

Attachments (Terms of Use)

Description Alexandre Oliva 2003-07-06 06:54:04 UTC
The middle button of a 3-button serial mouse works in text mode, but not in
XFree86.  The configuration section in XFree86 is:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "Microsoft"
        Option      "Device" "/dev/ttyS0"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"

Setting Emulate3Buttons enables us to emulate the middle button, but the middle
button is obviously still unusable.  Maybe it's this other
redhat-config-xfree86-generated entry that causes problems?

Section "InputDevice"
# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
        Identifier  "DevInputMice"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"

Anyway, if it causes problems, it shouldn't be generated, right?

Comment 1 Mike A. Harris 2003-07-08 08:52:55 UTC
"Microsoft" protocol is a 2 button mouse protocol however.  What protocol is
the correct one to use, depends on what mouse it is, and that can only be
determined by manual selection.  If you get the wrong one, reconfigure it
to another protocol and physically reboot the computer to reset the mouse
hardware (it often gets screwed up if the wrong protocol is chosen, with
no way to deal with it other than a reboot).

Other than that though, this isn't really IMHO a bug, but a configuration issue.

Comment 2 Alexandre Oliva 2003-07-08 21:46:05 UTC
Well, then, the bug is in redhat-config-mouse, in that it chooses Microsoft as
the protocol for the serial mouse even though X can't use that as a 3-button
serial mouse protocol.  It does work in text mode, though, all three buttons, so
the hardware is not messed up.

FWIW, I tried all available options of serial mice in redhat-config-mouse, and
none of them worked, but I didn't reboot across tests.  I always tested the
middle button in text mode before restarting X, though, and didn't even bother
to start X if text mode didn't work.  Isn't it safe to assume that I don't need
a reboot if it works in text mode?

Comment 3 Alexandre Oliva 2003-07-15 16:14:21 UTC
FWIW, yesterday I tried all X mouse confiugrations that redhat-config-mouse
could possibly generate for serial mice, with a reboot before each attempt to
use the middle button in X, and none of them worked.  Any suggestions?  As I
wrote before, the middle button does work in text mode, when I tell gpm to use
the `Microsoft' protocol, so the button is not broken, it's just X that can't
seem to notice it.

Comment 4 Mike A. Harris 2003-07-15 16:24:28 UTC
Weird.  Does the mouse have a mechanical switch on the bottom or inside the
hole where the ball is?  Usually they say  [MS|PC]  or similar.

My experience is that one works and the other does not, however it's been so
long since I've used one that I don't remember which worked for me.  All my mice
for years are switchless Logitech mice.

Flipping it will change the protocol requiring both X and gpm reconfiguration.

Before trying that though, I recommend disabling GPM entirely just for testing
purposes.  Try to get X working without gpm ever being ran since boot.  If you
can get it to work that way, then either gpm is screwing up X, or X has a
problem with serial mice triggered by gpm, both of which are possible.

Comment 5 David Balažic 2003-07-29 18:44:54 UTC
Me too.

Tried two mice ( FCC IDs ) : "MNLADO-101" and "E6QMOUSE X31"

MMB works in text mode, does not work in X.
Protocol is set so "Microsoft" for both gpm and X.

Comment 6 David Balažic 2003-07-31 17:41:06 UTC
See related XFree bug : http://bugs.xfree86.org/show_bug.cgi?id=538

Comment 7 Mike A. Harris 2004-09-21 11:32:30 UTC
Adding comment from Egbert Eich, from upstream XFree86 bug report:

 ------- Additional Comment #1 From Egbert Eich  2003-07-30 13:58 
[reply] -------

The middle button cannot reliably detected on Microsoft serial mice.
man 4 mouse has some information.
The way it is implemented in gpm can leave the middle button pressed
if you
press or release it together with another button. Since press and
release events
generate the same data it is impossible to distinguish. Leaving the
state of the
middle button down while the button is not actually pressed any more
is no big
deal with gpm. Actions are triggered on the press event and the 'press
will then occur on a release. This is different in X as there the
state of the
button matters. Therefore if we allow the middle button to work we
will get loads of
reports about problems with the middle button. If at all one could
enable the
middle button optionally. However I'm not going to do this.

On some mice using the Microsoft protocol you can use the Option
"ChordMiddle" "1"
to get a middle button.

Comment 8 Mike A. Harris 2004-09-21 11:33:21 UTC
Setting status of bug report to mirror the XFree86 bug resolution

Note You need to log in before you can comment on or make changes to this bug.