Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] fast transition D0 to D3cold pow state cripples USB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 296

PostPosted: Wed Jan 16, 2013 8:21 am    Post subject: [solved] fast transition D0 to D3cold pow state cripples USB Reply with quote

Hi,


Recently, I think with kernel 3.6 (I use 3.6.11-gentoo), I started getting problems with my USB (Logitech radio) mouse whenever I am running off battery: it deactivates almost immediately, which means I constantly have to (literally) shake it to wake up from sleep before I can use it again. Typical mouse usage includes short periods of activity and longer periods of inactivity, so it is not as if I handle my mouse in a special way.

When looking at what happens:

Code:
# dmesg | tail
[ 4970.857253] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[ 4970.857383] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[ 4970.958115] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[ 4970.968985] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3cold
[ 4979.335879] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D3cold
[ 5389.669794] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
[ 5389.770291] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[ 5389.770531] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D0
[ 5389.871161] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[ 5389.881955] ehci_hcd 0000:00:1d.0: power state changed by ACPI to D3cold


It becomes clear that USB (ehci_hcd) is switched from full power (D0) to sleep mode (D3cold) way too fast (in about a tenth of a second!).

I see different possible reasons for this behavior:

  1. Bug in the kernel I use.
  2. (Mis)configuration on my part becoming apparent after recent changes in the kernel.


I would be grateful if anyone could guide me to discover what the underlying problem is and help me find a workaround.


TIA,

Erik


Last edited by equaeghe on Sat Aug 08, 2015 7:39 pm; edited 2 times in total
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Wed Jan 16, 2013 2:04 pm    Post subject: Reply with quote

is this a laptop, desktop? Configured with a kind of suspend? what's your whole dmesg output? kernel config? etc...

I have no such a messages in dmesg, so looks like and odd power management settings in kernel.
Back to top
View user's profile Send private message
plopz
n00b
n00b


Joined: 08 Aug 2015
Posts: 1

PostPosted: Sat Aug 08, 2015 3:30 pm    Post subject: Reply with quote

Hello,

I've had exactly the same problem (same symptoms, same messages in kernel log), I "solved" it using a workaround : I disabled the USB autosuspend. To do this, in /etc/laptop-mode/conf.d/usb-autosuspend.conf , set CONTROL_USB_AUTOSUSPEND to 0. Alternatively, you can blacklist your device (mouse) by adding its USB ID (you use the lsusb command to find it) to the variable AUTOSUSPEND_USBTYPE_BLACKLIST

I hope this helps
Back to top
View user's profile Send private message
equaeghe
Apprentice
Apprentice


Joined: 22 Feb 2005
Posts: 296

PostPosted: Sat Aug 08, 2015 7:39 pm    Post subject: Reply with quote

plopz wrote:
[...], you can blacklist your device (mouse) by adding its USB ID (you use the lsusb command to find it) to the variable AUTOSUSPEND_USBTYPE_BLACKLIST

That was what I did in the end. Sorry for not reporting back.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum