public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [Regression] USB wakeup problem on Toshiba Portege R500
@ 2009-01-08  7:35 Rafael J. Wysocki
  0 siblings, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-08  7:35 UTC (permalink / raw)
  To: Alan Stern; +Cc: Pavel Machek, Andrew Morton, Greg KH, LKML, pm list

Hi Alan,

Unfortunately, the following commit:

commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Wed Dec 17 17:20:38 2008 -0500

    USB: automatically enable wakeup for PCI host controllers

    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] <200901080835.39639.rjw@sisk.pl>
@ 2009-01-08  8:49 ` Oliver Neukum
       [not found] ` <200901080949.34339.oliver@neukum.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Oliver Neukum @ 2009-01-08  8:49 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg KH, LKML, Pavel Machek, Andrew Morton, pm list

Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:
> Hi Alan,
> 
> Unfortunately, the following commit:
> 
> commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e
> Author: Alan Stern <stern@rowland.harvard.edu>
> Date:   Wed Dec 17 17:20:38 2008 -0500
> 
>     USB: automatically enable wakeup for PCI host controllers
> 
>     Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> 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?

> 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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] ` <200901080949.34339.oliver@neukum.org>
@ 2009-01-08 16:36   ` Rafael J. Wysocki
       [not found]   ` <200901081736.12926.rjw@sisk.pl>
  1 sibling, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-08 16:36 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Greg KH, LKML, Pavel Machek, Andrew Morton, Linus Torvalds,
	pm list

On Thursday 08 January 2009, Oliver Neukum wrote:
> Am Thursday 08 January 2009 08:35:39 schrieb Rafael J. Wysocki:
> > Hi Alan,
> > 
> > Unfortunately, the following commit:
> > 
> > commit 6fd9086a518d4f14213a32fe6c9ac17fabebbc1e
> > Author: Alan Stern <stern@rowland.harvard.edu>
> > Date:   Wed Dec 17 17:20:38 2008 -0500
> > 
> >     USB: automatically enable wakeup for PCI host controllers
> > 
> >     Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> >     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > 
> > 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.

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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]   ` <200901081736.12926.rjw@sisk.pl>
@ 2009-01-08 16:48     ` Oliver Neukum
       [not found]     ` <200901081748.58962.oliver@neukum.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Oliver Neukum @ 2009-01-08 16:48 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Greg KH, LKML, Pavel Machek, Andrew Morton, Linus Torvalds,
	pm list

Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
> > 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?

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

Yes, sorry.

	Regards
		Oliver

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]     ` <200901081748.58962.oliver@neukum.org>
@ 2009-01-08 17:03       ` Rafael J. Wysocki
       [not found]       ` <200901081803.49632.rjw@sisk.pl>
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-08 17:03 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Greg KH, LKML, Pavel Machek, Andrew Morton, Linus Torvalds,
	pm list

On Thursday 08 January 2009, Oliver Neukum wrote:
> Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
> > > 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?

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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]       ` <200901081803.49632.rjw@sisk.pl>
@ 2009-01-08 18:55         ` Frans Pop
  2009-01-08 19:54           ` Rafael J. Wysocki
  2009-01-09 15:55           ` Alan Stern
  0 siblings, 2 replies; 17+ messages in thread
From: Frans Pop @ 2009-01-08 18:55 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: gregkh, linux-kernel, pavel, akpm, torvalds, linux-pm

Rafael J. Wysocki wrote:
> On Thursday 08 January 2009, Oliver Neukum wrote:
>> 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?
> 
> 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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
  2009-01-08 18:55         ` Frans Pop
@ 2009-01-08 19:54           ` Rafael J. Wysocki
  2009-01-09 15:55           ` Alan Stern
  1 sibling, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-08 19:54 UTC (permalink / raw)
  To: Frans Pop; +Cc: gregkh, linux-kernel, pavel, akpm, torvalds, linux-pm

On Thursday 08 January 2009, Frans Pop wrote:
> Rafael J. Wysocki wrote:
> > On Thursday 08 January 2009, Oliver Neukum wrote:
> >> 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?
> > 
> > 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

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?

> 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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]     ` <200901081748.58962.oliver@neukum.org>
  2009-01-08 17:03       ` Rafael J. Wysocki
       [not found]       ` <200901081803.49632.rjw@sisk.pl>
@ 2009-01-09 10:18       ` Pavel Machek
       [not found]       ` <20090109101840.GD3396@elf.ucw.cz>
  3 siblings, 0 replies; 17+ messages in thread
From: Pavel Machek @ 2009-01-09 10:18 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Greg KH, LKML, Andrew Morton, Linus Torvalds, pm list

On Thu 2009-01-08 17:48:57, Oliver Neukum wrote:
> Am Thursday 08 January 2009 17:36:12 schrieb Rafael J. Wysocki:
> > > 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?

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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]       ` <20090109101840.GD3396@elf.ucw.cz>
@ 2009-01-09 10:26         ` Oliver Neukum
       [not found]         ` <200901091126.57094.oliver@neukum.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Oliver Neukum @ 2009-01-09 10:26 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Greg KH, LKML, Andrew Morton, Linus Torvalds, pm list

Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:
> 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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found]         ` <200901091126.57094.oliver@neukum.org>
@ 2009-01-09 10:36           ` Pavel Machek
  0 siblings, 0 replies; 17+ messages in thread
From: Pavel Machek @ 2009-01-09 10:36 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Greg KH, LKML, Andrew Morton, Linus Torvalds, pm list

On Fri 2009-01-09 11:26:55, Oliver Neukum wrote:
> Am Friday 09 January 2009 11:18:41 schrieb Pavel Machek:
> > 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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
  2009-01-08 18:55         ` Frans Pop
  2009-01-08 19:54           ` Rafael J. Wysocki
@ 2009-01-09 15:55           ` Alan Stern
  1 sibling, 0 replies; 17+ messages in thread
From: Alan Stern @ 2009-01-09 15:55 UTC (permalink / raw)
  To: Frans Pop; +Cc: gregkh, linux-kernel, pavel, akpm, torvalds, linux-pm

On Thu, 8 Jan 2009, Frans Pop wrote:

> Rafael J. Wysocki wrote:
> > On Thursday 08 January 2009, Oliver Neukum wrote:
> >> 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?
> > 
> > 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.

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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] <Pine.LNX.4.44L0.0901091055050.10951-100000@netrider.rowland.org>
@ 2009-01-09 17:53 ` Rafael J. Wysocki
       [not found] ` <200901091853.42700.rjw@sisk.pl>
  1 sibling, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-09 17:53 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, pavel,
	linux-pm, torvalds, akpm

[CCing ACPI and Len)

On Friday 09 January 2009, Alan Stern wrote:
> On Thu, 8 Jan 2009, Frans Pop wrote:
> 
> > Rafael J. Wysocki wrote:
> > > On Thursday 08 January 2009, Oliver Neukum wrote:
> > >> 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?
> > > 
> > > 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.
> 
> 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.

Agreed.

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

> 	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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] ` <200901091853.42700.rjw@sisk.pl>
@ 2009-01-09 22:23   ` Pavel Machek
  2009-01-12 21:53   ` Alan Stern
  1 sibling, 0 replies; 17+ messages in thread
From: Pavel Machek @ 2009-01-09 22:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, akpm,
	torvalds, linux-pm

On Fri 2009-01-09 18:53:41, Rafael J. Wysocki wrote:
> [CCing ACPI and Len)
> 
> On Friday 09 January 2009, Alan Stern wrote:
> > On Thu, 8 Jan 2009, Frans Pop wrote:
> > 
> > > Rafael J. Wysocki wrote:
> > > > On Thursday 08 January 2009, Oliver Neukum wrote:
> > > >> 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?
> > > > 
> > > > 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.
> > 
> > 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.
> 
> Agreed.
> 
> > 	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.

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

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] ` <200901091853.42700.rjw@sisk.pl>
  2009-01-09 22:23   ` Pavel Machek
@ 2009-01-12 21:53   ` Alan Stern
  1 sibling, 0 replies; 17+ messages in thread
From: Alan Stern @ 2009-01-12 21:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, pavel,
	linux-pm, torvalds, akpm

On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:

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

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?

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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] <Pine.LNX.4.44L0.0901121649470.13021-100000@netrider.rowland.org>
@ 2009-01-12 22:53 ` Rafael J. Wysocki
  0 siblings, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-12 22:53 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, pavel,
	linux-pm, torvalds, akpm

On Monday 12 January 2009, Alan Stern wrote:
> On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> 
> > > 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.
> > 
> > > 	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.
> 
> 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.

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

Yes, it is.

Thanks,
Rafael

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] <200901122353.59887.rjw@sisk.pl>
@ 2009-01-13  3:10 ` Alan Stern
  0 siblings, 0 replies; 17+ messages in thread
From: Alan Stern @ 2009-01-13  3:10 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, pavel,
	linux-pm, torvalds, akpm

On Mon, 12 Jan 2009, Rafael J. Wysocki wrote:

> On Monday 12 January 2009, Alan Stern wrote:
> > On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> > 
> > > > 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.
> > > 
> > > > 	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.
> > 
> > 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.
> 
> > 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

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

* Re: [Regression] USB wakeup problem on Toshiba Portege R500
       [not found] <Pine.LNX.4.44L0.0901122207400.18052-100000@netrider.rowland.org>
@ 2009-01-13 11:13 ` Rafael J. Wysocki
  0 siblings, 0 replies; 17+ messages in thread
From: Rafael J. Wysocki @ 2009-01-13 11:13 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh, Frans Pop, linux-kernel, ACPI Devel Maling List, pavel,
	linux-pm, torvalds, akpm

On Tuesday 13 January 2009, Alan Stern wrote:
> On Mon, 12 Jan 2009, Rafael J. Wysocki wrote:
> 
> > On Monday 12 January 2009, Alan Stern wrote:
> > > On Fri, 9 Jan 2009, Rafael J. Wysocki wrote:
> > > 
> > > > > 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.
> > > > 
> > > > > 	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.
> > > 
> > > 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.
> > 
> > > 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.

Great, thanks a lot!

Rafael

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

end of thread, other threads:[~2009-01-13 11:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200901080835.39639.rjw@sisk.pl>
2009-01-08  8:49 ` [Regression] USB wakeup problem on Toshiba Portege R500 Oliver Neukum
     [not found] ` <200901080949.34339.oliver@neukum.org>
2009-01-08 16:36   ` Rafael J. Wysocki
     [not found]   ` <200901081736.12926.rjw@sisk.pl>
2009-01-08 16:48     ` Oliver Neukum
     [not found]     ` <200901081748.58962.oliver@neukum.org>
2009-01-08 17:03       ` Rafael J. Wysocki
     [not found]       ` <200901081803.49632.rjw@sisk.pl>
2009-01-08 18:55         ` Frans Pop
2009-01-08 19:54           ` Rafael J. Wysocki
2009-01-09 15:55           ` Alan Stern
2009-01-09 10:18       ` Pavel Machek
     [not found]       ` <20090109101840.GD3396@elf.ucw.cz>
2009-01-09 10:26         ` Oliver Neukum
     [not found]         ` <200901091126.57094.oliver@neukum.org>
2009-01-09 10:36           ` Pavel Machek
     [not found] <Pine.LNX.4.44L0.0901122207400.18052-100000@netrider.rowland.org>
2009-01-13 11:13 ` Rafael J. Wysocki
     [not found] <200901122353.59887.rjw@sisk.pl>
2009-01-13  3:10 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0901121649470.13021-100000@netrider.rowland.org>
2009-01-12 22:53 ` Rafael J. Wysocki
     [not found] <Pine.LNX.4.44L0.0901091055050.10951-100000@netrider.rowland.org>
2009-01-09 17:53 ` Rafael J. Wysocki
     [not found] ` <200901091853.42700.rjw@sisk.pl>
2009-01-09 22:23   ` Pavel Machek
2009-01-12 21:53   ` Alan Stern
2009-01-08  7:35 Rafael J. Wysocki

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