linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Cc: edm <fuffi.il.fuffo@gmail.com>,
	Balint Szigeti <balint.szgt@gmail.com>,
	AnAkkk <anakin.cs@gmail.com>,
	lou.cardone@gmail.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 3/3] acpi-video: change acpi-video brightness_switch_enabled default to 0
Date: Tue, 06 May 2014 10:01:04 +0800	[thread overview]
Message-ID: <53684260.1050806@intel.com> (raw)
In-Reply-To: <1399282690-5381-3-git-send-email-hdegoede@redhat.com>

On 05/05/2014 05:38 PM, Hans de Goede wrote:
> acpi-video is unique in that it not only generates brightness up/down
> keypresses, but also (sometimes) actively changes the brightness itself.
> 
> This presents an inconsistent kernel interface to userspace, basically there
> are 2 different scenarios, depending on the laptop model:
> 
> 1) On some laptops a brightness up/down keypress means: show a brightness osd
> with the current brightness, iow it is a brightness has changed notification.
> 
> 2) Where as on (a lot of) other laptops it means a brightness up/down key was
> pressed, deal with it.
> 
> Most of the desktop environments interpret any press as in scenario 2, and
> change the brightness up / down as a response to the key events, causing it
> to be changed twice, once by acpi-video and once by the DE.
> 
> With the new default for video.use_native_backlight we will be moving even
> more laptops over to behaving as in scenario 2. Making the remaining laptops
> even more of a weird exception. Also note that it is hard to detect scenario
> 1 properly in userspace, and AFAIK none of the DE-s deals with it.
> 
> Therefor this commit changes the default of brightness_switch_enabled to 0
> making its behavior consistent with all the other backlight drivers.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Reviewed-by: Aaron Lu <aaron.lu@intel.com>

Note that the Documentation/kernel-parameters.txt has to be modified
accordingly to change the default value for video.brightness_switch_enabled
to 0.

Thanks,
Aaron

> ---
>  drivers/acpi/video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index cebc74d..34198b2 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -68,7 +68,7 @@ MODULE_AUTHOR("Bruno Ducrot");
>  MODULE_DESCRIPTION("ACPI Video Driver");
>  MODULE_LICENSE("GPL");
>  
> -static bool brightness_switch_enabled = 1;
> +static bool brightness_switch_enabled;
>  module_param(brightness_switch_enabled, bool, 0644);
>  
>  /*
> 


  reply	other threads:[~2014-05-06  2:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05  9:38 [PATCH 1/3] acpi-video: Add use_native_backlight quirks for ThinkPad T430, T530 and Acer Aspire 5742G Hans de Goede
2014-05-05  9:38 ` [PATCH 2/3] acpi-blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX Hans de Goede
2014-05-07 23:45   ` Rafael J. Wysocki
2014-05-05  9:38 ` [PATCH 3/3] acpi-video: change acpi-video brightness_switch_enabled default to 0 Hans de Goede
2014-05-06  2:01   ` Aaron Lu [this message]
2014-05-06 12:46     ` Hans de Goede
2014-05-07 23:45 ` [PATCH 1/3] acpi-video: Add use_native_backlight quirks for ThinkPad T430, T530 and Acer Aspire 5742G Rafael J. Wysocki

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=53684260.1050806@intel.com \
    --to=aaron.lu@intel.com \
    --cc=anakin.cs@gmail.com \
    --cc=balint.szgt@gmail.com \
    --cc=fuffi.il.fuffo@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lou.cardone@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).