All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lwe@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Len Brown <lenb@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [REGRESSION/PATCH] acpi: blacklist win8 OSI for ASUS Zenbok Prime UX31A
Date: Wed, 31 Jul 2013 09:59:54 +0800	[thread overview]
Message-ID: <51F86F9A.4090104@gmail.com> (raw)
In-Reply-To: <CAMP44s02V_FO1BPJZqo6MB9RMknXYdV7AXDqbJzYHpgK1GUuJw@mail.gmail.com>

On 07/31/2013 04:59 AM, Felipe Contreras wrote:
> On Tue, Jul 30, 2013 at 8:42 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>> On Tuesday, July 30, 2013 01:57:55 PM Aaron Lu wrote:
>>> On 07/30/2013 01:51 PM, Aaron Lu wrote:
>>>> On 07/30/2013 11:44 AM, Felipe Contreras wrote:
>>>>> On Mon, Jul 29, 2013 at 10:11 PM, Aaron Lu <aaron.lwe@gmail.com> wrote:
>>>>>> On 07/30/2013 03:20 AM, Felipe Contreras wrote:
>>>>>>> Since v3.7 the acpi backlight driver doesn't work at all on this machine
>>>>>>> because presumably the ACPI code contains stub code when Windows 8 OSI is
>>>>>>> reported.
>>>>>>>
>>>>>>> The commit ea45ea7 (in v3.11-rc2) tried to fix this problem by using the intel
>>>>>>> backlight driver, however, on this machine it turns the backlight completely
>>>>>>> off when it reaches level 0%, after which the user might have a lot trouble
>>>>>>> trying to bring it back.
>>>>>>
>>>>>> What do you mean by a lot of trouble? If you press hotkey to increase
>>>>>> backlight brightness level, does it work?
>>>>>
>>>>> I guess so, *if* there is indeed a user-space power manager handling
>>>>> that, *and* the keyboard has such keys, *or* the user has set custom
>>>>> hotkeys.
>>>>
>>>> Right, for a GUI environment this may not be a big problem(user uses Fn
>>>> key to decrease brightness level and then hit the black screen, it's
>>>> natural he will use Fn key to increase brightness level).
>>>>
>>>>>
>>>>>> If so, the screen should not
>>>>>> be black any more, it's not that user has to blindly enter some command
>>>>>> to get out of the black screen.
>>>>>>
>>>>>> And I'm not sure if this is a bug of intel_backlight(setting a low level
>>>>>> makes the screen almost off), I see different models with different
>>>>>> vendors having this behavior.
>>>>>
>>>>> I mean, the screen is completely off, I cannot see absolutely
>>>>> anything. I don't see this behavior with the ACPI backlight driver,
>>>>> nor do I see that in Windows 7.
>>>>>
>>>>>> If this is deemed a bug, then I'm afraid
>>>>>> intel_backlight interface is useless for a lot of systems...perhaps we
>>>>>> can only say, intel_backlight's interpretation of low levels are
>>>>>> different with ACPI video's, and that's probably why its type is named
>>>>>> as raw :-)
>>>>>
>>>>> Well, a bug is defined as unexpected behavior -- as a user, if I'm
>>>>> changing the brightness of the screen, I certainly don't expect the
>>>>> screen to turn off, and I think that's the expectation from most
>>>>> people. It's the first time I see something like that.
>>>>
>>>> I agree this is kind of un-expected. At the same time, this seems to be
>>>> the normal behavior for intel_backlight. I don't know what the correct
>>>> thing to do here if this is something we want to avoid - modify intel
>>>> backlight handling code not to set too low value or change the user
>>>> space tool not to set a too low value if they are interacting with a
>>>> raw type interface. Neither of them sounds cool... Or, users may get
>>>> used to it, I for example, don't find this to be very annoying, but
>>>> maybe I'm already used to it.
>>>
>>> BTW, for the complete screen off problem, I don't see there is anything
>>> wrong with it from code's point of view. It's not that there is an error
>>> in code or this is a broken hardware that caused the screen off when
>>> setting a very low or 0 brightness level, it is simply the expected
>>> behavior of what this interface can provide. It can really set the
>>> brightness level to minimum(zero) or maximum. Don't get me wrong, I
>>> didn't mean this is a good user experience, I don't know that. I just
>>> don't think this is a program bug, and I don't know if this should be
>>> fixed or not - obviously this interface did what it is asked to do,
>>> correctly.
>>
>> Precisely, user space asks for 0 and the kernel delivers.
>>
>> And there are reasons why 0 should be "screen off", like power management
>> (when you have a policy to dim the screen completely after a period of
>> inactivity, for example).
> 
> There is another interface the turn the screen off.
> 
> If 0 turns the screen off with the intel driver, 0 should turn the
> screen off with the ACPI driver, having inconsistent behavior
> depending on which driver is used is a bug.

I'm not sure of this. Remember the days when we switch the hard disk
driver from IDE to SCSI? The block device name changed from hdx to sdx.
Is this a bug?

> 
> If 0 did not turn off the screen in v3.10, 0 should not turn off the
> screen in v3.11, to do so would be a *regression*.

That depends on how you see it. I believe 0 also turns off the screen in
v3.10 if we are talking about the same driver(intel_backlight).

-Aaron

> 
>> So in my opinion, if that's a problem for anyone, it has to be addressed in
>> user space and if there are any vendors who try to address *that* in their ACPI
>> tables, that's one more reason to avoid using ACPI for backlight control.
> 
> If you think it's the user-space responsibility to deal with kernel
> bugs, I think it's only a matter of time before you receive one of
> these [1].
> 
> "If a change results in user programs breaking, it's a bug in the
> kernel. We never EVER blame the user programs. How hard can this be to
> understand?"
> 
> "WE DO NOT BREAK USERSPACE!"
> 
> [1] https://lkml.org/lkml/2012/12/23/75
> 


  parent reply	other threads:[~2013-07-31  1:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 19:20 [REGRESSION/PATCH] acpi: blacklist win8 OSI for ASUS Zenbok Prime UX31A Felipe Contreras
2013-07-29 20:17 ` Rafael J. Wysocki
2013-07-29 20:22   ` Felipe Contreras
2013-07-29 20:47     ` Rafael J. Wysocki
2013-07-29 21:04       ` Felipe Contreras
2013-07-30  3:11 ` Aaron Lu
2013-07-30  3:44   ` Felipe Contreras
2013-07-30  5:51     ` Aaron Lu
2013-07-30  5:57       ` Aaron Lu
2013-07-30 13:42         ` Rafael J. Wysocki
2013-07-30 20:59           ` Felipe Contreras
2013-07-30 23:13             ` Rafael J. Wysocki
2013-07-31  0:11               ` Felipe Contreras
2013-07-31  1:36                 ` Aaron Lu
2013-07-31  2:07                   ` Felipe Contreras
2013-07-31  2:22                     ` Aaron Lu
2013-08-01 18:50                       ` Felipe Contreras
2013-07-31  5:14                 ` Matthew Garrett
2013-07-31 11:32                   ` Felipe Contreras
2013-07-31 14:00                     ` Matthew Garrett
2013-07-31 17:46                       ` Felipe Contreras
2013-07-31 17:52                         ` Matthew Garrett
2013-07-31 18:07                           ` Felipe Contreras
2013-07-31 18:47                             ` Matthew Garrett
2013-08-01 17:37                               ` Felipe Contreras
2013-08-01 17:42                                 ` Matthew Garrett
2013-08-01 17:50                                   ` Felipe Contreras
2013-08-01 18:01                                     ` Matthew Garrett
2013-08-01 18:11                                       ` Felipe Contreras
2013-08-01 23:40                 ` Felipe Contreras
2013-07-31  1:59             ` Aaron Lu [this message]
2013-07-31  2:09               ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2013-10-20 22:16 Vincent Blut
2013-10-21  1:53 ` Aaron Lu
2013-10-21 21:21   ` Vincent Blut
2013-10-22  2:16     ` Aaron Lu
2013-10-22  2:12 ` Felipe Contreras
2013-10-23 15:31   ` Matthew Garrett
2013-10-23 19:39     ` Felipe Contreras
2013-10-24  0:53       ` Matthew Garrett

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=51F86F9A.4090104@gmail.com \
    --to=aaron.lwe@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.