Need input hotplug to solve mouse latency (sweep-selection precision) in Ubuntu

Bug #144277 reported by Martin Olsson on 2007-09-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)

Bug Description

1. find a desktop background which has lots of detail (this is not strictly necessary but it helps *a lot* to understand this problem).
2. set this desktop background on both a windows machine and a linux machine
3. decide on two points (call them A and B) near the middle of the screen, a couple of centrimeters a part

on each machine, do these steps:
3. move the mouse cursor to point A
4. very fast now; press the left mouse button and move the mouse to point B

on the windows machine you will have a selection ranging from point A all the way over to point B
on the linux machine you will have a selection ranging from a point between A and B all the way over to point B

clearly, there is some kind of latency issue for the mouse down event on the linux machine. it takes a few milli (or maybe nano) seconds for the linux machine to process the mouse down and for this reason the mouse cursor is moved a little bit before linux receives the mouse down event and starts the actual selection.

this problem also affects actions such as resizing windows really fast. as long as you are very slow (e.g for old people) the mouse works just great in linux.

Martin Olsson (mnemo) wrote :

im using this mouse:

and if I do "glxinfo | grep direct" is prints I'm using direct rendering.

Martin Olsson (mnemo) wrote :

After talking to some really helpful people at freenode#ubuntu+1 I figured out what the problem is. They told me about this input driver called "evdev". When I switched to this input driver the problems went away.

From what I know, it sounds to me like Ubuntu should switch to evdev input by default. A lot of people will just conclude that "linux sucks" instead of filing a bug report and then manually editing their xorg.conf to make stuff work.

Martin Olsson (mnemo) wrote :

The mouse entry in /etc/X11/xorg.conf that fixed all my looks problems looked like this:

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "evdev"
        Option "Device" "/dev/input/mice"

Alex Grönholm (agronholm) wrote :

Too bad the wheel tilt function does not work with that config. You have to use an actual event device for that.
So, use:

Option "Name" "*Mouse"
Option "CorePointer"

instead of
Option "Device" "/dev/input/mice"

I tried it without the "CorePointer" option, and X11 does start but the mouse didn't respond.

Martin Olsson (mnemo) wrote :

I unsuccessfully tried this config (this is what you meant right, Alex?):

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "evdev"
        Option "Name" "*Mouse"
        Option "CorePointer"

When I tried this config would not start (I was left in a text based console).

Is this for usb devices only, or can it be used for ps2 mice?

mnemo wrote:
> I unsuccessfully tried this config (this is what you meant right,
> Alex?):
> Section "InputDevice"
> Identifier "Configured Mouse"
> Driver "evdev"
> Option "Name" "*Mouse"
> Option "CorePointer"
> EndSection
> When I tried this config would not start (I was left in a text
> based console).
The "Name" option uses globbing to locate the device in the
/dev/input/by-id directory. Maybe your mouse does not identify itself in
the manner that is caught by the pattern above. In my case I have a
"usb-Logitech_Logitech_USB_Gaming_Mouse-mouse" device in there. I
haven't figured out how to make it work for all mice yet. What bugs me,
however, is that xmodmap is still required to make the side buttons
work. I was hoping that would change with Gutsy and 7.3. In
Windows, all mice work just fine by default without special drivers. Why
can't it be the same in Linux?
On another note, what's the procedure necessary to join the
ubuntu-devel-discussion list so that I could actually post in it?
> ** Summary changed:
> - mouse sucks in linux
> + Mouse movement quality in Ubuntu
> ** Summary changed:
> - Mouse movement quality in Ubuntu
> + Mouse latency (sweep-selection precision) in Ubuntu

I have tried with two different wired USB mice (one Logitech and one Microsoft IntelliExplorer mouse). My touchpad mouse still works though and I guess that qualifies as a non-USB pointer device? It would be very interesting to see what happens if someone with a PS2 mouse could try the configuration I provided above (

Alex Grönholm (agronholm) wrote :

Oops, didn't realize the replies would post messages here directly.

Martin Olsson (mnemo) wrote :

Join list here (and then post from the same e-mail as you signed up with):

As for the device name, this is what I got:

mnemo@gutsyT5:~$ ls /dev/input/by-id/

I doubt there is a wildcard which would be robust enough to be used as a Gutsy default value? Or maybe it's possible to use "*" as the name? Or would that gives us bugs with non-mouse input device conflicts? I wish someone who knows a lot about evdev could pitch in with some info..

Alex Grönholm (agronholm) wrote :

Yes, unfortunately * would also include keyboards, gamepads etc.
The "Name" option is not realiable enough to make it default for Gutsy.
The evdev man page ( suggests the following:

Section InputDevice
Identifier mouse
Driver evdev
Option evBits +1-2
Option keyBits ~272-287
Option relBits ~0-2 ~6 ~8
Option Pass 3

Tried that a few days ago but didn't work for me. X wouldn't even start.

Clay Weber (claydoh) wrote :

On my ps/2 mouse, x will not start, Here is relevant section from my Xorg.log:

(II) evdev brain: Rescanning devices (1).
(EE) PreInit returned NULL for "Configured Mouse"
(WW) No core pointer registered
(II) XINPUT: Adding extended input device "evdev brain" (type: evdev brain)
(II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD)
(II) evdev brain: Rescanning devices (2).
No core pointer

Fatal server error:
failed to initialize core devices

So I would venture to guess making evdev default might not be such a good idea at this point, until the hardware detection can detect this and choose it over the standard 'mouse' driver

Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at . I have classified this bug as a bug in xorg.

Timo Aaltonen (tjaalton) wrote :

We will be using input-hotplug on Hardy, which means that the mouse driver will be evdev. No milestone set for now.

Changed in xorg:
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → In Progress
Martin Olsson (mnemo) wrote :

Timo, that's wonderful news! I'm looking forward to beta testing this feature.

Timo Aaltonen (tjaalton) wrote :

Unfortunately, input-hotplug turned out to be too unstable for Hardy, so it's pushed forward.

Changed in xorg:
importance: Medium → Low
milestone: none → later
status: In Progress → Confirmed
Bryce Harrington (bryce) on 2008-05-14
Changed in xorg:
milestone: later → intrepid-alpha-5

Will this bug be fixed for Hardy?

On Thu, Jun 12, 2008 at 09:13:24PM -0000, Kraftman wrote:
> *** This bug is a duplicate of bug 206649 ***
> Will this bug be fixed for Hardy?

Sorry, no, we have no plans to backport input-hotplug to hardy.


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers