2002-10-31 22:27:36

by Gregoire Favre

[permalink] [raw]
Subject: Logitech wheel and 2.5? (PS/2)

Hello,

up to 2.5.45:

...
register interface 'mouse' with class 'input
mice: PS/2 mouse device common for all mice
input: PC Speaker
input: PS2++ Logitech Wheel Mouse on isa0060/serio1
...
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
...

And very regulary my mouse position is lost and reseted???
Also the wheel don't work (don't know for the button on the left that I
never use: the 3 regulars one and the wheel are enough for me...).

Thank you,

Gr?goire
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]


2002-11-01 10:35:47

by Thomas Molina

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

On Thu, 31 Oct 2002, Gregoire Favre wrote:

> Hello,
>
> up to 2.5.45:
>
> ...
> register interface 'mouse' with class 'input
> mice: PS/2 mouse device common for all mice
> input: PC Speaker
> input: PS2++ Logitech Wheel Mouse on isa0060/serio1
> ...
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> ...
>
> And very regulary my mouse position is lost and reseted???
> Also the wheel don't work (don't know for the button on the left that I
> never use: the 3 regulars one and the wheel are enough for me...).

How is your mouse configured/detected? If your boot up sequence specifies
to gpm that you have a Logitech Wheel Mouse try redoing it for an MS
Intellimouse. I have several Logitech mice which work as imps/2 and don't
when configured as a logitech.

2002-11-01 11:31:20

by Gregoire Favre

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

On Fri, Nov 01, 2002 at 04:41:30AM -0600, Thomas Molina wrote:

> How is your mouse configured/detected? If your boot up sequence specifies
> to gpm that you have a Logitech Wheel Mouse try redoing it for an MS
> Intellimouse. I have several Logitech mice which work as imps/2 and don't
> when configured as a logitech.

Well in console mode:
MOUSETYPE=ps2
XMOUSETYPE=MouseManPlusPS/2
FULLNAME="PS/2|Logitech MouseMan+"
XEMU3=no
WHEEL=yes
device=psaux

And in Xfree4:
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "MouseManPlusPS/2"
Option "Device" "/dev/mouse"
Option "ZAxisMapping" "4 5"

Under 2.4 every thing works great so, but under 2.5 not, from dmesg:
...
matroxfb_crtc2: secondary head of fb0 was registered as fb1
register interface 'mouse' with class 'input
mice: PS/2 mouse device common for all mice
input: PC Speaker
input: PS2++ Logitech Wheel Mouse on isa0060/serio1
serio: i8042 AUX port at 0x60,0x64 irq 12
input: AT Set 2 keyboard on isa0060/serio0
serio: i8042 KBD port at 0x60,0x64 irq 1
ISDN subsystem initialized
PPP BSD Compression module registered
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
HiSax: Linux Driver for passive ISDN cards
...
Advanced Linux Sound Architecture Driver Version 0.9.0rc5 (Tue Oct 29 09:19:27 2002 UTC).
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
request_module[snd-card-0]: not ready
...
request_module[snd-card-6]: not ready
psmouse.c: Received PS2++ packet #0, but don't know how to handle.
request_module[snd-card-7]: not ready
...

In console (with gpm, it seems to works, but I don't use the wheel)
But under X: no wheel any more...

Thank you very much,

Gr?goire
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]

2002-11-02 08:57:05

by Kari Hameenaho

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

On Thu, 31 Oct 2002, Gregoire Favre wrote:

> Hello,
>
> up to 2.5.45:
>
> ...
> register interface 'mouse' with class 'input
> mice: PS/2 mouse device common for all mice
> input: PC Speaker
> input: PS2++ Logitech Wheel Mouse on isa0060/serio1
> ...
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> psmouse.c: Received PS2++ packet #0, but don't know how to handle.
> ...
>
> And very regulary my mouse position is lost and reseted???
> Also the wheel don't work (don't know for the button on the left that
> I never use: the 3 regulars one and the wheel are enough for me...).

The packet #0 message is not causing any trouble.

The wheel will work in X with mouse set to imps/2, in XF86Config(-4):
Section "InputDevice"
..
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
...
EndSection

Button on left may act same as middle button, at least for me it is and
nicer to use.

Mouse position loose seems to be caused by strange messages from mouse:
is your mouse wireless too ?
Here is a patch that works for me: note that it is too ugly for real
inclusion and may cause troubles in other setups. But you can try it if
you want. I have sent it to maintainer too, maybe a better solution will
arrive in future kernels.

--- linux-2.5.45/drivers/input/mouse/psmouse.c Thu Oct 31 02:42:20 2002
+++ linux-2.5.45-usb/drivers/input/mouse/psmouse.c Fri Nov 1 22:28:25 2002
@@ -85,6 +85,11 @@

if (psmouse->type == PSMOUSE_PS2PP || psmouse->type == PSMOUSE_PS2TPP) {

+ /* Logitech radio/battery status or strangeness ?????? */
+ if (packet[0] == 0xd8) {
+ goto out;
+ }
+
if ((packet[0] & 0x40) == 0x40 && (int) packet[1] - (int) ((packet[0] & 0x10) << 4) > 191 ) {

switch (((packet[1] >> 4) & 0x03) | ((packet[0] >> 2) & 0xc0)) {
@@ -157,6 +162,7 @@
input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0);
input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);

+out:
input_sync(dev);
}

---
Kari H?meenaho

2002-11-02 10:10:10

by Gregoire Favre

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

On Sat, Nov 02, 2002 at 11:03:16AM +0200, Kari Hameenaho wrote:

> The packet #0 message is not causing any trouble.
>
> The wheel will work in X with mouse set to imps/2, in XF86Config(-4):
> Section "InputDevice"
> ..
> Option "Protocol" "ImPS/2"
> Option "ZAxisMapping" "4 5"
> ...
> EndSection

I have changed it ;-)

> Button on left may act same as middle button, at least for me it is and
> nicer to use.
>
> Mouse position loose seems to be caused by strange messages from mouse:
> is your mouse wireless too ?

Yes it is!

> Here is a patch that works for me: note that it is too ugly for real
> inclusion and may cause troubles in other setups. But you can try it if
> you want. I have sent it to maintainer too, maybe a better solution will
> arrive in future kernels.

patched, but I got:

make -f scripts/Makefile.build obj=drivers/input/mouse
gcc -Wp,-MD,drivers/input/mouse/.psmouse.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 -Iarch/i386/mach-generic -nostdinc -iwithprefix include -DKBUILD_BASENAME=psmouse -c -o drivers/input/mouse/psmouse.o drivers/input/mouse/psmouse.c
drivers/input/mouse/psmouse.c: In function `psmouse_process_packet':
drivers/input/mouse/psmouse.c:90: label `out' used but not defined
make[3]: *** [drivers/input/mouse/psmouse.o] Error 1
make[2]: *** [drivers/input/mouse] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

Thank you very much,

Gr?goire
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]

2002-11-02 20:48:31

by Kari Hameenaho

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

Gregoire Favre wrote:

>patched, but I got:
>
> drivers/input/mouse/psmouse.c drivers/input/mouse/psmouse.c: In
> function `psmouse_process_packet': drivers/input/mouse/psmouse.c:90:
> label `out' used but not defined make[3]: ***
> [drivers/input/mouse/psmouse.o] Error 1 make[2]: ***
> [drivers/input/mouse] Error 2 make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

There was a line +out: in my patch, maybe you did not apply it correctly
or the mail caused some changes to patch part. Note that it is against
2.5.45. All os the patch is in one function, so it is quite possible to do
patching manually (it is only 5 lines anyway), if it somehow gets
corrupted.

Here it is again:

--- linux-2.5.45/drivers/input/mouse/psmouse.c Thu Oct 31 02:42:20 2002
+++ linux-2.5.45-usb/drivers/input/mouse/psmouse.c Fri Nov 1 22:28:25 2002
@@ -85,6 +85,11 @@

if (psmouse->type == PSMOUSE_PS2PP || psmouse->type == PSMOUSE_PS2TPP) {

+ /* Logitech radio/battery status or strangeness ?????? */
+ if (packet[0] == 0xd8) {
+ goto out;
+ }
+
if ((packet[0] & 0x40) == 0x40 && (int) packet[1] - (int) ((packet[0] & 0x10) << 4) > 191 ) {

switch (((packet[1] >> 4) & 0x03) | ((packet[0] >> 2) & 0xc0)) {
@@ -157,6 +162,7 @@
input_report_rel(dev, REL_X, packet[1] ? (int) packet[1] - (int) ((packet[0] << 4) & 0x100) : 0);
input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);

+out:
input_sync(dev);
}

2002-11-02 21:34:11

by Gregoire Favre

[permalink] [raw]
Subject: Re: Logitech wheel and 2.5? (PS/2)

On Sat, Nov 02, 2002 at 10:54:48PM +0200, Kari Hameenaho wrote:

> There was a line +out: in my patch, maybe you did not apply it correctly

Well: shame on me... I didn't apply it correctly ;-(
Sorry for my %*%&? stupidity!!!

Now I have a real usable 2.5 (I can only use one hand for the next 3
weeks, and having to run after my mouse because I use sunmouse was
really unconfortable...).

An hudge thank, I would really enjoy your patch being included in
2.5.46!!!

Gr?goire
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]