Skip to contentSkip to conversation

ACRUX gamepads not happy with autosuspend?

DISCUSSION Dmitry Torokhov 5 participants 8 messages Jul 20, 2010 – Jul 25, 2010 8 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

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!

Signature · 1 line
Dmitry
#6 lore raw

Am Dienstag, 20. Juli 2010, 02:17:45 schrieb Dmitry Torokhov:

Quoted 6 lines

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.

Quoted 5 lines

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.

Quoted 3 lines

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

From d7fb44af446eaf9f2a200d3645b72f7f98029b57 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
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.

---
 drivers/usb/core/quirks.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/usb/core/quirks.c +3 -0
index f22d03d..cb2e985 100644
@@ -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 },
 
Signature · 1 line
1.7.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 7 lines · Oliver Neukum
Quoted 4 lines

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?

Signature · 6 lines
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#9 lore raw

Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:

Quoted 5 lines · Oliver Neukum
Quoted 4 lines
Quoted 4 lines

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line
	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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:

Quoted 14 lines

Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:

Quoted 5 lines · Oliver Neukum
Quoted 4 lines
Quoted 4 lines

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line
	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?

Quoted 7 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw

Am Dienstag, 20. Juli 2010, 14:14:13 schrieb x0r:

Quoted 19 lines

В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:

Quoted 18 lines

Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:

Quoted 5 lines · Oliver Neukum
Quoted 4 lines
Quoted 4 lines

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line
	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.

Quoted 8 lines
Quoted 3 lines

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw
Quoted 29 lines · Oliver Neukum

Am Dienstag, 20. Juli 2010, 14:14:13 schrieb x0r:

Quoted 19 lines

В Втр, 20/07/2010 в 12:03 +0200, Oliver Neukum пишет:

Quoted 18 lines

Am Dienstag, 20. Juli 2010, 10:58:50 schrieb Jiri Kosina:

Quoted 5 lines · Oliver Neukum
Quoted 4 lines
Quoted 4 lines

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line
	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.

Quoted 8 lines
Quoted 3 lines

Regards
Oliver

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

Does it mean that autosuspend is enabled?

Quoted 8 lines

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.

Signature · 5 lines
Dmitry
--
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

A message that is not in the archive (sent off-list or not yet received): 20100724075112.GB3615-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org

#15 lore raw

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html