16

Sometimes, after some event that I can't determine, my USB mouse gets stuttery - like the refresh rate drops down to about 5-10Hz. It still works fine other than that, but it's incredibly annoying, and makes the computer feel really slow. It appears to happen frequently after a sleep, but it sometimes happens when the computer has just booted up. A reboot usually fixes it.

I've tried:

  • unplugging and replugging the mouse.
  • rmmod in usbhid and hid, and modprobing them (and psmouse, which is irrelevant)
  • restarting udev (with mouse in and out)
  • killing X, and starting it again
  • plugging in a second USB mouse - problem remains, with both mice.

I would like to find a way to "reset" my mouse, without having to reboot. Is there anything else I should try?

I am running Kubuntu 12.04. this is a laptop, and the touchpad is unaffected.

naught101
  • 739
  • You sure it does'nt happen on Windows right? – daisy Sep 27 '12 at 13:52
  • Probably related to something in the kernel like timers not coming out of suspend right, not a specific problem with the mouse. Check dmesg output. – Jim Paris Sep 27 '12 at 21:13
  • @warl0ck: you think it might be a usb hardware problem in the computer? Possible, I guess, although it resets itself after a reboot most times. I don't have windows, so I can't test, unfortunately. Even if I did, the problem isn't regular, so it might be difficult to know. – naught101 Sep 28 '12 at 00:19
  • @JimParis: I'd agree, but it also happens sometimes without suspending (less common though). I've tried looking at dmesg, but I don't really know what to look for.. – naught101 Sep 28 '12 at 00:21
  • Have you tried a different distro, possibly via live media? – Ignacio Vazquez-Abrams Sep 28 '12 at 02:38
  • This question is quite old. The problem hasn't occurred in the last year. It's possible that it was a driver problem, and that it has be fixed in more recent versions. – naught101 Feb 07 '14 at 04:35

4 Answers4

29

Try Ctrl+Alt+F1 to text mode and immediately Ctrl+Alt+F7 to graphical mode.

Majk
  • 291
15

The optical mouse on my laptop running Ubuntu 18.04 on the 4.15.0-51-generic kernel just quit working for some reason. First I tried the normal quick remedies that is unplugging and re-plugging first on the same port and then on the other two unused ports; the mouse still didn't work. I have to point out that I still had power on the USB ports. So I was puzzled and decided to check what was happening on my terminal. Here are my interactions with the system.

dmesg

I found the following entries in the system log.

usb 1-1.2: USB disconnect, device number 16
[50687.847220] usb 1-1.2: new low-speed USB device number 17 using ehci-pci
[50687.959081] usb 1-1.2: New USB device found, idVendor=0000, idProduct=0538
[50687.959084] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[50687.959085] usb 1-1.2: Product:  USB OPTICAL MOUSE
[50687.961754] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:0000:0538.0004/input/input18
[50688.019546] hid-generic 0003:0000:0538.0004: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:1a.0-1.2/input0

I then tried unloading and re-loading usbhid

sudo modprobe -r usbhid && sudo modprobe usbhid

That did not work. However I did notice a new error in the logs

usb usb3-port2: connect-debounce failed

At this point I decided to do a web search to see what that specific error means and that's how I landed on this page. I however felt that the solutions provided needed too much work and instead opted to see what else I could do with the Kernel modules to solve the problem. First I checked what specific kernel modules were loaded by running

sudo modprobe -r Tab

Please note that the proper way of getting loaded modules is by running lsmod but I prefer the method I used above for minute tasks for which I have no use for lsmod's much more verbose output

A module name psmouse caught my eye and I decided to test whether reloading both both usbhid and psmouse resurrects my mouse.

sudo modprobe -r usbhid && sudo modprobe -r psmouse
sudo modprobe usbhid && sudo modprobe psmouse

And just like that the functions of my optical mouse were restored.

4

This USB reloading helped me: http://davidjb.com/blog/2012/06/restartreset-usb-in-ubuntu-12-04-without-rebooting/

The original article suggests this:

echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
echo -n "0000:00:1a.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind
echo -n "0000:00:1d.0" | tee /sys/bus/pci/drivers/ehci_hcd/bind

But on my Debian I need to replace ehci_hcd by ehci-pci. Also you may have different IDs, they can be obtained by executing:

lspci | grep USB
Dzenly
  • 141
  • 2
3

There are many possible causes to the problem.

1: The mouse is physically bad. Try using a different USB mouse.
2: The USB port is physically bad. Plug the mouse into another port.
3: It may be some odd bug in KDE. I have had weird mouse and cursor issues with KDE, but not in Unity or GNOME on the same system.
4: You may need a different/newer mouse driver.

You may want to try updating the system. If you are willing to try anything to fix the issue, (once you know it is an issue with the OS) you may want to install Ubuntu on your system instead of Kubuntu. Kubuntu is different from Ubuntu, although they are largely the same OS.

Devyn Collier Johnson
  • 986
  • 2
  • 10
  • 28
  • Installing Ubuntu vs Kubuntu shouldn't make a difference, unless they have different kernels or radically different KDE. I'd check first updating the system to the latest stuff, perhaps check out experimental/unstable/testing packages. On the other points I fully agree. Oh, and if it is a wireless mouse, check the batteries: low batteries elicit all sort of bizarre behaviour from mice. – vonbrand Jan 31 '14 at 13:00
  • @vonbrand I am not saying they use different kernels. I think the issue may be with rendering the cursor in the KDE environment. The Unity interface does not use KDE. – Devyn Collier Johnson Feb 02 '14 at 13:04