f



I can get X mouse wheel OR console mouse to work, but not both

I can get console mouse (gpm) and X to work together but with no wheel mouse
support in X (Configuration 1), OR I can get X to work with mouse wheel
support (Configuration 2), but not both.  If I try hard to get both to work
(Configuration 3), I get berserk mouse behavior.

Configuration 1
---------------

Use /etc/rc.d/init.d/gpm or manual command to execute "gpm -t ps2 -2 -R raw"
(also tried without the "-2"), and invoke X with the following mouse
configuration (excerpt from /etc/X11/XF86Config-4):

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/gpmdata"
	Option	    "Emulate3Buttons" "on"
	# Items below in this section added for mouse wheel support
	Option	    "ZAxisMapping" "4 5"
	Option	    "Buttons" "5"
EndSection

In Configuration 1, rolling the mouse wheel doesn't do anything, although
pressing it still acts as a middle button.  The text console mouse support
works properly.

Configuration 2
---------------

Shut down gpm, and invoke X with the following mouse configuration (excerpt
from alternate version of /etc/X11/XF86Config-4):

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/psaux"
	Option	    "Emulate3Buttons" "on"
	# Items below in this section added for mouse wheel support
	Option	    "ZAxisMapping" "4 5"
	Option	    "Buttons" "5"
EndSection

In Configuration 2, rolling the mouse wheel works properly, but of course
no text console mouse support is available.

Configuration 3
---------------

Run gpm as in Configuration 1 but use /etc/X11/XF86Config-4 as in
Configuration 2.  This results in the mouse pointer going berserk and mouse
movements causing spurious button presses, often both in X and on the text
console.

Googling back through this newsgroup and looking at Colas Nahaboo's X scroll
mouse wheel page (http://koala.ilog.fr/colas/mouse-wheel-scroll/) showed me
how to get Configuration 2 above, but not how to get both text console mouse
support and X mouse wheel support to work at the same time.

Distribution:  Linux From Scratch 4.1/Beyond Linux From Scratch 1.0, with all
	software compiled from sources, as noted below.

System configuration, hardware
------------------------------

Athlon XP 2000+ (1.67 GHz) (no overclocking)
Soyo SY-KT333 Dragon Plus mainboard (VIA KT333 chip set)
	Network chip is integrated VT6102 Rhine II, according to /proc/pci
	Sound chip is integrated CMI8738, according to /proc/pci
LNE100TX 4.1 PCI ethernet card (in case of problems with onboard chip)
256 Mibytes of RAM
80 Gbyte hard drive (ATA-133)
Sapphire Atlantis (OEM ATI Radeon) 9100 video card (AGP 4X)
Logitech Optical Mouse Model M-BJ58 (connected to PS/2 port using the
	supplied USB-to-PS/2 adapter)
(Misc. peripherals such as CD-R and floppy omitted)

System configuration, software
------------------------------

Kernel 2.4.21 from kernel.org (compiled with -O2 -march=athlon)
XFree86 4.3.0, optionally including DRI radeon.o module (compiled with -O3
	-mcpu=athlon) (does not affect mouse behavior, as far as I know)
gpm 1.20.1 (compiled with -O3 -mcpu=athlon)
Lesstif 0.93.36 (compiled with -O3 -mcpu=athlon)
aRts 1.1 (compiled with -O3 -mcpu=athlon)
qt-x11-free 3.1.2 (compiled with -O3 -mcpu=athlon)
kdelibs 3.1 (compiled with -O3 -mcpu=athlon, but seemed to use -O2 anyway)
kdebase 3.1 (compiled with -O3 -mcpu=athlon, but seemed to use -O2 anyway)
(several other KDE 3.1 pieces, compiled as above)
Modutils 2.4.22 (compiled with -O3 -mcpu=athlon)
glibc 2.3.1 (compiled with -O2 -g)
GCC 3.2.1 (compiled with -O2 -g)
(Other Linux From Scratch system software compiled with -O3 -mcpu=athlon)
GCC 2.95.3 (compiled with -O2 -g, available as alternative GCC version)
alsa-driver 0.9.4 (compiled with -O2 -g)
alsa-lib 0.9.4 (compiled with -O2 -g)
alsa-utils 0.9.4 (compiled with -O2 -g)
alsa-tools 0.9.4 (compiled with -O2 -g)
alsa-oss 0.9.4 (compiled with -O2 -g)
(Various other Linux From Scratch and Beyond Linux From Scratch packages
compiled mostly with -O3 -mcpu=athlon)
(All packages compiled with GCC 3.2.1 unless otherwise stated)

-- 
Lucius Chiaraviglio
Approximate E-mail address:  luciusone@chapter.net
To get the exact address:          ^^^    ^replace this with 'r'
                                   |||
    replace this with single digit meaning the same thing
(Spambots of Doom, take that!).
0
luciusone
8/9/2003 11:46:51 PM
comp.os.linux.x 2543 articles. 0 followers. Post Follow

1 Replies
487 Views

Similar Articles

[PageSpeed] 27

On Sat, 09 Aug 2003 23:46:51 GMT, Lucius Chiaraviglio staggered into the
Black Sun and said:
> I can get console mouse (gpm) and X to work together but with no wheel
> mouse support in X (Configuration 1), OR I can get X to work with
> mouse wheel support (Configuration 2), but not both.  If I try hard to
> get both to work (Configuration 3), I get berserk mouse behavior.
> 
> Configuration 1
> "gpm -t ps2 -2 -R raw"

Wrong.  If this mouse has a wheel, it probably uses the IMPS/2 protocol,
so you should start it with "gpm -t imps2".  Kill gpm and restart it
with that option.  You don't need or want -2, since this mouse has 3
buttons.

> Section "InputDevice"
>  Option  "Device" "/dev/gpmdata" 
>  Option  "Protocol" "auto"

Protocol should be IMPS/2 if gpm is set to use imps2.

> 	Option	    "Emulate3Buttons" "on"

Wrong, shouldn't even be there.

> Shut down gpm, and invoke X with the following mouse configuration
> Section "InputDevice"
> Identifier  "Mouse0"
> Option      "Protocol" "auto"
> Option  "Device" "/dev/psaux" 
> Option      "Emulate3Buttons" "on"
> EndSection
> 
> In Configuration 2, rolling the mouse wheel works properly, but of
> course no text console mouse support is available.

"xterm" and its more advanced cousins "konsole" and "eterm" obviate the
need for virtual consoles in all but disaster-recovery situations, no?

> Run gpm as in Configuration 1 but use /etc/X11/XF86Config-4 as in
> Configuration 2.  This results in the mouse pointer going berserk and

Yes, because both gpm and X are trying to read from /dev/psaux at the
same time.  If you start gpm with -R, you need to configure X so that it
reads /dev/gpmdata instead of /dev/psaux.

> Distribution:  Linux From Scratch 4.1/

"Don't use gpm" is the easiest way out of this, but if you want to do
things the hard way, it's certainly possible.

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / 
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL
0
Dances
8/10/2003 12:32:23 AM
Reply: