Linux Power Management development
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: Chirantan Ekbote <chirantan@chromium.org>,
	Olof Johansson <olof@lixom.net>,
	John Stultz <john.stultz@linaro.org>,
	Bastien Nocera <hadess@hadess.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	snanda@chromium.org, Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: A desktop environment[1] kernel wishlist
Date: Fri, 08 May 2015 09:09:28 +0200	[thread overview]
Message-ID: <554C6128.9060701@collabora.com> (raw)
In-Reply-To: <1563819.JLKVYTDD3B@vostro.rjw.lan>

On 05/07/2015 11:03 PM, Rafael J. Wysocki wrote:
> On Thursday, May 07, 2015 05:54:56 PM One Thousand Gnomes wrote:
>> On Tue, 05 May 2015 14:31:26 +0200
>>
>>> For example, when you wake up from S3 on ACPI-based systems, the best you
>>> can get is what devices have generated the wakeup events, but there's
>>> no input available from that (like you won't know which key has been
>>> pressed).  You may not get that even.  You may only know what GPEs have
>>> caused the wakeup to happen and they may be shared.
>>>
>>> For PCI wakeup, the wakeup event may be out of band.  You need to walk
>>> the hierarchy and check the PME status bits to identify the wakeup device
>>> and then you need to be careful enough not to reset it while putting into
>>> D0 for the input data associated with the event to be available.  I'm not
>>> sure how many device/driver combinations this actually works for.
>>>
>>> For USB wakeup, you get the wakeup event from the controller which may be
>>> a PCI device.  Getting to the USB device itself from there requires some
>>> work and even then the device may not "remember" what exactly happened.
>>>
>>> Further, if you wake up via the PC keyboard from suspend-to-idle, the
>>> wakeup key code is not available, the only thing you know is that the
>>> interrupts has occured (that may be changed, but it's how the current
>>> code works).
>>
>> It's probably got to change, otherwise once machines get able to sleep
>> between keypresses it's going to suck every time you pause and think for
>> a minute then begin typing. Remember display being off for suspend is
>> purely a limitation of most current display panels.
> 
> Right.
> 
> It is just one example, though.
> 
> Take a PCI device in D3hot for another one.  It may not even have a buffer
> to store input data while in that state.  The only thing it may be able to
> do is to signal a PME from it.

Yeah, I tried to make clear that I don't think that this is generally
achievable. But in the ChromeOS hardware that I have here, the input
event is there for userspace to read when it wakes up.

But if there's traction for adding upstream a more generic mechanism
that works in a broader range of machines, I'm all for it.

Regards,

Tomeu


      reply	other threads:[~2015-05-08  7:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1413881397.30379.7.camel@hadess.net>
     [not found] ` <CAOesGMg6UBuF=OJ-JdAUx-sD5MnLL8+Ag=xeJFmr-Dxezti2YA@mail.gmail.com>
     [not found]   ` <CAJFHJrp8R+Na73W2Jx6BJ+JnHTGZfd61d+EracgehS+ZQoZOcg@mail.gmail.com>
2015-05-04 22:12     ` A desktop environment[1] kernel wishlist Rafael J. Wysocki
2015-05-04 23:30       ` Chirantan Ekbote
2015-05-05 10:46         ` Bastien Nocera
2015-05-05 19:22           ` Chirantan Ekbote
2015-05-06 12:41             ` Bastien Nocera
2015-05-05 14:39         ` Alan Stern
2015-05-05 17:58           ` Chirantan Ekbote
2015-05-05 19:35             ` Alan Stern
2015-05-05 20:58               ` Chirantan Ekbote
2015-05-05 23:56                 ` Rafael J. Wysocki
2015-05-05 23:38                   ` David Lang
2015-05-05 23:51                     ` Rafael J. Wysocki
2015-05-07 17:03                 ` One Thousand Gnomes
2015-05-07 18:21                   ` Chirantan Ekbote
2015-05-05 23:47         ` Rafael J. Wysocki
2015-05-06 17:40           ` Chirantan Ekbote
2015-05-07 23:19             ` Rafael J. Wysocki
2015-05-11 22:12           ` Pavel Machek
2015-05-12  0:45             ` Rafael J. Wysocki
     [not found]     ` <CAAObsKDYV=Hyz0XcPkyD6=hu4WKk7PHGdSMOCZxbh_vMKHS32Q@mail.gmail.com>
2015-05-04 22:19       ` Rafael J. Wysocki
2015-05-05  6:05         ` Tomeu Vizoso
2015-05-05 12:31           ` Rafael J. Wysocki
2015-05-07 16:54             ` One Thousand Gnomes
2015-05-07 21:03               ` Rafael J. Wysocki
2015-05-08  7:09                 ` Tomeu Vizoso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554C6128.9060701@collabora.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=chirantan@chromium.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=hadess@hadess.net \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=rjw@rjwysocki.net \
    --cc=snanda@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox