linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Vojtech Pavlik <vojtech@suse.cz>, Matt <dirtbird@ntlworld.com>,
	herbert@gondor.apana.org.au,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [MOUSE] Alias for /dev/psaux
Date: Wed, 5 Nov 2003 19:00:35 +0100	[thread overview]
Message-ID: <20031105180035.GB27922@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0311050920080.11208-100000@home.osdl.org>

On Wed, Nov 05, 2003 at 09:36:28AM -0800, Linus Torvalds wrote:


> The alternative approach is to _not_ try to autodetect and leave it in a
> sane default state - or at least leaving the detection to a minimum, but
> having sane ways of letting the user set the thing.

Would sysfs be a sane enough way?

> As an example, the old psaux driver allowed the user to _send_ to the
> mouse, not just receive. That made it possible for user mode to autodetect
> the mouse, and set the settings. The input-mode mouse driver totally drops
> that feature - which forces the kernel to get it right.
> 
> That's a very fragile design: making feedback impossible means that you
> have to always get it right - which in turn tends to be fundamentally
> impossible (ie new mice etc). And right now we force the user to make the
> choice at _boot_ time, which means that the installer can't even ask the
> user.

I agree here.

In the original design I assumed the PS/2 hardware is sane enough to be
(auto)detectable. Most other hardware is, so why not PS/2 mice? It has
become obvious that there are many caveats and many broken devices (most
notably KVMs and notebook transparent mux chips) in the equation.

I still would prefer to have the autodetect be enabled, because it works
for 99% of the cases and allow to set the mouse protocol manually
(either boot time or via sysfs) for the troublesome cases.

If psmouse.o is a module, the installer of course can ask the user. 

> Also, some of the autodetect code is less intrusive. For example, if the
> mouse driver decides it's a Logitech mouse, it will have set the
> resolution down to zero, but it will have left the reporting rate at the
> default.

Originally, the psmouse code set all the resolution/rate/scaling to sane
values after the detection was run. It does that only conditionally now,
which causes a lot of problems with the intrusiveness of the probing.

There are four approaches:
	1) Kill some of the probes (but having the MS one is needed for 80% of mice)
	2) Get the values from the mouse and restore them after probing
	3) Set the mouse to sane values like before
	4) detect -> reset -> initialize

IMO sane values are
	* 80 samples/sec
		+ interactive enough, about the same as the refresh rate
		  of the monitor - you never can actually see a smoother
		  movement than your monitor HZ
		+ slow enough that old hardware doesn't choke

	* 400 dpi
		+ simply the default. 99% USB mice are 400 dpi by
		  default, and PS/2 mice at least 90%

	* 1:1 scaling
		+ has anyone ever changed this one?

Nevertheless, we probably cannot stop at least two of these three groups
of people from complaining:

	* 2.5.* users will see erratic movement of their X cursor if
	  they set mouse acceleration to insane values, because 200
          samples/sec rate used through 2.5 effectively disabled
	  mouse acceleration.

	* 2.4 users will see mouse 'slowdown', because 2.4 default 
	  (or better the HW default) is 60 samples/sec (thus the
	  speed when acceleration kicks in goes up 1.33x)

	* 2.4 users who have set up different speed/res/scale values
	  in XF86Config, because those are ignored in 2.6

> In contrast, an unrecognized mouse will have gone through the intellimouse
> test, which will have set the rate down to 80 (in addition to having the
> resolution set down to the lowest setting by the Logitech detect code). So
> now some mice get even _worse_ behaviour. Or at least different.

Agreed, this is simply WRONG. We need to have the mouse set to defined
speed/resolution/scaling after we probe. Options listed above.

> Right now we can't make big changes, but it would be good to think about 
> the issues.
> 
> And we could make the defaults a bit nicer and less likely to screw up.
> 
> 		Linus

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2003-11-05 18:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 15:17 Re:[MOUSE] Alias for /dev/psaux Matt
2003-11-05 16:27 ` Linus Torvalds
2003-11-05 17:02   ` [MOUSE] " Vojtech Pavlik
2003-11-05 17:36     ` Linus Torvalds
2003-11-05 18:00       ` Vojtech Pavlik [this message]
2003-11-05 18:39         ` Linus Torvalds
2003-11-06 10:41         ` Mikael Pettersson
2003-11-05 17:39   ` Vojtech Pavlik
2003-11-05 17:49     ` Linus Torvalds
2003-11-05 18:03       ` Vojtech Pavlik
2003-11-09 10:04         ` Vojtech Pavlik
2003-11-09 10:33           ` John Bradford
2003-11-09 10:38             ` Vojtech Pavlik
  -- strict thread matches above, loose matches on Subject: below --
2003-11-05 11:03 "Andrey Borzenkov" 
2003-11-05 10:48 Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031105180035.GB27922@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=dirtbird@ntlworld.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).