public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Richard Hughes <hughsient@gmail.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	hal@lists.freedesktop.org
Subject: Re: [PATCH] toshiba_acpi: Add full hotkey support
Date: Sun, 8 Mar 2009 14:36:36 +0000	[thread overview]
Message-ID: <20090308143636.GA26233@srcf.ucam.org> (raw)
In-Reply-To: <15e53e180903080033h5e990f08o3622afae018c38ca@mail.gmail.com>

On Sun, Mar 08, 2009 at 08:33:48AM +0000, Richard Hughes wrote:
> On Sat, Mar 7, 2009 at 8:26 PM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > Mapping KEY_SUSPEND to hibernate is what we've been doing for years.
> > It's what hal *still does*.
> 
> Sure, but how much userspace now listens to HAL for these events? Xorg
> and evdev has taken over that role for all the session. We can ship a
> trivial patch as an fdi file to HAL to remap this if required.

I've no idea. But I lean towards not gratuitously breaking it for no 
reason other than aesthetics.

> > KEY_SLEEP has been the suspend to RAM key forever.
> 
> Except if you're a USB keyboard. Grep through the kernel sources and
> see how many drivers get this wrong. We can't map three sleep states
> to two buttons in any sane way. For instance, is the sleep acpi button
> supposed to trigger a suspend of hibernate? Surely this is user policy
> as it is not specified on the the exterior of the machine.

We do it the same way we've previously done it (and the same way it 
works outside the Linux world) - the "suspend to RAM" key has 
configurable behaviour. As far as I can tell, the USB driver does the 
right thing here?

> > How are we supposed to perform this transition? We've no idea
> > how much of userspace makes the same assumption.
> 
> FWIW, I think emitting KEY_ events (not switch events) in HAL is crazy
> as now we can just use the fixed Xorg in the session. FWIW, HAL gets
> other keys wrong too, for instance KEY_BATTERY is mapped to
> display_off, but nobody has noticed as we've been using Xorg since
> ages.

I'm happy with obvious bugs being fixed, but this isn't an obvious bug - 
it's purely an aesthetic issue. We don't need to draw a distinction 
between generic sleep and suspend to RAM keys, especially if the cost of 
doing so is having to fix up an undefined quantity of userspace.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  parent reply	other threads:[~2009-03-08 14:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06  0:39 [PATCH] toshiba_acpi: Add full hotkey support Matthew Garrett
2009-03-06  0:52 ` Matthew Garrett
2009-03-06  9:08   ` Richard Hughes
2009-03-06  9:47     ` Daniel Silverstone
2009-03-06  9:56       ` Matthew Garrett
2009-03-06 10:04         ` Daniel Silverstone
2009-03-06 10:09           ` Matthew Garrett
2009-03-06 10:12             ` Daniel Silverstone
2009-03-06 10:15               ` Matthew Garrett
2009-03-06 10:21                 ` Daniel Silverstone
2009-03-06 18:49                   ` Andrey Borzenkov
2009-03-06 18:53                     ` Matthew Garrett
2009-03-06 18:37   ` Andrey Borzenkov
2009-03-06 18:44     ` Matthew Garrett
2009-03-06 18:57       ` Andrey Borzenkov
2009-03-07  7:27   ` Andrey Borzenkov
2009-03-07 15:06     ` Matthew Garrett
2009-03-07 15:38       ` Andrey Borzenkov
2009-03-07 15:44         ` Matthew Garrett
2009-03-07 20:19           ` Richard Hughes
2009-03-07 20:26             ` Matthew Garrett
2009-03-08  8:33               ` Richard Hughes
2009-03-08 14:29                 ` Andrey Borzenkov
2009-03-08 14:36                 ` Matthew Garrett [this message]
2009-03-09 17:11                 ` Len Brown

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=20090308143636.GA26233@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=arvidjaar@mail.ru \
    --cc=hal@lists.freedesktop.org \
    --cc=hughsient@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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