linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACRUX gamepads not happy with autosuspend?
       [not found]       ` <4C44E3A2.8080301@dv-life.ru>
@ 2010-07-20  0:17         ` Dmitry Torokhov
  2010-07-20  8:07           ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-07-20  0:17 UTC (permalink / raw)
  To: Jiri Kosina, Oliver Neukum; +Cc: x0r, Linux Input, Linux USB

Jiri, Oliver,

It looks like ACRUX game controllers do not like autopm. There is
a bug report over at Ubuntu's launchpad:

	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446

that states that once device is plugged in the light ion it turns on
briefly and then goes off and from that point on nothing comes from
the device. They deal with it by having an application open the jsX
device as soon as it appears and that makes gamepad work - but it
is obviously not a solution.

It looks like we either need to disable autosuspend for these devices
or maybe kick the device harder when userspace tries to open it so
that it wakes up if it went to sleep.

(Sergei, have you tried disabling autosuspend on your box if it is
enabled?)

Also, if one attempts to boot the box with gamepad already connected
then the driver gets confused and will attempt to reset the device
indefinitely:

[   32.430271] drivers/hid/usbhid/hid-core.c: can't reset device, 0000:00:1a.2-1/input0, status -32
[   32.446271] drivers/hid/usbhid/hid-core.c: can't reset device, 0000:00:1a.2-1/input0, status -32
[   32.462271] drivers/hid/usbhid/hid-core.c: can't reset device, 0000:00:1a.2-1/input0, status -32
[   32.478272] drivers/hid/usbhid/hid-core.c: can't reset device, 0000:00:1a.2-1/input0, status -32

Under Windows the device works well with the standard driver; no
vendor specific drivers is required... Any ideas?

Thanks!

-- 
Dmitry

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
  2010-07-20  0:17         ` ACRUX gamepads not happy with autosuspend? Dmitry Torokhov
@ 2010-07-20  8:07           ` Oliver Neukum
       [not found]             ` <201007201007.04518.oneukum-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2010-07-20  8:07 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Jiri Kosina, x0r, Linux Input, Linux USB

[-- Attachment #1: Type: Text/Plain, Size: 1127 bytes --]

Am Dienstag, 20. Juli 2010, 02:17:45 schrieb Dmitry Torokhov:
> Jiri, Oliver,
> 
> It looks like ACRUX game controllers do not like autopm. There is
> a bug report over at Ubuntu's launchpad:
> 
> 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446

That report shows that the symptoms are consistent with autosuspend,
but it doesn't show that autosuspend was on.

> that states that once device is plugged in the light ion it turns on
> briefly and then goes off and from that point on nothing comes from
> the device. They deal with it by having an application open the jsX
> device as soon as it appears and that makes gamepad work - but it
> is obviously not a solution.

If autosuspend is enabled simply opening the device file will keep the
device active as it does not suport remote wakeup.

Something like
sleep 5000 </dev/input/js0
should fix the issue.

> It looks like we either need to disable autosuspend for these devices
> or maybe kick the device harder when userspace tries to open it so
> that it wakes up if it went to sleep.

You can try the attached patch. I doubt it works.

	Regards
		Oliver

[-- Attachment #2: 0001-USB-quirk-for-ACRUX-USB-GAMEPAD-8116.patch --]
[-- Type: text/x-patch, Size: 993 bytes --]

From d7fb44af446eaf9f2a200d3645b72f7f98029b57 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@neukum.org>
Date: Tue, 20 Jul 2010 10:04:47 +0200
Subject: [PATCH] USB: quirk for ACRUX USB GAMEPAD 8116

This needs to be reset as the system wakes up and
for runtime power management.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index f22d03d..cb2e985 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -75,6 +75,9 @@ static const struct usb_device_id usb_quirk_list[] = {
 	{ USB_DEVICE(0x1908, 0x1315), .driver_info =
 			USB_QUIRK_HONOR_BNUMINTERFACES },
 
+	/* ACRUX USB GAMEPAD 8116 */
+	{ USB_DEVICE(0x1a34, 0x0802), .driver_info = USB_QUIRK_RESET_RESUME },
+
 	/* INTEL VALUE SSD */
 	{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
       [not found]             ` <201007201007.04518.oneukum-l3A5Bk7waGM@public.gmane.org>
@ 2010-07-20  8:58               ` Jiri Kosina
  2010-07-20 10:03                 ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Jiri Kosina @ 2010-07-20  8:58 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Dmitry Torokhov, x0r, Linux Input, Linux USB

On Tue, 20 Jul 2010, Oliver Neukum wrote:

> > It looks like ACRUX game controllers do not like autopm. There is
> > a bug report over at Ubuntu's launchpad:
> > 
> > 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446
> 
> That report shows that the symptoms are consistent with autosuspend,
> but it doesn't show that autosuspend was on.

That would be my first question -- who enabled autosuspend, if it was 
really on? I thought it should be still off by default, shouldn't it?

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
  2010-07-20  8:58               ` Jiri Kosina
@ 2010-07-20 10:03                 ` Oliver Neukum
       [not found]                   ` <201007201203.43573.oneukum-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2010-07-20 10:03 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Dmitry Torokhov, x0r, Linux Input, Linux USB

Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:
> On Tue, 20 Jul 2010, Oliver Neukum wrote:
> 
> > > It looks like ACRUX game controllers do not like autopm. There is
> > > a bug report over at Ubuntu's launchpad:
> > > 
> > > 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446
> > 
> > That report shows that the symptoms are consistent with autosuspend,
> > but it doesn't show that autosuspend was on.
> 
> That would be my first question -- who enabled autosuspend, if it was 
> really on? I thought it should be still off by default, shouldn't it?

It is off by default, but that doesn't stop Ubuntu having a udev rule to
switch it on or patching the kernel, so it might be on. We simply need
to know.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
       [not found]                   ` <201007201203.43573.oneukum-l3A5Bk7waGM@public.gmane.org>
@ 2010-07-20 12:14                     ` x0r
  2010-07-20 12:24                       ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: x0r @ 2010-07-20 12:14 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Jiri Kosina, Dmitry Torokhov, Linux Input, Linux USB

В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:
> Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:
> > On Tue, 20 Jul 2010, Oliver Neukum wrote:
> > 
> > > > It looks like ACRUX game controllers do not like autopm. There is
> > > > a bug report over at Ubuntu's launchpad:
> > > > 
> > > > 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446
> > > 
> > > That report shows that the symptoms are consistent with autosuspend,
> > > but it doesn't show that autosuspend was on.
> > 
> > That would be my first question -- who enabled autosuspend, if it was 
> > really on? I thought it should be still off by default, shouldn't it?
> 
> It is off by default, but that doesn't stop Ubuntu having a udev rule to
> switch it on or patching the kernel, so it might be on. We simply need
> to know.
> 
> 	Regards
> 		Oliver
> 

x0r@desktop:~$ cat /sys/bus/usb/devices/5-1/power/autosuspend
2

Does it mean that autosuspend is enabled?

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
  2010-07-20 12:14                     ` x0r
@ 2010-07-20 12:24                       ` Oliver Neukum
  2010-07-24  7:51                         ` Dmitry Torokhov
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2010-07-20 12:24 UTC (permalink / raw)
  To: x0r; +Cc: Jiri Kosina, Dmitry Torokhov, Linux Input, Linux USB

Am Dienstag, 20. Juli 2010, 14:14:13 schrieb x0r:
> В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:
> > Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:
> > > On Tue, 20 Jul 2010, Oliver Neukum wrote:
> > > 
> > > > > It looks like ACRUX game controllers do not like autopm. There is
> > > > > a bug report over at Ubuntu's launchpad:
> > > > > 
> > > > > 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446
> > > > 
> > > > That report shows that the symptoms are consistent with autosuspend,
> > > > but it doesn't show that autosuspend was on.
> > > 
> > > That would be my first question -- who enabled autosuspend, if it was 
> > > really on? I thought it should be still off by default, shouldn't it?
> > 
> > It is off by default, but that doesn't stop Ubuntu having a udev rule to
> > switch it on or patching the kernel, so it might be on. We simply need
> > to know.
> > 
> > 	Regards
> > 		Oliver
> > 
> 
> x0r@desktop:~$ cat /sys/bus/usb/devices/5-1/power/autosuspend
> 2
> 
> Does it mean that autosuspend is enabled?

No, this means that if it is enabled a heuristic timeout of 2s is used.
That is if your device has been being idle for 2s, it will be autosuspend.

Whether it is autosuspended at all all is controlled in the "level" attribute.

on = no autosuspend
auto = autosuspend activated

	HTH
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
  2010-07-20 12:24                       ` Oliver Neukum
@ 2010-07-24  7:51                         ` Dmitry Torokhov
       [not found]                           ` <20100724075112.GB3615-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-07-24  7:51 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: x0r, Jiri Kosina, Linux Input, Linux USB

On Tue, Jul 20, 2010 at 02:24:20PM +0200, Oliver Neukum wrote:
> Am Dienstag, 20. Juli 2010, 14:14:13 schrieb x0r:
> > В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:
> > > Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:
> > > > On Tue, 20 Jul 2010, Oliver Neukum wrote:
> > > > 
> > > > > > It looks like ACRUX game controllers do not like autopm. There is
> > > > > > a bug report over at Ubuntu's launchpad:
> > > > > > 
> > > > > > 	https://bugs.launchpad.net/ubuntu/+source/joystick/+bug/448446
> > > > > 
> > > > > That report shows that the symptoms are consistent with autosuspend,
> > > > > but it doesn't show that autosuspend was on.
> > > > 
> > > > That would be my first question -- who enabled autosuspend, if it was 
> > > > really on? I thought it should be still off by default, shouldn't it?
> > > 
> > > It is off by default, but that doesn't stop Ubuntu having a udev rule to
> > > switch it on or patching the kernel, so it might be on. We simply need
> > > to know.
> > > 
> > > 	Regards
> > > 		Oliver
> > > 
> > 
> > x0r@desktop:~$ cat /sys/bus/usb/devices/5-1/power/autosuspend
> > 2
> > 
> > Does it mean that autosuspend is enabled?
> 
> No, this means that if it is enabled a heuristic timeout of 2s is used.
> That is if your device has been being idle for 2s, it will be autosuspend.
> 
> Whether it is autosuspended at all all is controlled in the "level" attribute.
> 
> on = no autosuspend
> auto = autosuspend activated
> 

Hmm, Sergei says that fiddling with autosuspend values (nor disabling it
altogether by recompiling without CONFIG_USB_SUSPEND) helps. If device
left unopened then attempts to open it (and thus start traffic) at a
later time fail.

Sergei, what happens if you have the device plugged and compile HID as a
module and then unload/reload the driver and try opening the device
right away? Does it work or is it still dead?

Thanks.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ACRUX gamepads not happy with autosuspend?
       [not found]                           ` <20100724075112.GB3615-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
@ 2010-07-25  0:58                             ` x0r
  0 siblings, 0 replies; 8+ messages in thread
From: x0r @ 2010-07-25  0:58 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Oliver Neukum, Jiri Kosina, Linux Input, Linux USB

I found old bug dedicated to this problem:
http://kerneltrap.org/mailarchive/linux-usb-devel/2007/11/2/378569

In additional there is similar bugs in other distributions with
different kernel versions:
http://ubuntuforums.org/showthread.php?t=959127
http://bugs.archlinux.org/task/18558
https://bbs.archlinux.org/viewtopic.php?pid=720066

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-25  0:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4C3F8A90.3020308@dv-life.ru>
     [not found] ` <20100716080200.GA14120@core.coreip.homeip.net>
     [not found]   ` <4C44D236.40002@dv-life.ru>
     [not found]     ` <201007191630.07475.dmitry.torokhov@gmail.com>
     [not found]       ` <4C44E3A2.8080301@dv-life.ru>
2010-07-20  0:17         ` ACRUX gamepads not happy with autosuspend? Dmitry Torokhov
2010-07-20  8:07           ` Oliver Neukum
     [not found]             ` <201007201007.04518.oneukum-l3A5Bk7waGM@public.gmane.org>
2010-07-20  8:58               ` Jiri Kosina
2010-07-20 10:03                 ` Oliver Neukum
     [not found]                   ` <201007201203.43573.oneukum-l3A5Bk7waGM@public.gmane.org>
2010-07-20 12:14                     ` x0r
2010-07-20 12:24                       ` Oliver Neukum
2010-07-24  7:51                         ` Dmitry Torokhov
     [not found]                           ` <20100724075112.GB3615-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2010-07-25  0:58                             ` x0r

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).