Re: Logitech wheel and 2.5? (PS/2)

From: Kari Hameenaho (khaho@koti.soon.fi)
Date: Sat Nov 02 2002 - 04:03:16 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:23 EST