Bug 84310

Summary: the -M option (multiple mice) should not imply -R (repeater mode)
Product: [Retired] Red Hat Linux Reporter: diego.santacruz
Component: gpmAssignee: Eido Inoue <havill>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-30 15:51:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 76713    

Description diego.santacruz 2003-02-14 09:47:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
When multiple mice are configured in gpm, with the -M option, the repeater mode
is automatically activated (i.e., -R is implied). This causes the mouse to go
wild under X since gpm and X compete for mouse access.

Without the repeater mode, gpm stops listening to the mouse while under
graphical mode, so that X and gpm do not compete for mouse access.

The -M option should not force the repeater mode, the -M and -R options should
be independent.

With the current gpm behaviour it is not possible to use a PS/2 mouse and a USB
mouse in the console and under X, using the default config under X (i.e. USB
configured as additional mouse). This is very important for laptops.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure a USB mouse in addition to the standard PS/2 mouse by setting
OPTIONS, in /etc/sysconfig/mouse, to "-t imps2 -m /dev/input/mice -M"
2. start gpm
3. start X

Actual Results:  The mouse (either USB or PS/2) goes wild under X. Console mode
is OK.

Expected Results:  Both mices work correctly under X as well as console mode.

Additional info:

See also related issue in mouse-config: bug #76713

Comment 1 Sebastian Mangels 2003-05-20 18:53:53 UTC
Well I had a Problem with gpm concerning -M option too, and probably my
workaround works for your problem too:

line invokating gpm int /etc/init.d/gpm is has an error:
daemon gpm $OPTIONS -t $MOUSETYPE -m $DEVICE

Because the OPTIONS variable is the First parameter given to gpm the -M option
comes "too early". The effect is, that you try to configure a second mouse
before the first one has been conigured. I found moving the OPTION variable to
the END of the line made gpm working for me again.

so the section in the gpm script should look like this:

        if [ -n "$MOUSETYPE" ]; then
                daemon gpm -t $MOUSETYPE -m $DEVICE $OPTIONS
                daemon gpm -m $DEVICE $OPTIONS

Hope it works for you too.

Comment 2 Eido Inoue 2003-07-29 15:44:21 UTC
The $OPTIONS have been moved to the end of the params in the init script. I
believe the problem the original bug poster describes is unrelated.

Originally, we tied the repeater in in response to an old bug. I'll test to see
if the old fix is still relevant, and if necessary, unbundle it.

Comment 3 Eido Inoue 2003-07-30 15:51:14 UTC
repeater mode is not automatically invoked with Red Hat's gpm... since 1.19.13-25

Comment 4 David BalaĹžic 2003-07-31 17:31:34 UTC
The docs ( man, --help or README ) of gpm-1.19.3-27 claims otherwise ( that -R 
is enabled with -M ) and I think is actualy works that way ( -R implied by -M )

Comment 5 Eido Inoue 2003-07-31 18:24:10 UTC
$ man gpm

-M     Enable  multiple  mode. The daemon will read two different mouse
       devices.  Any subsequent option will refer to the second device,
       while any preceding option will be used for the first device. In
       Red Hat Linux, this option DOES NOT  enable  the  repeater  (-R)
       option on.

I think the patch to the man page came later than the repeater patch.       --
hard to tell because the man page patch is bundled with the getopts parse code