public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] usb devices don't wake up the system
@ 2010-06-30 23:31 Maxim Levitsky
  2010-06-30 23:40 ` Rafael J. Wysocki
  0 siblings, 1 reply; 18+ messages in thread
From: Maxim Levitsky @ 2010-06-30 23:31 UTC (permalink / raw)
  To: linux-pm@lists.linux-foundation.org

Hi,


This is my desktop, and I don't use it much.
I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
1.1 of course) doesn't wake the system anymore.

I used (and still do) to enable wakeup via /proc/acpi/wakeup.


maxim@MAIN:~$ cat bin/system/wake_all 
#! /bin/bash

echo "UHC1" > /proc/acpi/wakeup		# ICH8 UHCI1
echo "UHC2" > /proc/acpi/wakeup		# ICH8 UHCI2
echo "UHC3" > /proc/acpi/wakeup		# ICH8 UHCI3
echo "UHC4" > /proc/acpi/wakeup		# ICH8 UHCI4
echo "UHC5" > /proc/acpi/wakeup		# ICH8 UHCI5

echo "ILAN" > /proc/acpi/wakeup		# ICH8 internal (lan/azal//EHCI)
echo "P32" >  /proc/acpi/wakeup 	# ICH8 external (PCI/PCI express)
echo "UAR1" > /proc/acpi/wakeup		# SUPERIO (UART/Sleep button)



I checked, and it looks like power/wakeup attributes are enabled:

root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cat power/wakeup 
enabled
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cd usb5/
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cat power/wakeup 
enabled
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cd 5-1/
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat power/wakeup 
enabled <--- this I set manually to enabled, didn't help
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat id
idProduct  idVendor   
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat idVendor 
1241
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 06a3:ff52 Saitek PLC Cyborg 3D Rumble Force Joystick
Bus 005 Device 002: ID 1241:1166 Belkin MI-2150 Trust Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# 

maxim@MAIN:~$ cat /proc/acpi/wakeup 
Device	S-state	  Status   Sysfs node
SLPB	  S4	*enabled   
P32	  S4	*enabled   pci:0000:00:1e.0
UAR1	  S4	*enabled   pnp:00:0a
ILAN	  S4	*enabled   pci:0000:00:19.0
PEGP	  S4	*enabled   
PEX0	  S4	*enabled   pci:0000:00:1c.0
PEX1	  S4	*enabled   pci:0000:00:1c.1
PEX2	  S4	*enabled   pci:0000:00:1c.2
PEX3	  S4	*enabled   pci:0000:00:1c.3
PEX4	  S4	*enabled   pci:0000:00:1c.4
PEX5	  S4	*enabled   
UHC1	  S3	*enabled   pci:0000:00:1d.0
UHC2	  S3	*enabled   pci:0000:00:1d.1
UHC3	  S3	*enabled   pci:0000:00:1d.2
UHC4	  S3	*enabled   
EHCI	  S3	*enabled   pci:0000:00:1d.7
EHC2	  S3	*enabled   pci:0000:00:1a.7
UH42	  S3	*enabled   pci:0000:00:1a.0
UHC5	  S3	*enabled   pci:0000:00:1a.1
AZAL	  S3	*enabled   pci:0000:00:1b.0


maxim@MAIN:~$ lsusb -t
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
    |__ Port 2: Dev 3, If 0, Class=HID, Driver=usbhid, 1.5M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M



I don't have much time now for testing, but will try my best to do so.


Best regards,
	Maxim Levitsky

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-06-30 23:31 [REGRESSION] usb devices don't wake up the system Maxim Levitsky
@ 2010-06-30 23:40 ` Rafael J. Wysocki
  2010-07-01  0:28   ` Maxim Levitsky
  0 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2010-06-30 23:40 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Thursday, July 01, 2010, Maxim Levitsky wrote:
> Hi,
> 
> 
> This is my desktop, and I don't use it much.
> I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> 1.1 of course) doesn't wake the system anymore.

Please wait for 2.6.35-rc4 to appear and see if there's any difference.

> I used (and still do) to enable wakeup via /proc/acpi/wakeup.
> 
> 
> maxim@MAIN:~$ cat bin/system/wake_all 
> #! /bin/bash
> 
> echo "UHC1" > /proc/acpi/wakeup		# ICH8 UHCI1
> echo "UHC2" > /proc/acpi/wakeup		# ICH8 UHCI2
> echo "UHC3" > /proc/acpi/wakeup		# ICH8 UHCI3
> echo "UHC4" > /proc/acpi/wakeup		# ICH8 UHCI4
> echo "UHC5" > /proc/acpi/wakeup		# ICH8 UHCI5
> 
> echo "ILAN" > /proc/acpi/wakeup		# ICH8 internal (lan/azal//EHCI)
> echo "P32" >  /proc/acpi/wakeup 	# ICH8 external (PCI/PCI express)
> echo "UAR1" > /proc/acpi/wakeup		# SUPERIO (UART/Sleep button)

That shouldn't be necessary.

> I checked, and it looks like power/wakeup attributes are enabled:
> 
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cat power/wakeup 
> enabled
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cd usb5/
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cat power/wakeup 
> enabled
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cd 5-1/
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat power/wakeup 
> enabled <--- this I set manually to enabled, didn't help
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat id
> idProduct  idVendor   
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat idVendor 
> 1241
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# lsusb
> Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 005 Device 003: ID 06a3:ff52 Saitek PLC Cyborg 3D Rumble Force Joystick
> Bus 005 Device 002: ID 1241:1166 Belkin MI-2150 Trust Mouse
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# 
> 
> maxim@MAIN:~$ cat /proc/acpi/wakeup 
> Device	S-state	  Status   Sysfs node
> SLPB	  S4	*enabled   
> P32	  S4	*enabled   pci:0000:00:1e.0
> UAR1	  S4	*enabled   pnp:00:0a
> ILAN	  S4	*enabled   pci:0000:00:19.0
> PEGP	  S4	*enabled   
> PEX0	  S4	*enabled   pci:0000:00:1c.0
> PEX1	  S4	*enabled   pci:0000:00:1c.1
> PEX2	  S4	*enabled   pci:0000:00:1c.2
> PEX3	  S4	*enabled   pci:0000:00:1c.3
> PEX4	  S4	*enabled   pci:0000:00:1c.4
> PEX5	  S4	*enabled   
> UHC1	  S3	*enabled   pci:0000:00:1d.0
> UHC2	  S3	*enabled   pci:0000:00:1d.1
> UHC3	  S3	*enabled   pci:0000:00:1d.2
> UHC4	  S3	*enabled   
> EHCI	  S3	*enabled   pci:0000:00:1d.7
> EHC2	  S3	*enabled   pci:0000:00:1a.7
> UH42	  S3	*enabled   pci:0000:00:1a.0
> UHC5	  S3	*enabled   pci:0000:00:1a.1
> AZAL	  S3	*enabled   pci:0000:00:1b.0
> 
> 
> maxim@MAIN:~$ lsusb -t
> /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
>     |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
>     |__ Port 2: Dev 3, If 0, Class=HID, Driver=usbhid, 1.5M
> /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
> 
> 
> 
> I don't have much time now for testing, but will try my best to do so.

Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-06-30 23:40 ` Rafael J. Wysocki
@ 2010-07-01  0:28   ` Maxim Levitsky
  2010-07-01 14:42     ` Alan Stern
  2010-07-01 18:58     ` Rafael J. Wysocki
  0 siblings, 2 replies; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-01  0:28 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm@lists.linux-foundation.org

On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > Hi,
> > 
> > 
> > This is my desktop, and I don't use it much.
> > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > 1.1 of course) doesn't wake the system anymore.
> 
> Please wait for 2.6.35-rc4 to appear and see if there's any difference.
Why should I?
I always compile from git.
Just pulled Linus' tree, and nothing changed.

Best regards,
	Maxim Levitsky


> 
> > I used (and still do) to enable wakeup via /proc/acpi/wakeup.
> > 
> > 
> > maxim@MAIN:~$ cat bin/system/wake_all 
> > #! /bin/bash
> > 
> > echo "UHC1" > /proc/acpi/wakeup		# ICH8 UHCI1
> > echo "UHC2" > /proc/acpi/wakeup		# ICH8 UHCI2
> > echo "UHC3" > /proc/acpi/wakeup		# ICH8 UHCI3
> > echo "UHC4" > /proc/acpi/wakeup		# ICH8 UHCI4
> > echo "UHC5" > /proc/acpi/wakeup		# ICH8 UHCI5
> > 
> > echo "ILAN" > /proc/acpi/wakeup		# ICH8 internal (lan/azal//EHCI)
> > echo "P32" >  /proc/acpi/wakeup 	# ICH8 external (PCI/PCI express)
> > echo "UAR1" > /proc/acpi/wakeup		# SUPERIO (UART/Sleep button)
> 
> That shouldn't be necessary.
> 
> > I checked, and it looks like power/wakeup attributes are enabled:
> > 
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cat power/wakeup 
> > enabled
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0# cd usb5/
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cat power/wakeup 
> > enabled
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5# cd 5-1/
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat power/wakeup 
> > enabled <--- this I set manually to enabled, didn't help
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat id
> > idProduct  idVendor   
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# cat idVendor 
> > 1241
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# lsusb
> > Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> > Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> > Bus 005 Device 003: ID 06a3:ff52 Saitek PLC Cyborg 3D Rumble Force Joystick
> > Bus 005 Device 002: ID 1241:1166 Belkin MI-2150 Trust Mouse
> > Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> > Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> > Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> > root@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1# 
> > 
> > maxim@MAIN:~$ cat /proc/acpi/wakeup 
> > Device	S-state	  Status   Sysfs node
> > SLPB	  S4	*enabled   
> > P32	  S4	*enabled   pci:0000:00:1e.0
> > UAR1	  S4	*enabled   pnp:00:0a
> > ILAN	  S4	*enabled   pci:0000:00:19.0
> > PEGP	  S4	*enabled   
> > PEX0	  S4	*enabled   pci:0000:00:1c.0
> > PEX1	  S4	*enabled   pci:0000:00:1c.1
> > PEX2	  S4	*enabled   pci:0000:00:1c.2
> > PEX3	  S4	*enabled   pci:0000:00:1c.3
> > PEX4	  S4	*enabled   pci:0000:00:1c.4
> > PEX5	  S4	*enabled   
> > UHC1	  S3	*enabled   pci:0000:00:1d.0
> > UHC2	  S3	*enabled   pci:0000:00:1d.1
> > UHC3	  S3	*enabled   pci:0000:00:1d.2
> > UHC4	  S3	*enabled   
> > EHCI	  S3	*enabled   pci:0000:00:1d.7
> > EHC2	  S3	*enabled   pci:0000:00:1a.7
> > UH42	  S3	*enabled   pci:0000:00:1a.0
> > UHC5	  S3	*enabled   pci:0000:00:1a.1
> > AZAL	  S3	*enabled   pci:0000:00:1b.0
> > 
> > 
> > maxim@MAIN:~$ lsusb -t
> > /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> > /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> > /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> >     |__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
> >     |__ Port 2: Dev 3, If 0, Class=HID, Driver=usbhid, 1.5M
> > /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> > /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M
> > 
> > 
> > 
> > I don't have much time now for testing, but will try my best to do so.
> 
> Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-01  0:28   ` Maxim Levitsky
@ 2010-07-01 14:42     ` Alan Stern
  2010-07-01 18:58     ` Rafael J. Wysocki
  1 sibling, 0 replies; 18+ messages in thread
From: Alan Stern @ 2010-07-01 14:42 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Thu, 1 Jul 2010, Maxim Levitsky wrote:

> On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > Hi,
> > > 
> > > 
> > > This is my desktop, and I don't use it much.
> > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > 1.1 of course) doesn't wake the system anymore.
> > 
> > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> Why should I?
> I always compile from git.
> Just pulled Linus' tree, and nothing changed.

On my system there's no problem -- but my development tree isn't
vanilla 2.6.35-rc3.  Note, however, that with my Microsoft USB optical
mouse I have to use _two_ button clicks to wake up the system.  One
click isn't enough -- I don't know why.

Enabling power/wakeup for the 0000:00:1d.0 and 5-1 devices should be 
all you need to do.  It should already be enabled by default for the 
usb5 device.

You _might_ find that this patch helps:

	http://marc.info/?l=linux-usb&m=127748897212461&w=2

although since it worked okay in 2.6.33, I doubt the patch will make 
any difference.

In fact, you're in a very good position to use git bisect.  I would be 
curious to know the exact change responsible for this regression.

Alan Stern

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-01  0:28   ` Maxim Levitsky
  2010-07-01 14:42     ` Alan Stern
@ 2010-07-01 18:58     ` Rafael J. Wysocki
  2010-07-01 20:44       ` Maxim Levitsky
  1 sibling, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2010-07-01 18:58 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Thursday, July 01, 2010, Maxim Levitsky wrote:
> On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > Hi,
> > > 
> > > 
> > > This is my desktop, and I don't use it much.
> > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > 1.1 of course) doesn't wake the system anymore.
> > 
> > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> Why should I?
> I always compile from git.

Well, you didn't say that.

> Just pulled Linus' tree, and nothing changed.

If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
please check if that works.

Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-01 18:58     ` Rafael J. Wysocki
@ 2010-07-01 20:44       ` Maxim Levitsky
  2010-07-01 21:07         ` Rafael J. Wysocki
  0 siblings, 1 reply; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-01 20:44 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm@lists.linux-foundation.org

On Thu, 2010-07-01 at 20:58 +0200, Rafael J. Wysocki wrote:
> On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > Hi,
> > > > 
> > > > 
> > > > This is my desktop, and I don't use it much.
> > > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > > 1.1 of course) doesn't wake the system anymore.
> > > 
> > > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> > Why should I?
> > I always compile from git.
> 
> Well, you didn't say that.
> 
> > Just pulled Linus' tree, and nothing changed.
> 
> If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
> please check if that works.

Ethernet adapter (e1000e) is broken by another regression (wol maybe
still works...) ;-)

I test this, and probably bisect the problem anyway.

Note that wakeup from PS/2 keyboard does work.
(And it doesn't is I don't turn flags in /proc/acpi/wakeup...)

Me thinks about doing a dual-bisect for both regressions at same
time....

Best regards,
	Maxim Levitsky

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-01 20:44       ` Maxim Levitsky
@ 2010-07-01 21:07         ` Rafael J. Wysocki
  2010-07-03 22:41           ` Maxim Levitsky
  0 siblings, 1 reply; 18+ messages in thread
From: Rafael J. Wysocki @ 2010-07-01 21:07 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Thursday, July 01, 2010, Maxim Levitsky wrote:
> On Thu, 2010-07-01 at 20:58 +0200, Rafael J. Wysocki wrote:
> > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > Hi,
> > > > > 
> > > > > 
> > > > > This is my desktop, and I don't use it much.
> > > > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > > > 1.1 of course) doesn't wake the system anymore.
> > > > 
> > > > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> > > Why should I?
> > > I always compile from git.
> > 
> > Well, you didn't say that.
> > 
> > > Just pulled Linus' tree, and nothing changed.
> > 
> > If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
> > please check if that works.
> 
> Ethernet adapter (e1000e) is broken by another regression (wol maybe
> still works...) ;-)

Well, what exactly do you mean by broken?  It definitely works in my test box.

> I test this, and probably bisect the problem anyway.

It may not be necessary if the WoL test fails.

> Note that wakeup from PS/2 keyboard does work.
> (And it doesn't is I don't turn flags in /proc/acpi/wakeup...)
> 
> Me thinks about doing a dual-bisect for both regressions at same
> time....

If you have the time for that ...

Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-01 21:07         ` Rafael J. Wysocki
@ 2010-07-03 22:41           ` Maxim Levitsky
  2010-07-03 22:42             ` Maxim Levitsky
  0 siblings, 1 reply; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-03 22:41 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm@lists.linux-foundation.org

On Thu, 2010-07-01 at 23:07 +0200, Rafael J. Wysocki wrote:
> On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > On Thu, 2010-07-01 at 20:58 +0200, Rafael J. Wysocki wrote:
> > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > 
> > > > > > This is my desktop, and I don't use it much.
> > > > > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > > > > 1.1 of course) doesn't wake the system anymore.
> > > > > 
> > > > > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> > > > Why should I?
> > > > I always compile from git.
> > > 
> > > Well, you didn't say that.
> > > 
> > > > Just pulled Linus' tree, and nothing changed.
> > > 
> > > If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
> > > please check if that works.
> > 
> > Ethernet adapter (e1000e) is broken by another regression (wol maybe
> > still works...) ;-)
> 
> Well, what exactly do you mean by broken?  It definitely works in my test box.
> 
> > I test this, and probably bisect the problem anyway.
> 
> It may not be necessary if the WoL test fails.
> 
> > Note that wakeup from PS/2 keyboard does work.
> > (And it doesn't is I don't turn flags in /proc/acpi/wakeup...)
> > 
> > Me thinks about doing a dual-bisect for both regressions at same
> > time....
> 
> If you have the time for that ...


Alan. thanks for saving me from another bisect...
latest git tip works again.

(of course I need to explicitly enable power/wakeup on the mouse), but I
can live with that.)


I want to note that I still need to enable wakeup in /power/acpi/wakeup
to make USB mouse wakeup the system.
This isn't a regression, but I thought that I don't need that anymore.


Best regards,
	Maxim Levitsky

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-03 22:41           ` Maxim Levitsky
@ 2010-07-03 22:42             ` Maxim Levitsky
  2010-07-03 23:27               ` Rafael J. Wysocki
  2010-07-04 12:51               ` Alan Stern
  0 siblings, 2 replies; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-03 22:42 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm@lists.linux-foundation.org

On Sun, 2010-07-04 at 01:41 +0300, Maxim Levitsky wrote:
> On Thu, 2010-07-01 at 23:07 +0200, Rafael J. Wysocki wrote:
> > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > On Thu, 2010-07-01 at 20:58 +0200, Rafael J. Wysocki wrote:
> > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > > > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > 
> > > > > > > This is my desktop, and I don't use it much.
> > > > > > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > > > > > 1.1 of course) doesn't wake the system anymore.
> > > > > > 
> > > > > > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> > > > > Why should I?
> > > > > I always compile from git.
> > > > 
> > > > Well, you didn't say that.
> > > > 
> > > > > Just pulled Linus' tree, and nothing changed.
> > > > 
> > > > If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
> > > > please check if that works.
> > > 
> > > Ethernet adapter (e1000e) is broken by another regression (wol maybe
> > > still works...) ;-)
> > 
> > Well, what exactly do you mean by broken?  It definitely works in my test box.
> > 
> > > I test this, and probably bisect the problem anyway.
> > 
> > It may not be necessary if the WoL test fails.
> > 
> > > Note that wakeup from PS/2 keyboard does work.
> > > (And it doesn't is I don't turn flags in /proc/acpi/wakeup...)
> > > 
> > > Me thinks about doing a dual-bisect for both regressions at same
> > > time....
> > 
> > If you have the time for that ...
> 
> 
> Alan. thanks for saving me from another bisect...
> latest git tip works again.

I mean, I think that
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48826626263d4a61d06fd8c5805da31f925aefa0

fixed the problem.


> 
> (of course I need to explicitly enable power/wakeup on the mouse), but I
> can live with that.)
> 
> 
> I want to note that I still need to enable wakeup in /power/acpi/wakeup
> to make USB mouse wakeup the system.
> This isn't a regression, but I thought that I don't need that anymore.
> 
> 
> Best regards,
> 	Maxim Levitsky
> 
> 
> 
> 

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-03 22:42             ` Maxim Levitsky
@ 2010-07-03 23:27               ` Rafael J. Wysocki
  2010-07-04 12:51               ` Alan Stern
  1 sibling, 0 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2010-07-03 23:27 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Sunday, July 04, 2010, Maxim Levitsky wrote:
> On Sun, 2010-07-04 at 01:41 +0300, Maxim Levitsky wrote:
> > On Thu, 2010-07-01 at 23:07 +0200, Rafael J. Wysocki wrote:
> > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > On Thu, 2010-07-01 at 20:58 +0200, Rafael J. Wysocki wrote:
> > > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > > On Thu, 2010-07-01 at 01:40 +0200, Rafael J. Wysocki wrote:
> > > > > > > On Thursday, July 01, 2010, Maxim Levitsky wrote:
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > 
> > > > > > > > This is my desktop, and I don't use it much.
> > > > > > > > I updated the kernel from 2.6.33 to 2.6.35-rc3, and my usb mouse (usb
> > > > > > > > 1.1 of course) doesn't wake the system anymore.
> > > > > > > 
> > > > > > > Please wait for 2.6.35-rc4 to appear and see if there's any difference.
> > > > > > Why should I?
> > > > > > I always compile from git.
> > > > > 
> > > > > Well, you didn't say that.
> > > > > 
> > > > > > Just pulled Linus' tree, and nothing changed.
> > > > > 
> > > > > If you have an Ethernet adapter in that box and you can set up for Wake-on-LAN,
> > > > > please check if that works.
> > > > 
> > > > Ethernet adapter (e1000e) is broken by another regression (wol maybe
> > > > still works...) ;-)
> > > 
> > > Well, what exactly do you mean by broken?  It definitely works in my test box.
> > > 
> > > > I test this, and probably bisect the problem anyway.
> > > 
> > > It may not be necessary if the WoL test fails.
> > > 
> > > > Note that wakeup from PS/2 keyboard does work.
> > > > (And it doesn't is I don't turn flags in /proc/acpi/wakeup...)
> > > > 
> > > > Me thinks about doing a dual-bisect for both regressions at same
> > > > time....
> > > 
> > > If you have the time for that ...
> > 
> > 
> > Alan. thanks for saving me from another bisect...
> > latest git tip works again.
> 
> I mean, I think that
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48826626263d4a61d06fd8c5805da31f925aefa0
> 
> fixed the problem.

Good, thanks for the confirmation.

Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-03 22:42             ` Maxim Levitsky
  2010-07-03 23:27               ` Rafael J. Wysocki
@ 2010-07-04 12:51               ` Alan Stern
  2010-07-04 15:44                 ` Maxim Levitsky
  1 sibling, 1 reply; 18+ messages in thread
From: Alan Stern @ 2010-07-04 12:51 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Sun, 4 Jul 2010, Maxim Levitsky wrote:

> > Alan. thanks for saving me from another bisect...
> > latest git tip works again.
> 
> I mean, I think that
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48826626263d4a61d06fd8c5805da31f925aefa0
> 
> fixed the problem.

Ah, yes.  Well, I can't claim a lot of credit for that because I'm the 
person who introduced the regression in the first place!  But at least 
it's working okay now.

> > (of course I need to explicitly enable power/wakeup on the mouse), but I
> > can live with that.)
> > 
> > 
> > I want to note that I still need to enable wakeup in /power/acpi/wakeup
> > to make USB mouse wakeup the system.
> > This isn't a regression, but I thought that I don't need that anymore.

You shouldn't.  Which setting in /proc/acpi/wakeup needs to be enabled?

Alan Stern

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-04 12:51               ` Alan Stern
@ 2010-07-04 15:44                 ` Maxim Levitsky
  2010-07-06 15:17                   ` Alan Stern
  0 siblings, 1 reply; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-04 15:44 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-pm@lists.linux-foundation.org

[-- Attachment #1: Type: text/plain, Size: 3605 bytes --]

On Sun, 2010-07-04 at 08:51 -0400, Alan Stern wrote:
> On Sun, 4 Jul 2010, Maxim Levitsky wrote:
> 
> > > Alan. thanks for saving me from another bisect...
> > > latest git tip works again.
> > 
> > I mean, I think that
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48826626263d4a61d06fd8c5805da31f925aefa0
> > 
> > fixed the problem.
> 
> Ah, yes.  Well, I can't claim a lot of credit for that because I'm the 
> person who introduced the regression in the first place!  But at least 
> it's working okay now.
> 
> > > (of course I need to explicitly enable power/wakeup on the mouse), but I
> > > can live with that.)
> > > 
> > > 
> > > I want to note that I still need to enable wakeup in /power/acpi/wakeup
> > > to make USB mouse wakeup the system.
> > > This isn't a regression, but I thought that I don't need that anymore.
> 
> You shouldn't.  Which setting in /proc/acpi/wakeup needs to be enabled?

The wakeup GPE for UHCI controller which is connected to the mouse.

maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5$ cat /proc/acpi/wakeup 
Device	S-state	  Status   Sysfs node
SLPB	  S4	*enabled   
P32	  S4	*disabled  pci:0000:00:1e.0
UAR1	  S4	*disabled  pnp:00:0a
ILAN	  S4	*disabled  pci:0000:00:19.0
PEGP	  S4	*disabled  
PEX0	  S4	*disabled  pci:0000:00:1c.0
PEX1	  S4	*disabled  pci:0000:00:1c.1
PEX2	  S4	*disabled  pci:0000:00:1c.2
PEX3	  S4	*disabled  pci:0000:00:1c.3
PEX4	  S4	*disabled  pci:0000:00:1c.4
PEX5	  S4	*disabled  
UHC1	  S3	*enabled   pci:0000:00:1d.0
UHC2	  S3	*disabled  pci:0000:00:1d.1
UHC3	  S3	*disabled  pci:0000:00:1d.2
UHC4	  S3	*disabled  
EHCI	  S3	*disabled  pci:0000:00:1d.7
EHC2	  S3	*disabled  pci:0000:00:1a.7
UH42	  S3	*disabled  pci:0000:00:1a.0
UHC5	  S3	*disabled  pci:0000:00:1a.1
AZAL	  S3	*disabled  pci:0000:00:1b.0



maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5$ cd 5-1/
5-1:1.0/   driver/    ep_00/     power/     subsystem/ 
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5$ cd 5-1/
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1$ 
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1$ 
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1$ cat idVendor 
1241
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 1241:1166 Belkin MI-2150 Trust Mouse
Bus 005 Device 002: ID 06a3:ff52 Saitek PLC Cyborg 3D Rumble Force Joystick
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
maxim@MAIN:/sys/bus/pci/devices/0000:00:1d.0/usb5/5-1$ 



Also, I tried to enable wakeup on the USB mouse using udev rule.

I did that rule for a test (very broad for testing):

SUBSYSTEM=="usb", ACTION=="add", ATTR{power/wakeup}="enabled"

I found that running udevd --debug confirms that it writes that attribute 
(Log of mouse attach attached :-). (I connected  it to different port now)

According to the log, udev does write 'enabled' to
/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup

but:

maxim@MAIN:~$ cat /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup
disabled


This looks like kernel bug.



I am not against the default of disabled wakeup, it fact I welcome that, 
but I think that udev rule should work to enable it back.

Best regards,
	Maxim Levitsky

[-- Attachment #2: udev_log.txt.gz --]
[-- Type: application/x-gzip, Size: 3064 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-04 15:44                 ` Maxim Levitsky
@ 2010-07-06 15:17                   ` Alan Stern
  2010-07-06 16:51                     ` Maxim Levitsky
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Stern @ 2010-07-06 15:17 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Sun, 4 Jul 2010, Maxim Levitsky wrote:

> > > > I want to note that I still need to enable wakeup in /power/acpi/wakeup
> > > > to make USB mouse wakeup the system.
> > > > This isn't a regression, but I thought that I don't need that anymore.
> > 
> > You shouldn't.  Which setting in /proc/acpi/wakeup needs to be enabled?
> 
> The wakeup GPE for UHCI controller which is connected to the mouse.

I have no idea why you need that.  It's not necessary on my system:

$ cat /proc/acpi/wakeup 
Device  S-state   Status   Sysfs node
P0P4      S4     disabled  pci:0000:00:1e.0
MC97      S4     disabled  
USB1      S4     disabled  pci:0000:00:1d.0
USB2      S4     disabled  pci:0000:00:1d.1
USB3      S4     disabled  pci:0000:00:1d.2
USB4      S4     disabled  pci:0000:00:1d.3
EUSB      S4     disabled  pci:0000:00:1d.7
PS2K      S4     enabled   pnp:00:09
PS2M      S4     enabled   pnp:00:0a
GBEN      S4     disabled  

> Also, I tried to enable wakeup on the USB mouse using udev rule.
> 
> I did that rule for a test (very broad for testing):
> 
> SUBSYSTEM=="usb", ACTION=="add", ATTR{power/wakeup}="enabled"
> 
> I found that running udevd --debug confirms that it writes that attribute 
> (Log of mouse attach attached :-). (I connected  it to different port now)
> 
> According to the log, udev does write 'enabled' to
> /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup
> 
> but:
> 
> maxim@MAIN:~$ cat /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup
> disabled
> 
> 
> This looks like kernel bug.

I don't think so.  I tried essentially the same experiment, under 
vanilla 2.6.35-rc4:

$ cat /etc/udev/rules.d/80-local.rules 
ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="45e/84/*", ATTR{power/wakeup}="enabled"

(045e and 0084 are the vendor and product IDs for my Microsoft USB 
optical mouse)

$ cat /sys/devices/pci0000:00/0000:00:1d.3/usb8/8-2/power/wakeup
enabled

So if the attribute ends up set to "disabled", it's probably because
some other program on your machine is changing it.  This isn't the
kernel's fault.

> I am not against the default of disabled wakeup, it fact I welcome that, 
> but I think that udev rule should work to enable it back.

It does, on my system.  With that rule in place and after manually 
doing:

# echo enabled >/sys/devices/pci0000:00/0000:00:1d.3/power/wakeup

the mouse does indeed cause the computer to wakeup from suspend.  (But 
as I mentioned before, it requires double-clicking.)

Alan Stern

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-06 15:17                   ` Alan Stern
@ 2010-07-06 16:51                     ` Maxim Levitsky
  2010-07-06 17:07                       ` Alan Stern
  0 siblings, 1 reply; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-06 16:51 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-pm@lists.linux-foundation.org

On Tue, 2010-07-06 at 11:17 -0400, Alan Stern wrote:
> On Sun, 4 Jul 2010, Maxim Levitsky wrote:
> 
> > > > > I want to note that I still need to enable wakeup in /power/acpi/wakeup
> > > > > to make USB mouse wakeup the system.
> > > > > This isn't a regression, but I thought that I don't need that anymore.
> > > 
> > > You shouldn't.  Which setting in /proc/acpi/wakeup needs to be enabled?
> > 
> > The wakeup GPE for UHCI controller which is connected to the mouse.
> 
> I have no idea why you need that.  It's not necessary on my system:
> 
> $ cat /proc/acpi/wakeup 
> Device  S-state   Status   Sysfs node
> P0P4      S4     disabled  pci:0000:00:1e.0
> MC97      S4     disabled  
> USB1      S4     disabled  pci:0000:00:1d.0
> USB2      S4     disabled  pci:0000:00:1d.1
> USB3      S4     disabled  pci:0000:00:1d.2
> USB4      S4     disabled  pci:0000:00:1d.3
> EUSB      S4     disabled  pci:0000:00:1d.7
> PS2K      S4     enabled   pnp:00:09
> PS2M      S4     enabled   pnp:00:0a
> GBEN      S4     disabled  
> 
> > Also, I tried to enable wakeup on the USB mouse using udev rule.
> > 
> > I did that rule for a test (very broad for testing):
> > 
> > SUBSYSTEM=="usb", ACTION=="add", ATTR{power/wakeup}="enabled"
> > 
> > I found that running udevd --debug confirms that it writes that attribute 
> > (Log of mouse attach attached :-). (I connected  it to different port now)
> > 
> > According to the log, udev does write 'enabled' to
> > /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup
> > 
> > but:
> > 
> > maxim@MAIN:~$ cat /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/power/wakeup
> > disabled
> > 
> > 
> > This looks like kernel bug.
> 
> I don't think so.  I tried essentially the same experiment, under 
> vanilla 2.6.35-rc4:
> 
> $ cat /etc/udev/rules.d/80-local.rules 
> ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="45e/84/*", ATTR{power/wakeup}="enabled"
> 
> (045e and 0084 are the vendor and product IDs for my Microsoft USB 
> optical mouse)
> 
> $ cat /sys/devices/pci0000:00/0000:00:1d.3/usb8/8-2/power/wakeup
> enabled

Nope...

ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="1241/1166/*", ATTR{power/wakeup}="enabled"

maxim@MAIN:~$ cat /sys/bus/usb/devices/5-1/power/wakeup 
disabled



> 
> So if the attribute ends up set to "disabled", it's probably because
> some other program on your machine is changing it.  This isn't the
> kernel's fault.
It can't be.
In older kernel the attribute is set to 'enabled' regardless of udev
rule.
Now it is set to disabled regardless of kernel rule.
I don't think userspace is that rogue... :-)



> 
> > I am not against the default of disabled wakeup, it fact I welcome that, 
> > but I think that udev rule should work to enable it back.
> 
> It does, on my system.  With that rule in place and after manually 
> doing:
                                                  ^^^
You mean 'or' ?

> 
> # echo enabled >/sys/devices/pci0000:00/0000:00:1d.3/power/wakeup
> 
> the mouse does indeed cause the computer to wakeup from suspend.  (But 
> as I mentioned before, it requires double-clicking.)
This might be a feature, to avoid waking up the system by accident.

> 
> Alan Stern
> 

Best regard,
	Maxim Levitsky

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-06 16:51                     ` Maxim Levitsky
@ 2010-07-06 17:07                       ` Alan Stern
  2010-07-06 20:51                         ` Maxim Levitsky
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Stern @ 2010-07-06 17:07 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Tue, 6 Jul 2010, Maxim Levitsky wrote:

> > I don't think so.  I tried essentially the same experiment, under 
> > vanilla 2.6.35-rc4:
> > 
> > $ cat /etc/udev/rules.d/80-local.rules 
> > ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="45e/84/*", ATTR{power/wakeup}="enabled"
> > 
> > (045e and 0084 are the vendor and product IDs for my Microsoft USB 
> > optical mouse)
> > 
> > $ cat /sys/devices/pci0000:00/0000:00:1d.3/usb8/8-2/power/wakeup
> > enabled
> 
> Nope...
> 
> ACTION=="add", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="1241/1166/*", ATTR{power/wakeup}="enabled"
> 
> maxim@MAIN:~$ cat /sys/bus/usb/devices/5-1/power/wakeup 
> disabled
> 
> 
> 
> > 
> > So if the attribute ends up set to "disabled", it's probably because
> > some other program on your machine is changing it.  This isn't the
> > kernel's fault.
> It can't be.
> In older kernel the attribute is set to 'enabled' regardless of udev
> rule.
> Now it is set to disabled regardless of kernel rule.
> I don't think userspace is that rogue... :-)

This would be another good thing to bisect, assuming it really is
caused by something in the kernel.

> > > I am not against the default of disabled wakeup, it fact I welcome that, 
> > > but I think that udev rule should work to enable it back.
> > 
> > It does, on my system.  With that rule in place and after manually 
> > doing:
>                                                   ^^^
> You mean 'or' ?

I meant "and".  Both the controller and the mouse were enabled for 
wakeup when I ran the test.  I didn't try other combinations, but it 
would be surprising if they did anything.  If the mouse isn't enabled 
for wakeup then it won't send a wakeup request when you click a button, 
and if the controller isn't enabled for wakeup then it won't cause the 
system to resume when it receives a request.

> > # echo enabled >/sys/devices/pci0000:00/0000:00:1d.3/power/wakeup
> > 
> > the mouse does indeed cause the computer to wakeup from suspend.  (But 
> > as I mentioned before, it requires double-clicking.)
> This might be a feature, to avoid waking up the system by accident.

Could be.

Alan Stern

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-06 17:07                       ` Alan Stern
@ 2010-07-06 20:51                         ` Maxim Levitsky
  2010-07-06 23:05                           ` Rafael J. Wysocki
  2010-07-07 15:33                           ` Alan Stern
  0 siblings, 2 replies; 18+ messages in thread
From: Maxim Levitsky @ 2010-07-06 20:51 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-pm@lists.linux-foundation.org

Ok, it seems that recent changes really did made /proc/acpi/wakeup
unnecessary.


Let me explain from beginning the current situation:

1. Indeed if I enable manually wakeup on both usb controller, wakeup
works.

usb controller = /sys/devices/pci0000:00/0000:00:1a.0/power/wakeup
usb device = /sys/devices/pci0000:00/0000:00:1a.0/usb2/2-2/power/wakeup

UDEV rule to set wakeup on usb controller works:

SUBSYSTEM=="pci", DRIVER=="uhci_hcd", ATTR{power/wakeup}="enabled"
SUBSYSTEM=="pci", DRIVER=="ehci_hcd", ATTR{power/wakeup}="enabled"


UDEV rule to set wakeup on device itself just doesn't work, even though
udev executes it:

ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTR{power/wakeup}="enabled"

I did try to add my usb id for mouse like you did. It of course doesn't
help.

I also found that above rule, *sometimes* works, but very rarely, so
indeed something else sets it. I strongly suspect its kernel.

I also think that I shouldn't need to set wakeup to enabled on usb
controller. This should be done automaticly as soon as I set 'enabled'
on usb device.


Best regards,
	Maxim Levitsky

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-06 20:51                         ` Maxim Levitsky
@ 2010-07-06 23:05                           ` Rafael J. Wysocki
  2010-07-07 15:33                           ` Alan Stern
  1 sibling, 0 replies; 18+ messages in thread
From: Rafael J. Wysocki @ 2010-07-06 23:05 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Tuesday, July 06, 2010, Maxim Levitsky wrote:
> Ok, it seems that recent changes really did made /proc/acpi/wakeup
> unnecessary.
> 
...
> 
> I also think that I shouldn't need to set wakeup to enabled on usb
> controller. This should be done automaticly as soon as I set 'enabled'
> on usb device.

That would probably require us to redesign things so that wakeup reference
counters are used instead of the should_wakeup bit.

Rafael

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

* Re: [REGRESSION] usb devices don't wake up the system
  2010-07-06 20:51                         ` Maxim Levitsky
  2010-07-06 23:05                           ` Rafael J. Wysocki
@ 2010-07-07 15:33                           ` Alan Stern
  1 sibling, 0 replies; 18+ messages in thread
From: Alan Stern @ 2010-07-07 15:33 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: linux-pm@lists.linux-foundation.org

On Tue, 6 Jul 2010, Maxim Levitsky wrote:

> Ok, it seems that recent changes really did made /proc/acpi/wakeup
> unnecessary.
> 
> 
> Let me explain from beginning the current situation:
> 
> 1. Indeed if I enable manually wakeup on both usb controller, wakeup
> works.
> 
> usb controller = /sys/devices/pci0000:00/0000:00:1a.0/power/wakeup
> usb device = /sys/devices/pci0000:00/0000:00:1a.0/usb2/2-2/power/wakeup
> 
> UDEV rule to set wakeup on usb controller works:
> 
> SUBSYSTEM=="pci", DRIVER=="uhci_hcd", ATTR{power/wakeup}="enabled"
> SUBSYSTEM=="pci", DRIVER=="ehci_hcd", ATTR{power/wakeup}="enabled"
> 
> 
> UDEV rule to set wakeup on device itself just doesn't work, even though
> udev executes it:
> 
> ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTR{power/wakeup}="enabled"
> 
> I did try to add my usb id for mouse like you did. It of course doesn't
> help.
> 
> I also found that above rule, *sometimes* works, but very rarely, so
> indeed something else sets it. I strongly suspect its kernel.

Why not edit drivers/base/power/sysfs.c:wake_store()?  Add something 
like this:

	dev_info(dev, "Process %s wrote: %s\n", current->comm, buf);

Then you'll know for certain what userspace is doing to the wakeup
attribute.  If it turns out that userspace isn't disabling the mouse's
setting then the kernel must be responsible, so you can track down the
problem by bisecting.

> I also think that I shouldn't need to set wakeup to enabled on usb
> controller. This should be done automaticly as soon as I set 'enabled'
> on usb device.

No.  They are two different wakeup settings for two different devices.

Indeed, suppose you had both a USB mouse and a USB keyboard attached to 
the same controller, and suppose you wanted the keyboard to be a wakeup 
device but not the mouse.  Then should disabling wakeup for the mouse 
also disable wakeup for the controller?  Should the wakeup setting for 
the controller always follow the last setting that was changed on any 
device beneath it?  That does not seem like a robust approach.

Alan Stern

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

end of thread, other threads:[~2010-07-07 15:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 23:31 [REGRESSION] usb devices don't wake up the system Maxim Levitsky
2010-06-30 23:40 ` Rafael J. Wysocki
2010-07-01  0:28   ` Maxim Levitsky
2010-07-01 14:42     ` Alan Stern
2010-07-01 18:58     ` Rafael J. Wysocki
2010-07-01 20:44       ` Maxim Levitsky
2010-07-01 21:07         ` Rafael J. Wysocki
2010-07-03 22:41           ` Maxim Levitsky
2010-07-03 22:42             ` Maxim Levitsky
2010-07-03 23:27               ` Rafael J. Wysocki
2010-07-04 12:51               ` Alan Stern
2010-07-04 15:44                 ` Maxim Levitsky
2010-07-06 15:17                   ` Alan Stern
2010-07-06 16:51                     ` Maxim Levitsky
2010-07-06 17:07                       ` Alan Stern
2010-07-06 20:51                         ` Maxim Levitsky
2010-07-06 23:05                           ` Rafael J. Wysocki
2010-07-07 15:33                           ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox