Skip to contentSkip to conversation

USB wakeup problem on Toshiba Portege R500

Regression Rafael J. Wysocki 5 participants 32 messages Jan 8, 2009 – Jan 13, 2009 ACPI

lore
Share & tools
lore
#0 lore raw

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e

Author: Alan Stern <[email protected]>
Date:   Wed Dec 17 17:20:38 2008 -0500

USB: automatically enable wakeup for PCI host controllers

causes a regression to appear on my Toshiba Portege R500.

The regression is that when suspended to RAM, the box wakes up immediately unless 'disabled' is written into the /sys/devices/.../power/wakeup file of the EHCI controller. I know of at least 10 different boxes out there that are going to have similar problems forcing their users to use manual workaround.

Also, it wakes up on a USB mouse activity, which I don't want it to do, so in fact I have to write 'disabled' to the /sys/devices/.../power/wakeup files of all USB controllers.

I'm not sure if the commit went into the right direction.

Thanks,
Rafael

#1 lore raw

Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:

Quoted 10 lines

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e

Author: Alan Stern <[email protected]>
Date:   Wed Dec 17 17:20:38 2008 -0500

USB: automatically enable wakeup for PCI host controllers

Quoted 7 lines

causes a regression to appear on my Toshiba Portege R500.

The regression is that when suspended to RAM, the box wakes up immediately unless 'disabled' is written into the /sys/devices/.../power/wakeup file of the

Even without attached devices?

Quoted 6 lines

EHCI controller. I know of at least 10 different boxes out there that are going to have similar problems forcing their users to use manual workaround.

Also, it wakes up on a USB mouse activity, which I don't want it to do, so in fact I have to write 'disabled' to the /sys/devices/.../power/wakeup files of all USB controllers.

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Regards
Oliver

#31 lore raw
In reply to Rafael J. Wysocki

Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:

Quoted 10 lines

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e

Author: Alan Stern <[email protected]>
Date:   Wed Dec 17 17:20:38 2008 -0500

USB: automatically enable wakeup for PCI host controllers

Quoted 7 lines

causes a regression to appear on my Toshiba Portege R500.

The regression is that when suspended to RAM, the box wakes up immediately unless 'disabled' is written into the /sys/devices/.../power/wakeup file of the

Even without attached devices?

Quoted 6 lines

EHCI controller. I know of at least 10 different boxes out there that are going to have similar problems forcing their users to use manual workaround.

Also, it wakes up on a USB mouse activity, which I don't want it to do, so in fact I have to write 'disabled' to the /sys/devices/.../power/wakeup files of all USB controllers.

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Regards
Oliver

#2 lore raw
In reply to Oliver Neukum
Quoted 14 lines · Oliver Neukum

Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:

Quoted 13 lines

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e

Author: Alan Stern <[email protected]>
Date:   Wed Dec 17 17:20:38 2008 -0500

USB: automatically enable wakeup for PCI host controllers

Quoted 6 lines
Quoted 4 lines

causes a regression to appear on my Toshiba Portege R500.

The regression is that when suspended to RAM, the box wakes up immediately unless 'disabled' is written into the /sys/devices/.../power/wakeup file of the

Even without attached devices?

Yes. This is a platform problem, no doubt, but this patch makes it painfully visible.

Quoted 9 lines
Quoted 6 lines

EHCI controller. I know of at least 10 different boxes out there that are going to have similar problems forcing their users to use manual workaround.

Also, it wakes up on a USB mouse activity, which I don't want it to do, so in fact I have to write 'disabled' to the /sys/devices/.../power/wakeup files of all USB controllers.

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this. This means people will likely lose time on trying to debug this problem and someone will have to handle the reports. Are you volunteering to do that?

Also, it would have been nice to notify people of such a change of behavior in advance.

Thanks,
Rafael

#3 lore raw
In reply to Oliver Neukum
Quoted 14 lines · Oliver Neukum

Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:

Quoted 13 lines

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e

Author: Alan Stern <[email protected]>
Date:   Wed Dec 17 17:20:38 2008 -0500

USB: automatically enable wakeup for PCI host controllers

Quoted 6 lines
Quoted 4 lines

causes a regression to appear on my Toshiba Portege R500.

The regression is that when suspended to RAM, the box wakes up immediately unless 'disabled' is written into the /sys/devices/.../power/wakeup file of the

Even without attached devices?

Yes. This is a platform problem, no doubt, but this patch makes it painfully visible.

Quoted 9 lines
Quoted 6 lines

EHCI controller. I know of at least 10 different boxes out there that are going to have similar problems forcing their users to use manual workaround.

Also, it wakes up on a USB mouse activity, which I don't want it to do, so in fact I have to write 'disabled' to the /sys/devices/.../power/wakeup files of all USB controllers.

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this. This means people will likely lose time on trying to debug this problem and someone will have to handle the reports. Are you volunteering to do that?

Also, it would have been nice to notify people of such a change of behavior in advance.

Thanks,
Rafael

#4 lore raw

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 8 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this.  This means people will likely lose time on trying to debug this problem and someone will have to handle the reports.  Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 2 lines

Also, it would have been nice to notify people of such a change of behavior in advance.

Yes, sorry.

Regards
Oliver

#30 lore raw
In reply to Rafael J. Wysocki

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 8 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this.  This means people will likely lose time on trying to debug this problem and someone will have to handle the reports.  Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 2 lines

Also, it would have been nice to notify people of such a change of behavior in advance.

Yes, sorry.

Regards
Oliver

#5 lore raw
In reply to Oliver Neukum
Quoted 4 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 3 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Quoted 8 lines
Quoted 5 lines

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this. This means people will likely lose time on trying to debug this problem and someone will have to handle the reports. Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yestarday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Thanks,
Rafael

#6 lore raw
In reply to Oliver Neukum
Quoted 4 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 3 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Quoted 8 lines
Quoted 5 lines

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this. This means people will likely lose time on trying to debug this problem and someone will have to handle the reports. Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yestarday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Thanks,
Rafael

#7 lore raw
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

My 2 cents,
FJP

#8 lore raw
Quoted 17 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Quoted 10 lines

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

One more case (a real-life example actually):
- There is a USB wireless mouse attached to the box while suspending and the mouse is powered off by pressing a button on it. The mouse's radio receiver remains in a USB port on the box. Now, if the mouse is powered off again, the box will resume. What if that happens accidentally while the box is being carried in a backpack?

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I have to say I agree.

Thanks,
Rafael

#9 lore raw
In reply to Frans Pop
Quoted 17 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Quoted 10 lines

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

One more case (a real-life example actually):
- There is a USB wireless mouse attached to the box while suspending and the mouse is powered off by pressing a button on it. The mouse's radio receiver remains in a USB port on the box. Now, if the mouse is powered off again, the box will resume. What if that happens accidentally while the box is being carried in a backpack?

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I have to say I agree.

Thanks,
Rafael

#24 lore raw
In reply to Oliver Neukum
Quoted 4 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 3 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Quoted 8 lines
Quoted 5 lines

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this.  This means people will likely lose time on trying to debug this problem and someone will have to handle the reports.  Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#29 lore raw
In reply to Oliver Neukum
Quoted 4 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:

Quoted 3 lines
Quoted 2 lines

We do support remote wakeup from PS2 keyboards. So you might argue we should do the same for USB HID devices.

Quoted 8 lines
Quoted 5 lines

Well, _I_ can live with a few 'echo disabled > /sys/devices/.../power/wakeup' lines in my init scripts, but I'm afraid we're going to get many problem reports related to this.  This means people will likely lose time on trying to debug this problem and someone will have to handle the reports.  Are you volunteering to do that?

You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#25 lore raw
In reply to Pavel Machek

Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:

Quoted 3 lines

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)

Yes, they are. Do they wake if you hit the power button or close and reopen the lid? If so, I am satisfied and have no problem with reverting.

Regards
Oliver

#28 lore raw
In reply to Pavel Machek

Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:

Quoted 3 lines

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)

Yes, they are. Do they wake if you hit the power button or close and reopen the lid? If so, I am satisfied and have no problem with reverting.

Regards
Oliver

#26 lore raw
In reply to Oliver Neukum
Quoted 7 lines · Oliver Neukum

Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:

Quoted 3 lines

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)

Yes, they are. Do they wake if you hit the power button or close and reopen the lid? If so, I am satisfied and have no problem with reverting.

I think so, yes.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#27 lore raw
In reply to Oliver Neukum
Quoted 7 lines · Oliver Neukum

Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:

Quoted 3 lines

laptops normally wake up lid open... (and you still have a powerbutton; plus I'm not aware of any laptops with usb keyboard -- are apples crazy enough to do that?)

Yes, they are. Do they wake if you hit the power button or close and reopen the lid? If so, I am satisfied and have no problem with reverting.

I think so, yes.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#10 lore raw
In reply to Frans Pop
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Alan Stern

#11 lore raw
In reply to Frans Pop
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Alan Stern

#12 lore raw

[CCing ACPI and Len)

Quoted 41 lines · Alan Stern
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

Quoted 5 lines

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Agreed.

Thanks,
Rafael

#13 lore raw
In reply to Alan Stern

[CCing ACPI and Len)

Quoted 41 lines · Alan Stern
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

Quoted 5 lines

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Agreed.

Thanks,
Rafael

#14 lore raw
Quoted 58 lines · Rafael J. Wysocki

[CCing ACPI and Len)

Quoted 41 lines · Alan Stern
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

Agreed. WoL worked before and it should remain working.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#15 lore raw
In reply to Rafael J. Wysocki
Quoted 58 lines · Rafael J. Wysocki

[CCing ACPI and Len)

Quoted 41 lines · Alan Stern
Quoted 28 lines · Frans Pop
Quoted 5 lines · Rafael J. Wysocki
Quoted 3 lines · Oliver Neukum

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
You are making a very persuasive argument for reverting it. But what about laptops that only have a USB keyboard?

Quoted 7 lines

Well, up to and including 2.6.28 they needed to echo 'enable' to the USB controllers' /sys/devices/.../power/wakeup files, so if the patch is reverted, they won't be worse off than they were day before yesterday. :-)

Perhaps we can choose the default depending on whether or not any HID devices are attached to given controller?

Is "resume on keyboard activity" really all that needed? Both my laptops and my desktop resume fine after pressing the power button.

Also consider the following cases:
- laptop has been suspended with external USB mouse connected
- mouse is moved (accidentally or because it is in the way of a coffee cup)
- mouse cable is removed before putting the laptop in a bag for transport
- laptop is in docking station with USB mouse/kbd connected to that
- again, mouse gets moved for some reason
- laptop is undocked while suspended
- or the reverse: laptop gets docked

Quoted 6 lines

IMO it is not desirable that the system gets resumed as a result of any of those actions. I'm not complete sure that it would in all those cases, but have they been considered?

And in general I've always been in favor of things only happening automagically if I've explicitly asked for that, and not by default.

I don't mind reverting the "automatically enable PCI wakeup" commit. But we should first come to a definite policy for kernel default wakeup settings, rather than deciding things piecemeal for different subsystems.

Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

Agreed. WoL worked before and it should remain working.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#16 lore raw
In reply to Rafael J. Wysocki
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected. Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Quoted 7 lines
Quoted 5 lines

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Agreed.

Alan Stern

#17 lore raw
In reply to Rafael J. Wysocki
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected. Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Quoted 7 lines
Quoted 5 lines

Devices not capable of directly waking the system can be enabled. This includes things like USB devices, which have to pass a wakeup request through their parent and therefore can't wake up the system unless the parent is also enabled for wakeup.

Agreed.

Alan Stern

#18 lore raw
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Yes, it is.

Thanks,
Rafael

#19 lore raw
In reply to Alan Stern
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Yes, it is.

Thanks,
Rafael

#20 lore raw
Quoted 24 lines · Rafael J. Wysocki
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

Quoted 6 lines

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Yes, it is.

Therefore all we need is a patch to change the USB host controller drivers. They should call device_set_wakeup_capable() instead of device_init_wakeup().

I just got back from vacation so things will be busy for a few days, but I'll send out such a patch soon.

Alan Stern

#21 lore raw
In reply to Rafael J. Wysocki
Quoted 24 lines · Rafael J. Wysocki
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

Quoted 6 lines

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Yes, it is.

Therefore all we need is a patch to change the USB host controller drivers. They should call device_set_wakeup_capable() instead of device_init_wakeup().

I just got back from vacation so things will be busy for a few days, but I'll send out such a patch soon.

Alan Stern

#22 lore raw
Quoted 31 lines · Alan Stern
Quoted 29 lines · Rafael J. Wysocki
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Quoted 8 lines
Quoted 1 line

Yes, it is.

Therefore all we need is a patch to change the USB host controller drivers. They should call device_set_wakeup_capable() instead of device_init_wakeup().

I just got back from vacation so things will be busy for a few days, but I'll send out such a patch soon.

Great, thanks a lot!

Rafael

#23 lore raw
In reply to Alan Stern
Quoted 31 lines · Alan Stern
Quoted 29 lines · Rafael J. Wysocki
Quoted 16 lines · Alan Stern
Quoted 14 lines · Rafael J. Wysocki
Quoted 5 lines

My proposal:

Devices and events that are clearly associated with system wakeup should be enabled by default. For example: Power button and laptop lid.

Agreed.

Quoted 5 lines

All other devices capable of waking up the system should be disabled by default. This presumably includes every PCI device. If users want keyboard or mouse events to cause a system resume then they will have to configure their desktop management program to enable it.

Quoted 6 lines
Quoted 3 lines

I generally agree, with one exception. There are network adapters which can be enabled to wake up by the BIOS and their drivers set them up for WoL currently on this basis. These should remain enabled IMO.

How do we know which adapters these are? IMO the PCI core should disable wakeup by default for all devices when they are detected.

This is what we do.

Quoted 2 lines

Is it sufficient to have the adapter drivers enable wakeup during their probe routines?

Quoted 8 lines
Quoted 1 line

Yes, it is.

Therefore all we need is a patch to change the USB host controller drivers. They should call device_set_wakeup_capable() instead of device_init_wakeup().

I just got back from vacation so things will be busy for a few days, but I'll send out such a patch soon.

Great, thanks a lot!

Rafael