Messages in this thread Patch in this message | | | Date | Thu, 17 Jul 2003 01:43:05 +0200 (MEST) | From | Mikael Pettersson <> | Subject | Re: PS2 mouse going nuts during cdparanoia session. |
| |
On Wed, 16 Jul 2003 20:56:19 +0200, Vojtech Pavlik wrote: >This is basically because the check for lost bytes wasn't present in >2.4. Now that it is there, it works well with real lost bytes, but will >fire also in case when the mouse interrupt was delayed for more than >half a second, or if indeed a mouse interrupt gets lost. The 2.5 kernel >by default programs the mouse to high speed reporting (up to 200 updates >per second). This may, possibly make the problem show up easier.
This was interesting: 2.5 programs the mouse differently than 2.4. I've been having ps2 mouse problems with the 2.5 input layer, including having to move the mouse much further for a given cursor movement, and a general jerky/unstable feeling of the mouse.
2.4's pc_keyb.c has (disabled by default) init code which puts the mouse in 100 samples/s and 2:1 scaling, whereas 2.5 puts it into 200 samples/s and 1:1 scaling. So I hacked psmouse-base.c to mimic 2.4, and VOILA! now my mouse feels A LOT better.
The crude patch below shows what I did. (I have to set psmouse_noext as well, to avoid misidentification, jerkiness/lost syncs, and utter mayhem upon resume from suspend.)
Would you accept a cleaned up patch which allows the rate and scaling to be adjusted, similarly to noext and resolution?
/Mikael
--- linux-2.6.0-test1/drivers/input/mouse/psmouse-base.c.~1~ 2003-06-23 13:07:37.000000000 +0200 +++ linux-2.6.0-test1/drivers/input/mouse/psmouse-base.c 2003-07-17 01:23:57.000000000 +0200 @@ -33,7 +33,7 @@ #define PSMOUSE_LOGITECH_SMARTSCROLL 1 -static int psmouse_noext; +static int psmouse_noext = 1; int psmouse_resolution; int psmouse_smartscroll = PSMOUSE_LOGITECH_SMARTSCROLL; @@ -435,7 +435,7 @@ param[0] = 100; psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE); - param[0] = 200; + param[0] = 100; psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE); /* @@ -443,7 +443,8 @@ */ psmouse_set_resolution(psmouse); - psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11); +#define PSMOUSE_CMD_SETSCALE21 0x00e7 + psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE21); /* * We set the mouse into streaming mode. - 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/
| |