linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Ben Jencks <ben@bjencks.net>, Seth Forshee <seth.forshee@canonical.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	Len Brown <lenb@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-acpi@vger.kernel.org, joeyli <jlee@suse.com>
Subject: Re: [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads
Date: Tue, 02 Apr 2013 17:15:03 +0800	[thread overview]
Message-ID: <515AA197.7020601@intel.com> (raw)
In-Reply-To: <515A6A10.70404@bjencks.net>

On 04/02/2013 01:18 PM, Ben Jencks wrote:
> On 03/18/2013 05:25 PM, Seth Forshee wrote:
>> On Thu, Mar 07, 2013 at 01:38:12PM -0600, Seth Forshee wrote:
>>> On Wed, Feb 13, 2013 at 08:55:58PM +0000, Matthew Garrett wrote:
>>>> On Wed, Feb 13, 2013 at 02:32:28PM -0600, Seth Forshee wrote:
>>>>> On Mon, Feb 11, 2013 at 07:09:14PM +0000, Matthew Garrett wrote:
>>>>>> Right. My concern here is that Windows clearly doesn't trigger the 
>>>>>> issue, and so there's some chance that we'll see similar issues on other 
>>>>>> machines. Disabling Windows 8 compatibility isn't really an option. One 
>>>>>> choice might be to have the ACPI video driver set all intermediate 
>>>>>> values if the system makes the Windows 8 OSI call?
>>>>>
>>>>> This turns out to have some problems. The hotkeys on the x230 at least
>>>>> generate increase/decrease brightness notifications. In response
>>>>> acpi_video reads the current brightness level via _BQC and decides what
>>>>> the next value should be. A value adjacent to a working value is never
>>>>> another working value on this machine, so _BCM does nothing. The next
>>>>> time a notification comes _BQC returns the same value as it did the
>>>>> previous time. Obviously this gets us nowhere.
>>>>
>>>> Nrgh. Having this logic in the kernel has always been miserable. On the 
>>>> other hand, having _BQC return wrong values is arguably even worse.
>>>>
>>>>> The (untested) fix I've come up with is to use the cached value for the
>>>>> current brightness rather than asking the firmware. I'm assuming though
>>>>> that acpi_video would be using the cached values already if there wasn't
>>>>> a chance that their changing without its knowledge?
>>>>
>>>> Yeah. What I'd suggest here is calling _BQC after every change, and if 
>>>> it returns the old value throw a firmware bug message and fall back to 
>>>> using a cached one.
>>>>
>>>>> The other issue with using the cached value is that the hotkeys on these
>>>>> machines are still going to end up cycling through 101 brightness levels
>>>>> with 85% of them leaving the brightness unchanged. When there's that
>>>>> many levels though maybe it makes sense to jump more than one level at a
>>>>> time.
>>>>
>>>> Right. I'd recommend turning off that functionality and just leaving it 
>>>> up to userspace. We still seem to be carrying a patch to do that in 
>>>> Fedora. I thought I had a patch to make this a config option somewhere, 
>>>> but can't find any sign of it now...
>>>
>>> I've had the patches implementing your suggestions written for a while
>>> now but just got test feedback this week. So here they are.
>>
>> Ping.
>>
>> Matthew, do these patches look like what you had in mind?
> 
> Finally got a chance to try these patches out. It seems to perform as
> expected, exposing levels 0-100 and actually allowing proper changes
> between them. It's not optimal, though.
> 
> Using the up/down keys with gnome-settings-daemon, which uses 20 steps,
> several steps don't actually change the brightness (including the very
> first one, 100->95). Additionally, the changes are asymmetric: going
> down, the brightness changes at 95->90, but going up 90->95 has no
> change, and 95->100 changes it.
> 
> As a user, I'd definitely consider this a regression compared to the
> "!Windows 2012" behavior. If you can't remove that OSI or override the
> _BCL list as a machine-specific quirk, this is probably the best generic
> behavior possible, though.

Perhaps we can introduce a _BCM quirk function, with a DMI table for
these systems. On boot/load, the callback of the dmi entry would to
evaluate for which values _BCM has effect by checking with _BQC, and
re-construct the _BCL table according to this.

This has the benefit of not affecting other systems, while also derive
the correct table for _BCL for these broken systems.

I saw you guys have talked about this idea in this thread, so I wonder
if this is a viable solution?

Thanks,
Aaron

> 
> -Ben
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2013-04-02  9:13 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 16:21 [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-02-11 17:52 ` Matthew Garrett
2013-02-11 19:06   ` Seth Forshee
2013-02-11 19:09     ` Matthew Garrett
2013-02-11 19:31       ` Rafael J. Wysocki
2013-02-12  3:05         ` Seth Forshee
2013-02-13 20:32       ` Seth Forshee
2013-02-13 20:55         ` Matthew Garrett
2013-02-13 21:04           ` Ben Jencks
2013-02-13 21:49             ` Seth Forshee
2013-02-13 21:46           ` Seth Forshee
2013-02-13 21:54             ` Matthew Garrett
2013-02-13 22:04               ` Seth Forshee
2013-03-07 19:38           ` Seth Forshee
2013-03-07 19:39             ` [PATCH 1/5] ACPICA: Add interface for getting latest Windows version requested via _OSI Seth Forshee
2013-03-07 19:39               ` [PATCH 2/5] acpi_video: Avoid unnecessary conversions between backlight levels and indexes Seth Forshee
2013-03-07 19:39               ` [PATCH 3/5] acpi_video: Add workaround for broken Windows 8 backlight implementations Seth Forshee
2013-04-04 11:44                 ` Aaron Lu
2013-04-04 12:35                   ` Seth Forshee
2013-04-04 13:46                     ` Aaron Lu
2013-04-04 14:02                       ` Seth Forshee
2013-04-04 14:27                         ` Aaron Lu
2013-03-07 19:39               ` [PATCH 4/5] acpi_video: Disable use of _BQC when value doesn't match those set through _BCM Seth Forshee
2013-03-07 19:39               ` [PATCH 5/5] acpi_video: Don't handle ACPI brightness notifications by default Seth Forshee
2013-08-02  5:55                 ` Aaron Lu
2013-08-02 14:41                   ` Rafael J. Wysocki
2013-08-02 14:52                     ` Aaron Lu
2013-08-03  0:26                       ` Rafael J. Wysocki
2013-08-03  9:46                         ` Aaron Lu
2013-08-03 11:23                           ` Rafael J. Wysocki
2013-08-03 12:10                             ` Aaron Lu
2013-08-03 22:07                               ` Rafael J. Wysocki
2013-08-04  1:08                                 ` Aaron Lu
2013-03-18 21:25             ` [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-04-02  5:18               ` Ben Jencks
2013-04-02  9:15                 ` Aaron Lu [this message]
2013-04-02 11:23                   ` Matthew Garrett
2013-04-02 13:44                     ` Aaron Lu
2013-04-02 19:08                       ` Matthew Garrett
2013-04-19 12:24               ` Seth Forshee
2013-04-20 22:06                 ` Rafael J. Wysocki
2013-04-21  2:29                   ` Seth Forshee
2013-04-21 15:46                     ` Henrique de Moraes Holschuh
2013-02-13 21:09       ` Ben Jencks
2013-04-01  1:53 ` Aaron Lu
2013-04-01 13:03   ` Seth Forshee
2013-04-02  9:08     ` Aaron Lu
2013-04-02 13:00       ` Seth Forshee
2013-04-02 13:43         ` Aaron Lu
2013-04-03  7:04         ` Ben Jencks
2013-04-03  7:27           ` Aaron Lu
2013-04-03 13:45             ` Seth Forshee
2013-04-04 11:39               ` Aaron Lu
2013-04-19  3:15           ` Aaron Lu
2013-04-20 22:06             ` Rafael J. Wysocki
2013-04-21 11:07               ` Aaron Lu
2013-04-21 12:11                 ` Aaron Lu
2013-04-21 21:42                 ` Rafael J. Wysocki
2013-04-22  9:39                   ` Aaron Lu
2013-04-22 11:51                     ` Rafael J. Wysocki
2013-04-22 12:11                       ` Aaron Lu
2013-04-22 13:06                         ` Seth Forshee
2013-04-22 13:40                           ` Aaron Lu
2013-04-22 13:56                             ` Seth Forshee
2013-04-22 14:07                               ` Aaron Lu
2013-04-22 15:11                                 ` Seth Forshee
2013-04-22  2:18             ` joeyli
2013-04-22 10:08               ` Aaron Lu
2013-04-22 12:00                 ` joeyli

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=515AA197.7020601@intel.com \
    --to=aaron.lu@intel.com \
    --cc=ben@bjencks.net \
    --cc=jlee@suse.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@sisk.pl \
    --cc=seth.forshee@canonical.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).