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

Re: mouse configuration



On Fri, Jan 05, 2001 at 04:26:42PM -0500, Mithras wrote:
> My mouse has been working fine, but perhaps something more subtle
> could be wrong.  Learning something new's always valuable.

Yes, it is only working because your errors zero'd out:)


> On Fri, 5 Jan 2001, Carel Fellinger wrote:
... 
> > This doesn't sound right! (maybe it's just me failing to understand you)
> > You should not touch /dev/gpmdata, let alone rename it.  Let me recap:
> > 
> > In XF86Config you should use:
> > 
> >    Protocol        "whatever suits your mouse"
> >    Device          "/dev/mouse"
> 
> Currently I have:
> 
>    Protocol 	"Microsoft"
>    Device	"/dev/ttyS0"

If it works, fine; however X and gpm tent to give raise to problems
when both try to read the mouse. IIRQ this applies only to busmouse,
like PS/2, but it's good to be prepared. So to be on the safe side
you better do as adviced:)  Besides, if you ever deside to replace
the mouse then you'll only have to change this symlink to have it
working again (yeah right:)

For busmouse the workaround is to use gpm in `repeater' mode, and have
gpm read the mouse all the time, writing what it reads to /dev/gpmdata
for other programs (like X) to read.  By default gpm will translate
the raw mouse data to the `msc' protocol before writing it out to
/dev/gpmdata.  This behaviour is triggered by the `-R' or `--raw'
option.  If you don't specify a protocol, or an empty protocol, then
`msc' is used, but you're normally better of using `raw' as protocol
as this leaves all the mouse data as is.  If you setup gpm to do its
repeating thingy, make sure that gpm is the *only* program reading the
mouse directly!  Have other programs read /dev/gpmdata instead.  But
be advised to let those other programs read from /dev/mouse and
symlink /dev/gpmdata to /dev/mouse.  The nice thing about using the
/dev/mouse symlink and have gpm repeat in `raw' mode is, that you
don't have to reconfigure those other programs whenever you decide to
dump gpm (or the repeater mode).  Just dump gmp and adjust the symlink
/dev/ttyS0 to /dev/mouse and your done!


If you don't have a busmouse (like /dev/ttyS0) then you don't really
need this repeater stuff. Simply commenting the `raw=' line out in
/etc/gpm.conf and the repeater stops: no /dev/gpmdata, and X needs to
read from /dev/ttS0 it self.  Be advised, however, to still let X read
from /dev/mouse, and symlink /dev/ttS0 to /dev/mouse.


> I haven't used anything like the repeat_type or append settings you
> have there.  Gpm's device is /dev/ttyS0, and the type is ms.
> repeat_type is ''.

So repeating is on, and translated into `msc' protocol.

> Still, these settings did not work until I moved /dev/gpmdata.  The

I bet that after restartin gpm (eg. after a reboot) you'll have
problems again.  I think gpm creates this file each time it's running,
so you'll have to remove it each time.  Don't.  Either setup gpm to do
no repeating or do it properly.

> mouse did not move, yet I'd set the pointer to use /dev/ttyS0.  I
> remembered reading here or on the web that someone else couldn't get
> their mouse to work on X until they removed gpmdata, so I thought I'd
> try that.  I'd read it was a named pipe that the gpm process populated
> with mouse input so X could get its data from it, so I figured it
> wouldn't hurt anything in the console if I took it away.  Maybe X was

Taking it away was the error that evened out the previous errors:)
In effect it prohibited gpm from doing its repeating thing, so it
stopped reading from /dev/ttS0 and X no longer had a conflict on
who was reading the mouse:)  Oh and yes, gpm is smart enough to
know when someone else (X) controls a virtual console, so it starts
reading at the moment you switch back to a text oriented console.


> This might not be ideal, but I'm a practical guy.

To me this is not practical, but making a mess out of your system.
A few of those and debugging odd behaviour gets very complicated,
better leave that to the windows world:)

-- 
groetjes, carel



Reply to: