mouse driver bug in 2.6.0-test7?
Why is the PS2 mouse tracking about 2x faster in 2.6.0-test7 compared to 2.4.xx?. Has anybody else seen this problem?.
If I move the mouse 1 inch horizontally left-to-right on the mouse pad, the cursor on the screen moves almost twice the distance on the screen compared to Linux 2.4.xx
I'm using the same X11 Config in 2.6 and 2.4....
Best regards
Dev Mazumdar
-----------------------------------------------------------
4Front Technologies
4035 Lafayette Place, Unit F, Culver City, CA 90232, USA.
Tel: (310) 202 8530 URL: www.opensound.com
Fax: (310) 202 0496 Email: [email protected]
-----------------------------------------------------------
Quoted 6 lines · On Tue, 2003-10-14 at 20:04, 4Front Technologies wrote:
Why is the PS2 mouse tracking about 2x faster in 2.6.0-test7 compared to 2.4.xx?. Has anybody else seen this problem?.
If I move the mouse 1 inch horizontally left-to-right on the mouse pad, the cursor on the screen moves almost twice the distance on the screen compared to Linux 2.4.xx
It's probably mostly because Vojtech changed the samplerate from 200 to
60. Here's a patch to change it back. I've sent it to Vojtech but he's completely ignored it so far. This patch also readds the fallback logic that was used before his change, although it uses the new samplerate-table.
Without this patch my mouse is awful to use. Vojtech, please consider this patch, at least say yay or nay.
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c.orig +6 -1
@@ -40,7 +40,7 @@static int psmouse_noext;int psmouse_resolution; -unsigned int psmouse_rate =60 ; +unsigned int psmouse_rate =200 ;int psmouse_smartscroll =PSMOUSE_LOGITECH_SMARTSCROLL ;unsigned int psmouse_resetafter;
@@ -450,6 +450,11 @@int i =0 ;while (rates[i] > psmouse_rate) i++; + +/* set lower rate in case requested rate fails */ +if (rates[i]) +psmouse_command (psmouse, rates + i +1 ,PSMOUSE_CMD_SETRATE ); +psmouse_command (psmouse, rates + i,PSMOUSE_CMD_SETRATE ); }
Signature · 1 line
/Martin
Quoted 8 lines · Martin Josefsson
Quoted 6 lines · On Tue, 2003-10-14 at 20:04, 4Front Technologies wrote:
Why is the PS2 mouse tracking about 2x faster in 2.6.0-test7 compared to 2.4.xx?. Has anybody else seen this problem?.
If I move the mouse 1 inch horizontally left-to-right on the mouse pad, the cursor on the screen moves almost twice the distance on the screen compared to Linux 2.4.xx
Quoted 8 lines
It's probably mostly because Vojtech changed the samplerate from 200 to
60. Here's a patch to change it back. I've sent it to Vojtech but he's completely ignored it so far. This patch also readds the fallback logic that was used before his change, although it uses the new samplerate-table.Without this patch my mouse is awful to use. Vojtech, please consider this patch, at least say yay or nay.
Patch considered. I'll up the samplerate default to 80, but not more, since samplerates above that cause trouble for a lot of people (keyboard doesn't work when you're moving the mouse).
The "set lower rate in case ..." part of the patch doesn't make sense. If the user gives a too low (less than 10) samples per second, then the original code will try to set 0, which is stupid, but harmless. The added code will try to access beyond the bounds of the rates[] array.
Quoted 26 lines
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c.orig +6
-1@@ -40,7 +40,7 @@static int psmouse_noext;int psmouse_resolution; -unsigned int psmouse_rate =60 ; +unsigned int psmouse_rate =200 ;int psmouse_smartscroll =PSMOUSE_LOGITECH_SMARTSCROLL ;unsigned int psmouse_resetafter;@@ -450,6 +450,11 @@int i =0 ;while (rates[i] > psmouse_rate) i++; + +/* set lower rate in case requested rate fails */ +if (rates[i]) +psmouse_command (psmouse, rates + i +1 ,PSMOUSE_CMD_SETRATE ); +psmouse_command (psmouse, rates + i,PSMOUSE_CMD_SETRATE ); }Signature · 2 lines
-- /Martin
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 21 lines · Vojtech Pavlik
Quoted 9 lines · Martin Josefsson
Quoted 6 lines · On Tue, 2003-10-14 at 20:04, 4Front Technologies wrote:
Why is the PS2 mouse tracking about 2x faster in 2.6.0-test7 compared to 2.4.xx?. Has anybody else seen this problem?.
If I move the mouse 1 inch horizontally left-to-right on the mouse pad, the cursor on the screen moves almost twice the distance on the screen compared to Linux 2.4.xx
Quoted 8 lines
It's probably mostly because Vojtech changed the samplerate from 200 to
60. Here's a patch to change it back. I've sent it to Vojtech but he's completely ignored it so far. This patch also readds the fallback logic that was used before his change, although it uses the new samplerate-table.Without this patch my mouse is awful to use. Vojtech, please consider this patch, at least say yay or nay.
Quoted 8 lines
Patch considered. I'll up the samplerate default to 80, but not more, since samplerates above that cause trouble for a lot of people (keyboard doesn't work when you're moving the mouse).
The "set lower rate in case ..." part of the patch doesn't make sense. If the user gives a too low (less than 10) samples per second, then the original code will try to set 0, which is stupid, but harmless. The added code will try to access beyond the bounds of the rates[] array.
Hi Martin/Vojtech,
Martin, many thanks for your fix - it works perfectly now.
Oddly enough the sample rate of 200 seems to have fixed the problem. Vojetech, Martin's fixes are fully functional. If you want to keep it at 80, I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
The default of 200 has been tested on VIA400 and IntelICH5 systems that I have. One running Redhat9/2.6.0-test7 and the other running Gentoo 1.4/2.6.0-test7
best regards
Dev Mazumdar
---------------------------------------------------------------------
4Front Technologies
4035 Lafayette Place, Unit F, Culver City, CA 90232, USA
Tel: 310 202 8530 Fax: 310 202 0496 URL: http://www.opensound.com
---------------------------------------------------------------------
Quoted 10 lines · On Tue, Oct 14, 2003 at 01:04:03PM -0700, 4Front Technologies wrote:
Quoted 8 lines
Patch considered. I'll up the samplerate default to 80, but not more, since samplerates above that cause trouble for a lot of people (keyboard doesn't work when you're moving the mouse).
The "set lower rate in case ..." part of the patch doesn't make sense. If the user gives a too low (less than 10) samples per second, then the original code will try to set 0, which is stupid, but harmless. The added code will try to access beyond the bounds of the rates[] array.
Quoted 6 lines
Hi Martin/Vojtech,
Martin, many thanks for your fix - it works perfectly now.
Oddly enough the sample rate of 200 seems to have fixed the problem. Vojetech, Martin's fixes are fully functional.
Not completely. One reason wht the sample rate of 200 probably fixed the problem is that you have very high acceleration settings in X.
Since with report rate 200 you get a medium speed movement as
+1 +1 +1 +1 +1 +1 +1 +1 +1
events, and with report rate 60 you get
+3 +3 +3
and the X mouse acceleration code is stupid enough to judge the mouse speed from the event VALUE only, it thinks the mouse is moving much faster in the second case.
You need to up the acceleration threshold (or disable acceleration completely).
This also means that with report rate of 200, mouse acceleration is more or less disabled, since you get +1's only even at quite high speeds of mouse movement.
Quoted 1 line
If you want to keep it at 80,
I don't want to. I like the feel of a mouse at 200 samples per second, however it causes problems on some hardware, which means I have to stay with a more reasonable default.
Quoted 2 lines
I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
It already is. Only the code to make it a kernel command line parameter (when psmouse is compiled into the kernel) is missing.
Quoted 2 lines
The default of 200 has been tested on VIA400 and IntelICH5 systems that I have.
Yes, new boards don't have any problems with it. It's the older ones that do.
Quoted 1 line
One running Redhat9/2.6.0-test7 and the other running Gentoo 1.4/2.6.0-test7
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 5 lines · Vojtech Pavlik
Quoted 2 lines
I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
It already is. Only the code to make it a kernel command line parameter (when psmouse is compiled into the kernel) is missing.
If you fix that I'd be happy and I'll stop sending that patch over and over again... :)
Signature · 1 line
/Martin
Why not use the new style module_param thing, goes for compiled-in and module stuff.
--Mika
Quoted 18 lines · Martin Josefsson
Quoted 8 lines · Vojtech Pavlik
Quoted 4 lines
I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
It already is. Only the code to make it a kernel command line parameter (when psmouse is compiled into the kernel) is missing.
If you fix that I'd be happy and I'll stop sending that patch over and over again... :)
Quoted 36 lines · Vojtech Pavlik
Quoted 10 lines · On Tue, Oct 14, 2003 at 01:04:03PM -0700, 4Front Technologies wrote:
Quoted 8 lines
Patch considered. I'll up the samplerate default to 80, but not more, since samplerates above that cause trouble for a lot of people (keyboard doesn't work when you're moving the mouse).
The "set lower rate in case ..." part of the patch doesn't make sense. If the user gives a too low (less than 10) samples per second, then the original code will try to set 0, which is stupid, but harmless. The added code will try to access beyond the bounds of the rates[] array.
Quoted 6 lines
Hi Martin/Vojtech,
Martin, many thanks for your fix - it works perfectly now.
Oddly enough the sample rate of 200 seems to have fixed the problem. Vojetech, Martin's fixes are fully functional.
Not completely. One reason wht the sample rate of 200 probably fixed the problem is that you have very high acceleration settings in X.
Since with report rate 200 you get a medium speed movement as
+1 +1 +1 +1 +1 +1 +1 +1 +1
events, and with report rate 60 you get
+3 +3 +3and the X mouse acceleration code is stupid enough to judge the mouse speed from the event VALUE only, it thinks the mouse is moving much faster in the second case.
Quoted 7 lines
You need to up the acceleration threshold (or disable acceleration completely).
This also means that with report rate of 200, mouse acceleration is more or less disabled, since you get +1's only even at quite high speeds of mouse movement.
Vojtec/Martin
You're right, the original problem still remains. The tracking is still 2x compared to Linux 2.4.
Here's how I did the measurement.
Get a foot-scale and start xev. Ajust xev so that the coordiates of the window are 0,y (y is y-axis - don't care) in the X root window (my res is 1024x768).
Now align the mouse so that it shows 0,0 on the top left corner in the xev window and move the mouse exactly one 1 inch and you'll see that under Linux 2.6.0-test7 the x axis position is at something like 325. However repeating the same test under Linux 2.4.22 puts the mouse at x axis position 170 (gives me a accelearation factor of about 2x).
This is a horribly crude test but it explains my problem that the mouse driver isn't tracking correctly.
Hope this helps figuring out the problem.
best regards
Dev Mazumdar
---------------------------------------------------------------------
4Front Technologies
4035 Lafayette Place, Unit F, Culver City, CA 90232, USA
Tel: 310 202 8530 Fax: 310 202 0496 URL: http://www.opensound.com
---------------------------------------------------------------------
Quoted 6 lines · Vojtech Pavlik
Quoted 2 lines · On Tue, Oct 14, 2003 at 01:04:03PM -0700, 4Front Technologies wrote:
I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
It already is. Only the code to make it a kernel command line parameter (when psmouse is compiled into the kernel) is missing.
I could've sworn I had this in one of the patches I sent you, but perhaps not.
input/mouse/psmouse-base.c renamed from input/mouse/psmouse-base.c~ +7 -0
@@ -651,10 +651,17 @@ return 1; } +static int __init psmouse_rate_setup (char *str) +{ +get_option (&str, &psmouse_rate); +return 1 ; +} +__setup ("psmouse_noext" , psmouse_noext_setup);__setup ("psmouse_resolution=" , psmouse_resolution_setup);__setup ("psmouse_smartscroll=" , psmouse_smartscroll_setup);__setup ("psmouse_resetafter=" , psmouse_resetafter_setup); +__setup ("psmouse_rate=" , psmouse_rate_setup);#endif
Signature · 1 line
Eric Wong
Quoted 10 lines · Eric Wong
Quoted 6 lines · Vojtech Pavlik
Quoted 2 lines · On Tue, Oct 14, 2003 at 01:04:03PM -0700, 4Front Technologies wrote:
I'd recommend that you make the sample rate a module config option so that users may be able to tweak this for their systems.
It already is. Only the code to make it a kernel command line parameter (when psmouse is compiled into the kernel) is missing.
I could've sworn I had this in one of the patches I sent you, but perhaps not.
Most likely you did. I'll be making a fix-only patch set for Linus today.
Quoted 22 lines
input/mouse/psmouse-base.c renamed from input/mouse/psmouse-base.c~ +7
-0@@ -651,10 +651,17 @@ return 1; } +static int __init psmouse_rate_setup (char *str) +{ +get_option (&str, &psmouse_rate); +return 1 ; +} +__setup ("psmouse_noext" , psmouse_noext_setup);__setup ("psmouse_resolution=" , psmouse_resolution_setup);__setup ("psmouse_smartscroll=" , psmouse_smartscroll_setup);__setup ("psmouse_resetafter=" , psmouse_resetafter_setup); +__setup ("psmouse_rate=" , psmouse_rate_setup);#endif Signature · 1 line
Eric Wong
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR