On Wed, Nov 05, 2003 at 07:03:21PM +0100, Vojtech Pavlik wrote: > > How about something like this: > > > > - if "mouse_noext" is set (which implies that we won't be doing any > > probing), we also don't set rate/precision unless the user asked us. > > > > Thus "psmouse_noext" becomes the "ultra-safe" setting. We still want to > > have some way to set things like wheel etc info by hand later on (ie as > > a response to the user _telling_ us what mouse it is), but that's a > > more long-range plan. > > > > - if we do probing, we first ask the mouse for its current details, and > > we restore the thing by default afterwards. That at least should give > > us 2.4.x behaviour unless the mouse is broken (and for broken mice > > you'd just have to have "mouse_noext"). > > > > Again, long-term we'd want to have the possibility of tweaking the > > results later even with the autodetection. > > > > Does that sound like a reasonable plan? > > Yes, it does. It didn't work out. The problem is that the psmouse driver always issues the 0xf6 RESET command as the second command in the command sequence. This is correct, because we need to disable the mouse input, so that it doesn't collide with further probing and setup. The 0xf6 RESET command will initalize the mouse to the default (100 samples/second, 100 dpi, 1:1 mapping) settings. So there is no point in saving those settings and restoring them later, when we know what they are already. Also, in 2.4, the 0xf6 RESET is one of the first commands XFree86 sends to the mouse, so again, there is no state left from BIOS or powerup defaults. XFree86 also sets the mouse to 200dpi, because that's what some mice need to operate properly (Windows does the same). Most mice ignore that setting, anyway. So the attached patch sets the mouse to 100 samples/second, 200 dpi, 1:1 mapping, which is a standard setting, as close to 2.4 XFree86 behavior as possible, and a good performance setting, too. It also in the case of 'psmouse_noext' doesn't probe and set anything all, though it still issues the RESET command. This is as safe as one can get. The only real problem remaining is that the report rate and resolution cannot be set from XFree86 config and only is available as a kernel/module parameter. The fix is, howewer not 2.6.0 material. The attached patch, although rather obvious, was tested on most of my computers and laptops, and works fine. Please apply it before 2.6.0 ... Thanks. -- Vojtech Pavlik SuSE Labs, SuSE CR