Ubuntu

USB mouse freezes while using the keyboard

Reported by Infinity on 2007-05-08
54
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mouseemu (Ubuntu)
Undecided
Unassigned
xorg (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: mousemu

On laptops, moving an USB mouse while typing doesn't move the cursor if mouseemu is installed. It only happens with my USB mouses: the touchpad works very well, but it happens with a wireless keyboard too.

lsusb:
...
Bus 001 Device 004: ID 046d:c016 Logitech, Inc. M-UV69a Optical Wheel Mouse
...

dmesg, juste after plugging my mouse in:
...
[17669.284000] usb 1-1: USB disconnect, address 6
[17672.292000] usb 1-1: new low speed USB device using uhci_hcd and address 7
[17672.468000] usb 1-1: configuration #1 chosen from 1 choice
[17672.484000] input: Logitech Optical USB Mouse as /class/input/input22
[17672.484000] input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:1d.0-1

Infinity (davidwagner) wrote :

My Xorg.conf(with an NVidia 6200; driver nvidia-glx-new) :
(I've only added a Wiimote Device and Option "AddARGBGLXVisuals" "True")

After removing all I added for the Wiimote, I still didn't work.

Tomorrow, I launched Bum to stop some services. I saw "mouseemu", I deactivate it, and now, my mouse works perfectly !

description: updated
Fausto Piovesan (faustop) wrote :

I'm having the same problem in my mac mini (feisty ppc). Could you give more details of how did you solved the problem?

What is "Bum" ?

Fausto Piovesan (faustop) wrote :

Solved the problem in a drastic way:

#sudo killall mouseemu

After killing mouseemu everything is ok, what raises the questions:
What is this mouseemu package?
Why it is needed (removing it i didn't saw any difference apart from correcting the bug)?
Why it is installed and enabled by default if it breaks some mouses?

Christopher Sachs (amitofu) wrote :

mouseemu simulates middle and right mouse button presses for users with only one mouse button (Apple laptop users without an
external mouse). It uses the uinput kernel module which allows a program to inject input events, which is how it fakes the button
presses. The manpage for mouseemu says that by default it uses /dev/uinput, /dev/input/uinput or /dev/misc/uinput to send its
events. mouseemu also supports a feature that is supposed to disable the trackpad when the keyboard is in use. The problem
appears to be that /dev/input/uinput on Ubuntu corresponds to an external mouse and not to the internal trackpad. And by default
the keyboard-disabling feature is enabled, so the external mouse gets locked up when the keyboard is in use.

One temporary fix for the problem besides removing mouseemu is to disable the typing block by replacing the relevant line in
/etc/default/mouseemu with:

TYPING_BLOCK="-typing-block 0"

and restarting mouseemu with

sudo /etc/init.d/mouseemu restart

This fixes the problem of the mouse freezing, but mouseemu is still a lame duck because its other useful features still only apply to an external
mouse and not to the trackpad.

The way to really fix the problem is to make /dev/input/uinput correspond to the trackpad. So who knows how to do this?

Ok, I'll try disabling typing block tomorrow (the problem is in my
work desktop). But I disagree with your "way to really fix the
problem", the computer in question is a mac mini (a desktop) so it
does not have a trackpad at all so the really way to fix would be to
mouseemu to be automagicaly disabled.

On 17/06/07, Christopher Sachs <email address hidden> wrote:
> mouseemu simulates middle and right mouse button presses for users with only one mouse button (Apple laptop users without an
> external mouse). It uses the uinput kernel module which allows a program to inject input events, which is how it fakes the button
> presses. The manpage for mouseemu says that by default it uses /dev/uinput, /dev/input/uinput or /dev/misc/uinput to send its
> events. mouseemu also supports a feature that is supposed to disable the trackpad when the keyboard is in use. The problem
> appears to be that /dev/input/uinput on Ubuntu corresponds to an external mouse and not to the internal trackpad. And by default
> the keyboard-disabling feature is enabled, so the external mouse gets locked up when the keyboard is in use.
>
> One temporary fix for the problem besides removing mouseemu is to disable the typing block by replacing the relevant line in
> /etc/default/mouseemu with:
>
> TYPING_BLOCK="-typing-block 0"
>
> and restarting mouseemu with
>
> sudo /etc/init.d/mouseemu restart
>
> This fixes the problem of the mouse freezing, but mouseemu is still a lame duck because its other useful features still only apply to an external
> mouse and not to the trackpad.
>
> The way to really fix the problem is to make /dev/input/uinput
> correspond to the trackpad. So who knows how to do this?
>
> --
> [Feisty[mouseemu]Freeze of usb mouse while using keyboard
> https://bugs.launchpad.net/bugs/113344
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Could you please recheck it with Gutsy Gibbon 7.10 Live CD?

Changed in xorg:
status: New → Incomplete
Infinity (davidwagner) wrote :

after an "aptitude install mouseemu", the problem comes back on my upgraded gutsy.
I'll let you know if it does the same with the liveCD

Timo Aaltonen (tjaalton) on 2008-01-12
Changed in xorg:
status: Incomplete → Confirmed
Christopher Amin (chris-inajar) wrote :

This is still a problem in Hardy Beta for me. I'm using a Macbook and a bluetooth mouse.

Still a problem here as well. Hardy B1 on a PC laptop with a Logitech USB mouse.

Steven Noonan (snoonan-amazon) wrote :

I too experienced this. Took a few days to find this bug report too, with many hours of frustration. Nothing's been done to fix this in over a year?

Ronald Taneza (ronald-taneza) wrote :

I have also experienced this (hardy), I'm using an Intel iMac. It is annoying as hell, especially when alt-tabbing between windows and copy-pasting: the mouse freezes every single time I do these things.

And it was very hard to find the cause of the problem because a simple google search does not reveal any clues (is it gnome, metacity, compiz, X server? none of the above it turned out)

The liveCD does not have this problem, so perhaps mouseemu is only installed or enabled during the actual install to a hard disk (when it somehow detects that the computer is a mac)?

Could this program please be disabled by default? If someone wants "mouse emulation in mac", I think he'll find mouseemu in a simple google search. At the very least, please change the “-typing-block DELAY” default value from 300ms to 0. Why would you want a delay, anyway???

Ronald Taneza (ronald-taneza) wrote :

Christopher Sachs wrote:
"The way to really fix the problem is to make /dev/input/uinput correspond to the trackpad. So who knows how to do this?"

No, I just checked the mouseemu source code, and I think the problem is that mouseemu registers a handler for all input devices that have a "relative axis event type". This handler is the one responsible for the "key block" delay.

The problem with this is that AFAIK, all generic mice and touchpads have this "relative axis event type". So I think that mouseemu should make its matching more restrictive: just touchpads and not mice, especially because its key block "feature" is enabled by default and very annoying to users who don't want it. Perhaps it could match the actual touchpad device name or product/vendor ID found in macbooks?

"Why would you want a delay, anyway???"

Most likely to avoid accidental touchpad movements while typing on the keyboard (as most touchpads are located under the keyboard, which might lead to palm contact).

Ronald Taneza (ronald-taneza) wrote :

"Most likely to avoid accidental touchpad movements while typing on the keyboard (as most touchpads are located under the keyboard, which might lead to palm contact)."

I don't think the mouse delay is a good solution to that problem. And most laptops nowadays align the touchpad to the spacebar (i.e. the touchpad is a few cm's to the left of the center of the keyboard area), and I think the reason for that is to minimize accidental touchpad movement.

Ok, so I just checked some macbook pics and the touchpad there is located at the exact horizontal center of the keyboard area, so that's why they have this problem.

Re: original mouseemu issue, I think there are several problems here:
1) mouseemu seems to activate the "-typing-block DELAY" feature for all "mice-like" devices: touchpads and regular mice. I think it should be changed to be activated only for touchpads.
2) mouseemu uses a "300ms" default value for the delay. I think the author should recognize that this delay can be annoying for users who don't want it (and who have never heard of this mouseemu app), so there should be no delay by default.
3) mouseemu seems to be installed for all macs (?): desktop imacs and macbooks. It should only be installed by default on macbooks.

1) Indeed it should only. The problem is that the touchpad on a macbook apparently is mapped to the same thing as USB mice are on a "normal" installation. There is probably a way to check if the device is a touchpad though - which should be implemented.

2) I think it is a good thing to have it enabled by default. It should probably be tweaked a bit though. Better hear macbook users about how it works for them, though.

3) I'm not really sure when mouseemu is needed, but definitely worth asking about/looking into.

Actually, the most important thing woth this delay is probably to avoid accidental touchpad clicks. Movement probably won't hurt much, but clicks can be quite annoying. Perhaps mouseemu should simply ignore clicks in the delay, but leave movement alone.

Timo Aaltonen (tjaalton) wrote :

seems more like a bug in mouseemu.

Changed in xorg:
status: New → Invalid
Arnau Alcázar (arnau) wrote :

I can confirm this bug.
In my case, the problem is in a laptop with a bluetooth mouse. The bug does not affect the touchpad.

Arnau Alcázar (arnau) wrote :

The problem disappears when you remove mouseemu package. The seems to be necessary when using wiimote, but I have used wiimote without this package.

description: updated
Przemysław Kulczycki (azrael) wrote :

I think I have a related issue in Jaunty.
Sometimes after resuming from suspend my usb mouse stopped working - it worked for a few seconds and then stopped. Same after replugging it or plugging to different port. I don't know which helped - rebooting to Mac OS X for a moment, or booting with usb mouse plugged in. But it helped.

Przemysław, are you sure that is the same bug? This bug is about mouse "freezes" of about 0,5 seconds after pressing keys of the keyboard. The mouse works fine otherwise.

Your bug sounds different, so I don't think it is the same bug :)

I have this issue on a mac mini ppc running 9.10 (last dist-upgrade 2009-09-12), what can i do to help?

Removed mouseemu package and the problem disappeared, did not even have to start X

Stephen Emslie (stephenemslie) wrote :

I can confirm I'm also seeing this bug in ubuntu 9.10.

Mikael Gustavsson (slvmnd) wrote :

Using the touchpad on my ASUS laptop with Ubuntu 9.10, I noticed that:
If I press a letter key (such as 'z') while moving the mouse, the mouse movement freezes for a second.
To me it seemed like a bug, but I guess it's actually a 'feature'.

It can be turned off in gnome by: system/preferences/mouse/touchpad; uncheck 'disable touchpad while typing'.

Rakesh R (rakesh2r) wrote :

Hi All thank you for the solution, it works only once that is each time I login I have to kill the mouseemu and restart the system. I am not able to find the file mouseemu. Can any one help me on this please.

Jason Harvey (jason-alioth) wrote :

Still happens in 11.04. Mouseemu was auto-enabled for some reason on my clean install. It only affected my USB mouse, not my touchpad. Turning off the 'disable mouse while typing' option in Touchpad settings does not resolve the USB mouse freeze.

Gerrit Addiks (addiks) wrote :

It is not true that it does only affect USB-Mouses. I have three pointing devices: a bluetooth trackpad (Magic Tackpad), a bluetooth mouse (Magic Mouse) and a USB gaming mouse. When typing, both mouses (bluetooth and USB) freeze for a second, but the Trackpad stays usable. The problem could be removed with "sudo killall mousemon".

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

Duplicates of this bug

Other bug subscribers

Bug attachments