[ltp] Head's up: KEY_SLEEP/SUSPEND/HIBERNATE changes

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Wed, 4 Mar 2009 22:32:43 -0300


On Wed, 04 Mar 2009, Chris Schumann wrote:
> Henrique de Moraes Holschuh wrote:
>> It has been defined by the core userspace UI people (X.org, HAL,
>> desktop.org, etc) that:
>>
>> KEY_SLEEP - Maps to any of the sleep modes, by asking the user what
>> should be done.  Used when the platform doesn't have a preference for
>> that key (e.g. moon icon on normal keyboards).
>>
>> KEY_SUSPEND - Sleep to RAM  (thinkpad fn+f4)
>
> The ThinkPad F4 button has a moon on it, as I'm sure you know. Would  
> anything on a ThinkPad then generate KEY_SLEEP?

It has a moon, but its UI function is sleep-to-ram by contrast with
fn+f12, which is sleep to disk.   If the thinkpad didn't have fn+f12,
fn+f4 would probably remain as KEY_SLEEP.  That's why I said "normal
keyboards", those don't have anything like the fn+f12 icon.

So, nothing will generate KEY_SLEEP (by default) in a thinkpad, unless
you plug some sort of external keyboard in it.

>> KEY_HIBERNATE (new) - Sleep to disk, or RediSafe (disk+ram).
>> (thinkpad fn+f12).
>
> ThinkPad configuration puts their version of RediSafe under suspend.  
> Hibernate to me means the machine should shut off. I haven't followed  
> the story so far, but this seems like a big change.

It is not a big change, it is just being standardized to what X.org
and HAL want.  In fact, it is being done to *avoid* fn+f12 doing
suspend-to-ram by default :)

As for Redisafe, I see your point.  Still, thinkpad-acpi doesn't care
if Redisafe is done in suspend or hibernation, since there is
absolutely no difference from thinkpad-acpi's PoV... so it depends on
whatever userspace has been configured to do.

BTW, the userspace people call that "hybrid sleep".

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