public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Generic events for wake up from S1-S4
       [not found]   ` <20090723201050.GD19369@khazad-dum.debian.net>
@ 2009-07-23 21:27     ` Rafael J. Wysocki
       [not found]     ` <200907232328.03566.rjw@sisk.pl>
  1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2009-07-23 21:27 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Luis R. Rodriguez, ACPI Devel Maling List, Jouni Malinen,
	linux-wireless, linux-kernel, John W. Linville, Stephen Chen,
	Johannes Berg, pm list

On Thursday 23 July 2009, Henrique de Moraes Holschuh wrote:
> On Thu, 23 Jul 2009, Pavel Machek wrote:
> > On Thu 2009-07-23 16:45:22, Henrique de Moraes Holschuh wrote:
> > > On Thu, 23 Jul 2009, Pavel Machek wrote:
> > > > > > Note that the "why" is unreliable by design. Network driver will
> > > > > > ignore WoL during run-time, right?
> > > > > 
> > > > > "Why" is unrealible?  I don't follow your reasoning.  It should be as
> > > > > reliable as "who"...
> > > > 
> > > > See above. The wakeup events race with each other.
> > > 
> > > We deliver them all.  It is that simple.  The rest is up to userspace.
> > 
> > Ok, but then we should not be talking about wake up events,
> > but... events.
> > 
> > Like "lid opened", "wake packet came", ... . And deliver them even
> > when they happen during run-time. That's okay with me.
> 
> Well, we *already* deliver "lid opened" when the lid is opened, regardless
> of it waking up the computer or not.  But we are missing a way to deliver
> other classes of wakeup events.
> 
> I know of at least these (incomplete list):
> 
> 1. network-initiated wakeup
>    a. wired
>    b. wireless
>    c. long-range wireless
> 
> 2. platform health/condition alarms
>    a. battery alarm (two levels, warning and emergency)
>    b. thermal alarm (two levels, warning and emergency)
>    (we need these as generic alarms, not just reason-for-wakeup)
> 
> 3. device (or device tree) hotplug/hotunplug
>    a. hotunplug request or notification
>       (we deliver the request/notification, but we don't know we should
>       go back to sleep, so all we are missing is the reason-for-wakeup
>       event)
> 
> 4. management
>    a. wake-up/power on clock
>    b. remote management command (IMPI, etc)
>    c. intrusion alarm
>    d. theft alarm
> 
> None of those have a standard interface to notify userspace of the reason of
> the wake up AFAIK.  Many of these want a generic event interface to be
> delivered not just as reason-for-wakeup, but also as runtime events.
> 
> And I guess we should also tell userspace what state we are waking up from
> (S5 clean state, S5/S4 hibernation, S3), sometimes it matters.

Agreed, and same for the above.

So, what in your opinion would be the best way to expose this information?

Rafael

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

* Re: Generic events for wake up from S1-S4
       [not found]     ` <200907232328.03566.rjw@sisk.pl>
@ 2009-07-24  0:53       ` ykzhao
       [not found]       ` <1248396826.3556.26.camel@localhost.localdomain>
  1 sibling, 0 replies; 6+ messages in thread
From: ykzhao @ 2009-07-24  0:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Luis R. Rodriguez, Henrique de Moraes Holschuh,
	ACPI Devel Maling List, Jouni Malinen, linux-wireless,
	John W. Linville, linux-kernel@vger.kernel.org, Stephen Chen,
	Johannes Berg, pm list

On Fri, 2009-07-24 at 05:27 +0800, Rafael J. Wysocki wrote:
> On Thursday 23 July 2009, Henrique de Moraes Holschuh wrote:
> > On Thu, 23 Jul 2009, Pavel Machek wrote:
> > > On Thu 2009-07-23 16:45:22, Henrique de Moraes Holschuh wrote:
> > > > On Thu, 23 Jul 2009, Pavel Machek wrote:
> > > > > > > Note that the "why" is unreliable by design. Network driver will
> > > > > > > ignore WoL during run-time, right?
> > > > > > 
> > > > > > "Why" is unrealible?  I don't follow your reasoning.  It should be as
> > > > > > reliable as "who"...
> > > > > 
> > > > > See above. The wakeup events race with each other.
> > > > 
> > > > We deliver them all.  It is that simple.  The rest is up to userspace.
> > > 
> > > Ok, but then we should not be talking about wake up events,
> > > but... events.
> > > 
> > > Like "lid opened", "wake packet came", ... . And deliver them even
> > > when they happen during run-time. That's okay with me.
> > 
> > Well, we *already* deliver "lid opened" when the lid is opened, regardless
> > of it waking up the computer or not.  But we are missing a way to deliver
> > other classes of wakeup events.
> > 
> > I know of at least these (incomplete list):
> > 
> > 1. network-initiated wakeup
> >    a. wired
> >    b. wireless
> >    c. long-range wireless
> > 
> > 2. platform health/condition alarms
> >    a. battery alarm (two levels, warning and emergency)
> >    b. thermal alarm (two levels, warning and emergency)
> >    (we need these as generic alarms, not just reason-for-wakeup)
> > 
> > 3. device (or device tree) hotplug/hotunplug
> >    a. hotunplug request or notification
> >       (we deliver the request/notification, but we don't know we should
> >       go back to sleep, so all we are missing is the reason-for-wakeup
> >       event)
> > 
> > 4. management
> >    a. wake-up/power on clock
> >    b. remote management command (IMPI, etc)
> >    c. intrusion alarm
> >    d. theft alarm
> > 
> > None of those have a standard interface to notify userspace of the reason of
> > the wake up AFAIK.  Many of these want a generic event interface to be
> > delivered not just as reason-for-wakeup, but also as runtime events.
> > 
> > And I guess we should also tell userspace what state we are waking up from
> > (S5 clean state, S5/S4 hibernation, S3), sometimes it matters.
> 
> Agreed, and same for the above.
> 
> So, what in your opinion would be the best way to expose this information?
Maybe we should firstly define what event should be delivered to user
space when it is resumed from S1--S4.

And another issue who is in charge of sending the event? By the specific
device or ACPI notification?

Thanks.
> 
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Generic events for wake up from S1-S4
       [not found]       ` <1248396826.3556.26.camel@localhost.localdomain>
@ 2009-07-24 13:39         ` Henrique de Moraes Holschuh
       [not found]         ` <20090724133903.GA18827@khazad-dum.debian.net>
  1 sibling, 0 replies; 6+ messages in thread
From: Henrique de Moraes Holschuh @ 2009-07-24 13:39 UTC (permalink / raw)
  To: ykzhao
  Cc: Luis R. Rodriguez, ACPI Devel Maling List, Jouni Malinen,
	linux-wireless, linux-kernel@vger.kernel.org, John W. Linville,
	Stephen Chen, Johannes Berg, pm list

On Fri, 24 Jul 2009, ykzhao wrote:
> > > Well, we *already* deliver "lid opened" when the lid is opened, regardless
> > > of it waking up the computer or not.  But we are missing a way to deliver
> > > other classes of wakeup events.
> > > 
> > > I know of at least these (incomplete list):
> > > 
> > > 1. network-initiated wakeup
> > >    a. wired
> > >    b. wireless
> > >    c. long-range wireless
> > > 
> > > 2. platform health/condition alarms
> > >    a. battery alarm (two levels, warning and emergency)
> > >    b. thermal alarm (two levels, warning and emergency)
> > >    (we need these as generic alarms, not just reason-for-wakeup)
> > > 
> > > 3. device (or device tree) hotplug/hotunplug
> > >    a. hotunplug request or notification
> > >       (we deliver the request/notification, but we don't know we should
> > >       go back to sleep, so all we are missing is the reason-for-wakeup
> > >       event)
> > > 
> > > 4. management
> > >    a. wake-up/power on clock
> > >    b. remote management command (IMPI, etc)
> > >    c. intrusion alarm
> > >    d. theft alarm
> > > 
> > > None of those have a standard interface to notify userspace of the reason of
> > > the wake up AFAIK.  Many of these want a generic event interface to be
> > > delivered not just as reason-for-wakeup, but also as runtime events.
> > > 
> > > And I guess we should also tell userspace what state we are waking up from
> > > (S5 clean state, S5/S4 hibernation, S3), sometimes it matters.
> > 
> > Agreed, and same for the above.
> > 
> > So, what in your opinion would be the best way to expose this information?

Frankly?  It needs to be an easy-to-extend ABI, and the only one that cames
to mind right now are uevents.

> Maybe we should firstly define what event should be delivered to user
> space when it is resumed from S1--S4.

Why not a change uevent (although we could always come up with a new uevent
type for this, and that might be a good idea)?

> And another issue who is in charge of sending the event? By the specific
> device or ACPI notification?

ACPI notifications are hard to extend, I think.  Please correct me if I am
wrong.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

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

* Re: Generic events for wake up from S1-S4
       [not found]         ` <20090724133903.GA18827@khazad-dum.debian.net>
@ 2009-07-24 14:49           ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2009-07-24 14:49 UTC (permalink / raw)
  To: Henrique de Moraes Holschuh
  Cc: Luis R. Rodriguez, ACPI Devel Maling List, Jouni Malinen,
	linux-wireless, linux-kernel@vger.kernel.org, John W. Linville,
	ykzhao, Stephen Chen, pm list


[-- Attachment #1.1: Type: text/plain, Size: 305 bytes --]

On Fri, 2009-07-24 at 10:39 -0300, Henrique de Moraes Holschuh wrote:

> ACPI notifications are hard to extend, I think.  Please correct me if I am
> wrong.

ACPI is the wrong place anyway, since it's fundamentally platform
dependent. Unlike the rest of suspend and wake functionality.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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



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

* Generic events for wake up from S1-S4
@ 2010-02-23 14:00 ori
  2010-02-23 19:52 ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: ori @ 2010-02-23 14:00 UTC (permalink / raw)
  To: linux-pm

Hi linux-pm experts.

We are working on a sleep solution for Linux server and therefore are 
very interested in this subject.
I have found an email thread with the subject above from July 2009.
Could you tell if any advance was done on this front ? any thoughts 
about how to implement the user events for wake up reasons ?

I have tried to find any resource about this subject but there is hardly 
anything out there.

Thanks in advance for any kind of an answer.
Best regards,
Ori

-- 
Ori Finkelman
ComSleep Ltd.

Cell:  +972-52-3832189
Tel:   +972-3-5366641 ext. 102
Fax:   +972-3-5366643
Email: ori@comsleep.com

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

* Re: Generic events for wake up from S1-S4
  2010-02-23 14:00 Generic events for wake up from S1-S4 ori
@ 2010-02-23 19:52 ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2010-02-23 19:52 UTC (permalink / raw)
  To: linux-pm, ori

On Tuesday 23 February 2010, ori wrote:
> Hi linux-pm experts.
> 
> We are working on a sleep solution for Linux server and therefore are 
> very interested in this subject.
> I have found an email thread with the subject above from July 2009.
> Could you tell if any advance was done on this front ? any thoughts 
> about how to implement the user events for wake up reasons ?
> 
> I have tried to find any resource about this subject but there is hardly 
> anything out there.

I'm not really sure what you mean by "generic events".  Can you please elaborate?

Rafael

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

end of thread, other threads:[~2010-02-23 19:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 14:00 Generic events for wake up from S1-S4 ori
2010-02-23 19:52 ` Rafael J. Wysocki
     [not found] <43e72e890907150851m69cd2de6lfb71596fbfac30e6@mail.gmail.com>
     [not found] ` <20090723195114.GR28158@elf.ucw.cz>
     [not found]   ` <20090723201050.GD19369@khazad-dum.debian.net>
2009-07-23 21:27     ` Rafael J. Wysocki
     [not found]     ` <200907232328.03566.rjw@sisk.pl>
2009-07-24  0:53       ` ykzhao
     [not found]       ` <1248396826.3556.26.camel@localhost.localdomain>
2009-07-24 13:39         ` Henrique de Moraes Holschuh
     [not found]         ` <20090724133903.GA18827@khazad-dum.debian.net>
2009-07-24 14:49           ` Johannes Berg

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