[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GPM for mouse



On Wed, Dec 17, 2003 at 09:46:21AM -0600, James Miller wrote:
| On Wed, 17 Dec 2003, Derrick 'dman' Hudson wrote:
| > On Tue, Dec 16, 2003 at 06:55:50PM -0800, Paul Johnson wrote:
| > | On Tue, Dec 16, 2003 at 12:41:05PM -0500, Derrick 'dman' Hudson wrote:
| > | > On Mon, Dec 15, 2003 at 06:07:00PM -0800, Paul Johnson wrote:
| > | > [...]
| > | > | gpm is a massive pain in the ass to deal with,
| > | >
| > | > Care to explain?  (I disagree, gpm is a piece of cake)
| > |
| > | gpm complicates configuring XF86 badly from my experience.  It's like
| > | trying to grow anything hydroponically:  It can be done, but it really
| > | complicates things.
| >
| > The complication is eliminated if you follow two guidelines :
| >     1)  don't try to have two processes fighting over a device, let
| >             gpm have the device and X reads from gpm's repeater
| >
| >     2)  use the same protocol for both (duh! it's the same mouse, it
| >             better be the same protocol :-))  (and set gpm's
| >             repeat_type to raw)
| >
| > I've never had any interaction problems following these rules.  I have
| > seen many people get confused and/or misconfigured by the combination,
| > but the above has always worked.
|
| Ok.  This thread has piqued (not to be confused with peaked or peeked) my
| interest.  I've just set up a Debian machine and was hoping to use gpm,
| since I like to use alot of console apps in virtual terminals.  Having gpm
| running was wreaking (not to be confused with reeking) havoc with the
| mouse under X - even though I had X trying to read mouse output from
| /dev/gpmdata.  The only way I could get the mouse cursor to get back to
| normal behavior under X was killall gpm.  So, what was I doing wrong?  I'd
| be delighted if I could get gpm to cooperate with the mouse cursor under
| X.

If killing gpm allows X to then interact correctly with the mouse then
you are violating principle #1 above.  If gpm is not running, then its
repeat FIFO is not getting any data, and X would not have any mouse
action at all, unless it accesses the device correctly.

The problem with multiple processes accessing /dev/psaux is it
presents a race condition as to which process gets which piece of data
from the device and in what order.  Likewise for data sent to the
device.  This is what causes the erratic behavior.

Search through your X configuration (use vim or similar to open
/etc/X11/XF86Config) and look for any occurrence of /dev/psaux.  For X
and gpm to play nicely you need to have X reading only from
/dev/gpmdata (and any USB mice you want X to access directly) and let
gpm handle the hardware (/dev/psaux) interaction.

Note that, at least in my experience, both processes can access
/dev/input/mice (virtual device for all USB mice) simultaneously
without any problem.

HTH,
-D

-- 
"He is no fool who gives up what he cannot keep to gain what he cannot lose."
    --Jim Elliot
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: pgpg0nDO9dxR5.pgp
Description: PGP signature


Reply to: