Skip to contentSkip to conversation

usb devices don't wake up the system

REGRESSION Maxim Levitsky 3 participants 18 messages Jun 30, 2010 – Jul 7, 2010

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 6 lines · Maxim Levitsky

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.

Quoted 12 lines

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

Quoted 3 lines

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.

Quoted 63 lines

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

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

Rafael

#2 lore raw
Quoted 9 lines · Rafael J. Wysocki
Quoted 6 lines · Maxim Levitsky

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

Quoted 85 lines
Quoted 13 lines

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

Quoted 3 lines

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.

Quoted 63 lines

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

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

Rafael

#3 lore raw
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

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

#4 lore raw
In reply to Maxim Levitsky
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 1 line

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

#5 lore raw
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 6 lines

Well, you didn't say that.

Quoted 1 line

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

#6 lore raw
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Rafael J. Wysocki
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 1 line

I test this, and probably bisect the problem anyway.

It may not be necessary if the WoL test fails.

Quoted 5 lines

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

#7 lore raw
Quoted 32 lines · Rafael J. Wysocki
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Rafael J. Wysocki
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 1 line

I test this, and probably bisect the problem anyway.

It may not be necessary if the WoL test fails.

Quoted 7 lines
Quoted 5 lines

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

#8 lore raw
Quoted 36 lines · Maxim Levitsky
Quoted 35 lines · Rafael J. Wysocki
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Rafael J. Wysocki
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 1 line

I test this, and probably bisect the problem anyway.

It may not be necessary if the WoL test fails.

Quoted 3 lines

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

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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.

Quoted 16 lines

(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

#9 lore raw
Quoted 43 lines · Maxim Levitsky
Quoted 42 lines · Maxim Levitsky
Quoted 39 lines · Rafael J. Wysocki
Quoted 17 lines · Maxim Levitsky
Quoted 16 lines · Rafael J. Wysocki
Quoted 5 lines · Maxim Levitsky
Quoted 4 lines · Rafael J. Wysocki
Quoted 3 lines · Maxim Levitsky

Hi,

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 1 line

I test this, and probably bisect the problem anyway.

It may not be necessary if the WoL test fails.

Quoted 5 lines

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

Quoted 7 lines
Quoted 2 lines

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

#10 lore raw
In reply to Maxim Levitsky
Quoted 7 lines · Maxim Levitsky
Quoted 2 lines

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.

Quoted 7 lines
Quoted 7 lines

(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

#11 lore raw
Quoted 18 lines · Alan Stern
Quoted 7 lines · Maxim Levitsky
Quoted 2 lines

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.

Quoted 4 lines
Quoted 4 lines

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

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

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

#12 lore raw
Quoted 7 lines · Maxim Levitsky
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

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  
Quoted 12 lines

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

Quoted 7 lines

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.

Quoted 2 lines

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

#13 lore raw
Quoted 48 lines · Alan Stern
Quoted 7 lines · Maxim Levitsky
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

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  
Quoted 12 lines

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

Quoted 7 lines

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:

Quoted 8 lines
$ 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
Quoted 4 lines

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

Quoted 6 lines
Quoted 3 lines

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' ?

Quoted 5 lines
# 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.

Quoted 3 lines

Alan Stern

Best regard,
Maxim Levitsky

#14 lore raw
Quoted 22 lines · Maxim Levitsky
Quoted 11 lines

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

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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 5 lines
Quoted 4 lines
# 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

#15 lore raw

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

#16 lore raw
Quoted 3 lines · Maxim Levitsky

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

...

Quoted 4 lines

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

#17 lore raw
In reply to Maxim Levitsky
Quoted 21 lines · Maxim Levitsky

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:

Quoted 7 lines

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.

Quoted 3 lines

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