USB mouse not activated when plugged afterwards

Bug #20705 reported by Hervé Cauwelier (bug tracking)
6
Affects Status Importance Assigned to Milestone
hotplug (Ubuntu)
Fix Released
Medium
Scott James Remnant (Canonical)

Bug Description

For a long time I run breezy with ubuntu-desktop and ubuntu-base kept installed.
For probably a few months, my USB mouse is not activated if I plug it after the
kernel and X have started. I didn't noticed it until recently because I have the
habit to plug the mouse immediately. Restarting hotplug, discover, etc. won't help.

This is a Dell Latitude X300 and the USB port I use is direct, not on a media
bay or something.

Here is the diff of `lsmod` without the mouse and with:

--- lsmod-avant.txt 2005-09-01 09:45:45.000000000 +0200
+++ lsmod-apres.txt 2005-09-01 09:50:08.000000000 +0200
@@ -1,5 +1,4 @@
 Module Size Used by
-usbhid 35168 0
 binfmt_misc 11496 1
 rfcomm 38460 0
 l2cap 24740 5 rfcomm
@@ -24,6 +23,8 @@
 battery 9348 0
 container 4384 0
 ac 4708 0
+mousedev 11616 1
+tsdev 7776 0
 evdev 9664 1
 psmouse 29924 0
 rtc 12344 0
@@ -77,6 +78,7 @@
 fan 4484 0
 ide_disk 18464 5
 ide_generic 1376 0
+usbhid 35168 0
 tg3 96772 0
 piix 10372 1
 ide_core 138772 3 ide_disk,ide_generic,piix

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Could you attach the following files:

 /etc/modules
 /etc/X11/xorg.conf

Thanks.

Revision history for this message
Hervé Cauwelier (bug tracking) (debian-oursours) wrote :

Created an attachment (id=3487)
/etc/modules

Revision history for this message
Hervé Cauwelier (bug tracking) (debian-oursours) wrote :

Created an attachment (id=3488)
Personnal xorg.conf used in prior to /etc/X11/xorg.conf

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

How did you install this box?

It looks like you've removed "mousedev" from /etc/modules, which is placed there
by the installer.

Put the following two lines into /etc/modules and see if you can plug/unplug
after a reboot:

  mousedev
  psmouse

Revision history for this message
Hervé Cauwelier (bug tracking) (debian-oursours) wrote :

This is probably the case, some "let's clean the box" action. But I'm surprised
device detection won't work for a USB mouse.

I add the lines, I'll report when I switch on the computer tonight, without the
mouse.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

It looks like, from your lsmod output, that the driver is being detected and
automatically loaded (it's in the after list) but probably a bit too late for
the happy plug/unplug stuff to work. We load it early to make sure it's there
for X, which is still a bit 70s and doesn't do hotplug well.

Revision history for this message
Hervé Cauwelier (bug tracking) (debian-oursours) wrote :

It does the trick but here is another report.

I first added those two modules on top of the current ones and restarted
(well... it ran out of battery). I powered the laptop with the mouse still
plugged and it was not moving at all. I noticed /dev/input/mice was not created.
Then I moved those modules after the ones I was using and now I can plug the
mouse whenever I want.

You may want to take this into account when generating /etc/modules at Ubuntu
installation. Feel free to resolve/fix the bug or I'll do it in a few days.

Anyway, you rock!

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Not really sure why the driver order makes a difference, unless you suffered
from #12915 which we just fixed (first few modules listed in /etc/modules didn't
actually get plugged properly).

Amusingly, the reason you got this odd behaviour from X is because your core
input device is the synaptics touchpad -- so as long as that's there, X will
start. The fact that /dev/input/mice is missing just means it decides not to
bother with it. This is why we load the module early, so it exists by the time
X starts and we can be absolutely sure that any plugged or unplugged mice just
work because X doesn't know about it.

Anyway, sounds like you're all fixed up, so I'll close this.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.