linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* suspend / hibernate nomenclature
@ 2009-03-02 11:13 Richard Hughes
  2009-03-02 11:24 ` Henrique de Moraes Holschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 40+ messages in thread
From: Richard Hughes @ 2009-03-02 11:13 UTC (permalink / raw)
  To: linux-acpi; +Cc: Peter Hutterer, mjg, linux-input, Matthias Clasen

In the last couple of years, I've been striving to make consistent the
mapping of sleep states consistent. I don't care what we call things in
a UI, but we need to make sure we're not arguing about whether:

KEY_SUSPEND should be mapped to XF86Standby, XF86Hibernate or XF86Sleep
KEY_SLEEP should be mapped to XF86Hibernate or XF86Standby

You see it's a mess.

In userspace we've agreed with the following nomenclature:

standby = sleep CPU and devices (not really used any more)
suspend = sleep to memory (quite fast)
hibernate = sleep to disk (slow)
hybrid = sleep to both (slow, but fast resume)

In X, and evdev we've also fixed the mapping, so that:

XF86Sleep : suspend _or_ hibernate (configured in session policy)
XF86Suspend: suspend
XF86Hibernate: hibernate

This means that if a key on a keyboard can be sleep (but the user can
choose which), the application handles XF86Sleep. If the button decal is
marked with a disk, or the ram symbol, then we choose XF86Hibernate or
XF86Suspend as appropriate.

We've changed this in HAL a few years ago, xproto, libX11 and
xkeyboard-config last year, and nearly all of the session software in
use uses the same nomenclature for the last few years.

After reviewing the platform drivers in ACPI, it appears few of them
know whether KEY_SLEEP corresponds to suspend or hibernate, and
KEY_SUSPEND seems to be used for hibernate. Basically, it's a mess.

I propose that we add a KEY_HIBERNATE (key 247), and then we can just
do:

KEY_HIBERNATE -> XF86Hibernate -> sleep to disk
KEY_SUSPEND   -> XF86Suspend   -> sleep to ram
KEY_SLEEP     -> XF86Sleep     -> sleep (configurable)

Then the drivers can be patched so everyone is doing the same thing. At
the moment I'm diagnosing bugs and trying to work around the brokenness
in userspace hal-info every few days, and it's getting tiresome.

Feedback welcome, although please don't comment on things like "suspend
sounds more like a suspend to disk" as we spent years talking with
userspace people working for a compromise, and this is what we've
settled on. It's not to everyones taste, but we _do_ need to agree on
something, even if its just an agreed bodge.

Would patches be accepted to fix this?

Thanks,

Richard Hughes.



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

end of thread, other threads:[~2009-08-28  0:34 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 11:13 suspend / hibernate nomenclature Richard Hughes
2009-03-02 11:24 ` Henrique de Moraes Holschuh
2009-03-02 12:11   ` Richard Hughes
2009-03-03 17:20     ` [patch] add KEY_HIBERNATE and clarify the uses of KEY_SUSPEND and KEY_SLEEP Richard Hughes
2009-03-03 19:53       ` Rafael J. Wysocki
2009-03-04  8:42         ` Dmitry Torokhov
2009-03-04 10:54   ` [PATCH] thinkpad-acpi: use correct key names for sleep states in driver Richard Hughes
2009-03-04 10:58     ` [PATCH] panasonic-laptop: " Richard Hughes
2009-03-04 23:58       ` Harald Welte
2009-03-05  9:09         ` Richard Hughes
2009-03-04 11:09     ` [PATCH] DVB-USB: correct the comment about KEY_SLEEP Richard Hughes
2009-03-10 10:31       ` Antti Palosaari
2009-03-04 12:04     ` [PATCH] thinkpad-acpi: use correct key names for sleep states in driver Henrique de Moraes Holschuh
2009-08-18 20:02       ` Yves-Alexis Perez
2009-08-18 20:10         ` Matthew Garrett
2009-08-18 20:27           ` Yves-Alexis Perez
2009-08-18 20:45             ` Matthew Garrett
2009-08-22 18:02               ` Henrique de Moraes Holschuh
2009-08-19  9:18             ` Ali Abdallah
2009-08-26 11:36           ` Yves-Alexis Perez
2009-08-26 13:43             ` Matthew Garrett
2009-08-26 17:52               ` Yves-Alexis Perez
2009-08-26 22:51                 ` Henrique de Moraes Holschuh
2009-08-27  6:18                   ` Dmitry Torokhov
2009-08-28  0:34                     ` Henrique de Moraes Holschuh
2009-03-07  8:37 ` suspend / hibernate nomenclature Andrey Borzenkov
2009-03-07 15:48 ` Matthew Garrett
2009-03-07 16:41   ` Henrique de Moraes Holschuh
2009-03-07 16:48     ` Matthew Garrett
2009-03-07 17:17       ` Henrique de Moraes Holschuh
2009-03-07 20:25       ` Richard Hughes
2009-03-07 20:39         ` Matthew Garrett
2009-03-08  8:45           ` Richard Hughes
2009-03-08 14:41             ` Matthew Garrett
2009-03-08 20:56               ` Rafael J. Wysocki
2009-03-08 23:07                 ` Dmitry Torokhov
2009-03-08 23:19                   ` Matthew Garrett
2009-03-09 13:52                     ` Ville Syrjälä
2009-03-09 14:00                       ` Matthew Garrett
2009-03-09 15:10                         ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).