Skip to contentSkip to conversation

3.5.1 hid_generic causes mouse locking until a button is clicked

DISCUSSION Dâniel Fraga 3 participants 5 messages Aug 11, 2012 – Aug 13, 2012 HID

lore
Share & tools
lore
#0 lore raw

I upgraded from 3.4.4 to 3.5.1 kernel and now I see the new
hid_generic module is causing problem with my mouse (a regular Logitech USB optical mouse).

The problem is: after 2 seconds without moving the mouse, the
pointer will NOT move again UNLESS I click a mouse button.

So now I have to click a button everytime I want to "unlock"
the mouse pointer. It didn't happen with 3.4.4 so it's clearly a regression.

Any hints? I can try patches. Thanks.

Signature · 1 line
http://www.youtube.com/DanielFragaBR
#1 lore raw

Hi,

Quoted 4 lines · On Sat, 11 August 2012 Dâniel Fraga <[email protected]> wrote:

I upgraded from 3.4.4 to 3.5.1 kernel and now I see the new
hid_generic module is causing problem with my mouse (a regular Logitech USB optical mouse).

Quoted 8 lines

The problem is: after 2 seconds without moving the mouse, the
pointer will NOT move again UNLESS I click a mouse button.

So now I have to click a button everytime I want to "unlock"
the mouse pointer. It didn't happen with 3.4.4 so it's clearly a regression.

Any hints? I can try patches. Thanks.

This might be USB-autosuspend. 2 seconds seems to match the default delay for autosuspending USB devices.

Have a look at the values under /power/ for your USB devices. (probably the port to which your mouse is connected and/or the mouse itself).
Check if disabling USB-autosuspend helps.

Compare the output of:
grep . /sys/bus/usb/devices/*/power/*
for the time your mouse can move your pointer and when it can't. Also change the autosuspend delay or disable autosuspend for the mouse.

See also in your kernel sources:
Documentation/usb/power-management.txt
Documentation/ABI/testing/sysfs-bus-usb

Bruno
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 2 lines · On Sun, 12 Aug 2012 19:53:29 +0200 Bruno Prémont <[email protected]>…

This might be USB-autosuspend. 2 seconds seems to match the default delay for autosuspending USB devices.

Hi Bruno. That's it!

I raised the autosuspend value and I'm using it as a
workaround... but the default values are the same as the kernel 3.4.4 values, so something has changed:

/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/power$ cat autosuspend*
2 <----- autosuspend
2000 <-- autosuspend_delay_ms

So, if the values are the same, why the behaviour has changed
from kernel 3.4 to 3.5?

I mean, it seems that with kernel 3.4 simply moving the mouse
would wake up the usb port and now with kernel 3.5 it only works if I press a button.

So, kernel 3.5 is supposed to wake up the usb port when we move
the mouse or not?

Is there a way to restore the old behaviour from kernel 3.4?

Thanks.

Signature · 6 lines
Linux 3.5.1: Saber-toothed Squirrel
http://www.youtube.com/DanielFragaBR
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 6 lines · On Sunday 12 August 2012 18:16:22 Dâniel Fraga wrote:

I mean, it seems that with kernel 3.4 simply moving the mouse
would wake up the usb port and now with kernel 3.5 it only works if I press a button.

So, kernel 3.5 is supposed to wake up the usb port when we move
the mouse or not?

The kernel doesn't do this. Mice are told to wake up when they have input data. They decide themselves what data should be collected while they sleep. The USB HID spec offers no way to learn what will wake up a device. In fact, it does'nt mention power management.

Quoted 1 line

Is there a way to restore the old behaviour from kernel 3.4?

Probably the device didn't autosuspend. Disable autosuspension.

Regards
Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 4 lines · On Mon, 13 Aug 2012 08:30:35 +0200 Oliver Neukum <[email protected]> wrote:

The kernel doesn't do this. Mice are told to wake up when they have input data. They decide themselves what data should be collected while they sleep. The USB HID spec offers no way to learn what will wake up a device. In fact, it does'nt mention power management.

	Ok.
Quoted 1 line

Probably the device didn't autosuspend. Disable autosuspension.

Nice, this is a good workaround:

/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/power$ echo -1 > autosuspend

Now it's correct. Thank you ;)

Signature · 2 lines
Linux 3.5.1: Saber-toothed Squirrel
http://www.youtube.com/DanielFragaBR