# 3.5.1 hid\_generic causes mouse locking until a button is clicked

- List: linux-input
- 5 messages, 3 authors
- Page: https://ratatoskr.run/linux-input/2012/08/8920026/t

## 3.5.1 hid\_generic causes mouse locking until a button is clicked

- From: Dâniel Fraga \<hidden\>
- Date: 2012-08-11 20:00:07 
- Message: https://ratatoskr.run/linux-input/2012/08/8920026.md

```text
	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.

-- 
http://www.youtube.com/DanielFragaBR


```

## Re: 3.5.1 hid\_generic causes mouse locking until a button is clicked

- From: Bruno Prémont \<bonbons@linux-vserver.org\>
- Date: 2012-08-12 17:54:11 
- Message: https://ratatoskr.run/linux-input/2012/08/8920027.md

```text
Hi,

On Sat, 11 August 2012 Dâniel Fraga [ref] 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).
> 
> 	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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```

## Re: 3.5.1 hid\_generic causes mouse locking until a button is clicked

- From: Dâniel Fraga \<hidden\>
- Date: 2012-08-12 21:16:26 
- Message: https://ratatoskr.run/linux-input/2012/08/8920028.md

```text
On Sun, 12 Aug 2012 19:53:29 +0200
Bruno Prémont [ref] wrote:

> 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.

-- 
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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```

## Re: 3.5.1 hid\_generic causes mouse locking until a button is clicked

- From: Oliver Neukum \<hidden\>
- Date: 2012-08-13 08:02:12 
- Message: https://ratatoskr.run/linux-input/2012/08/8920029.md

```text
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.

> 	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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```

## Re: 3.5.1 hid\_generic causes mouse locking until a button is clicked

- From: Dâniel Fraga \<hidden\>
- Date: 2012-08-13 09:19:00 
- Message: https://ratatoskr.run/linux-input/2012/08/8920030.md

```text
On Mon, 13 Aug 2012 08:30:35 +0200
Oliver Neukum [ref] 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.

> 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 ;)

-- 
Linux 3.5.1: Saber-toothed Squirrel
http://www.youtube.com/DanielFragaBR
```
