2014-12-18 12:16:39

by Dmitry Tunin

[permalink] [raw]
Subject: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Add "acpi_osi=" quirk for ASUS X200MA
More information can be found in UX302LA bugreport
https://bugzilla.kernel.org/show_bug.cgi?id=70241

X200MA is affected by th e same bug and the solution has been tested

I reported it to launchpad too
https://bugs.launchpad.net/ubuntu/bug/1400068

Cc: [email protected]
Signed-off-by: Dmitry Tunin <[email protected]>

---
drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 7556e7c..f78ed08 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct dmi_system_id *d)
acpi_osi_setup("!Windows 2012");
return 0;
}
+/*
+ * Some ASUS models firmware declares 16 devices instead of 8
+ * 'acpi_osi=' kernel parameter fixes it
+ * Without this parameters brightness keys Fn+F5 and F6 do not work
+ */
+static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
+{
+ printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
+ acpi_osi_setup("");
+ return 0;
+}

static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
{
@@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
},
},
+ /* Without this brightness keys do not work */
+ {
+ .callback = dmi_disable_osi_all,
+ .ident = "ASUSTeK COMPUTER INC. X200MA",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
+ },
+ },
{}
};

--
1.9.1


2014-12-18 12:19:19

by Dmitry Tunin

[permalink] [raw]
Subject: [PATCH 2/2] acpi: Add "acpi_osi=" for ASUS UX302LA to enable, brightness keys

This patch is a workaround quirk to enable brightness keys.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=70241
Cc: [email protected]
Signed-off-by: Dmitry Tunin <[email protected]>

---
drivers/acpi/blacklist.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index f78ed08..a96295c 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -391,6 +391,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
},
},
+ {
+ .callback = dmi_disable_osi_all,
+ .ident = "ASUSTeK COMPUTER INC. UX302LA",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "UX302LA"),
+ },
+ },
{}
};

--
1.9.1

2014-12-18 13:25:44

by Josh Boyer

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

On Thu, Dec 18, 2014 at 7:16 AM, Dmitry Tunin <[email protected]> wrote:
> Add "acpi_osi=" quirk for ASUS X200MA
> More information can be found in UX302LA bugreport
> https://bugzilla.kernel.org/show_bug.cgi?id=70241
>
> X200MA is affected by th e same bug and the solution has been tested
>
> I reported it to launchpad too
> https://bugs.launchpad.net/ubuntu/bug/1400068
>
> Cc: [email protected]
> Signed-off-by: Dmitry Tunin <[email protected]>
>

The UX301LA models have the same setup, with 16 devices instead of 8.
I discussed this with Matthew Garrett a bit and a more ideal approach
is to actually enumerate all 16 devices between the firmware and i915
driver. The problem we have is that the intel opregion spec that
hasn't been updated since 2008 doesn't cover the additional 8 devices.
Anyway, that is being tracked here:

https://bugs.freedesktop.org/show_bug.cgi?id=81762

> ---
> drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
> index 7556e7c..f78ed08 100644
> --- a/drivers/acpi/blacklist.c
> +++ b/drivers/acpi/blacklist.c
> @@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct
> dmi_system_id *d)
> acpi_osi_setup("!Windows 2012");
> return 0;
> }
> +/*
> + * Some ASUS models firmware declares 16 devices instead of 8
> + * 'acpi_osi=' kernel parameter fixes it
> + * Without this parameters brightness keys Fn+F5 and F6 do not work
> + */
> +static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
> +{
> + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
> + acpi_osi_setup("");
> + return 0;
> +}

What does this do to the rest of the function keys? Does everything
else still work as expected, including suspend and resume?

> static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
> {
> @@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[]
> __initdata = {
> DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
> },
> },
> + /* Without this brightness keys do not work */
> + {
> + .callback = dmi_disable_osi_all,
> + .ident = "ASUSTeK COMPUTER INC. X200MA",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
> + },
> + },
> {}
> };
>
> --
> 1.9.1
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-12-18 13:28:08

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

On Thu, Dec 18, 2014 at 08:25:42AM -0500, Josh Boyer wrote:

> What does this do to the rest of the function keys? Does everything
> else still work as expected, including suspend and resume?

Disabling OSI completely certainly runs the risk of turning off things
like HPET. It certainly shouldn't be done without checking the ACPI
tables, and it really shouldn't be done at all because this is Intel's
bug and they should just fix it.

--
Matthew Garrett | [email protected]

2014-12-18 13:28:29

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Josh,

I agree, that a better approach is to implement opregion in a right way.
But it will take some time. In the meantime this kind of quirks solve the problem.
And it is quite safe.

18.12.2014 16:25, Josh Boyer пишет:
> On Thu, Dec 18, 2014 at 7:16 AM, Dmitry Tunin <[email protected]> wrote:
>> Add "acpi_osi=" quirk for ASUS X200MA
>> More information can be found in UX302LA bugreport
>> https://bugzilla.kernel.org/show_bug.cgi?id=70241
>>
>> X200MA is affected by th e same bug and the solution has been tested
>>
>> I reported it to launchpad too
>> https://bugs.launchpad.net/ubuntu/bug/1400068
>>
>> Cc: [email protected]
>> Signed-off-by: Dmitry Tunin <[email protected]>
>>
>
> The UX301LA models have the same setup, with 16 devices instead of 8.
> I discussed this with Matthew Garrett a bit and a more ideal approach
> is to actually enumerate all 16 devices between the firmware and i915
> driver. The problem we have is that the intel opregion spec that
> hasn't been updated since 2008 doesn't cover the additional 8 devices.
> Anyway, that is being tracked here:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=81762
>
>> ---
>> drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
>> index 7556e7c..f78ed08 100644
>> --- a/drivers/acpi/blacklist.c
>> +++ b/drivers/acpi/blacklist.c
>> @@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct
>> dmi_system_id *d)
>> acpi_osi_setup("!Windows 2012");
>> return 0;
>> }
>> +/*
>> + * Some ASUS models firmware declares 16 devices instead of 8
>> + * 'acpi_osi=' kernel parameter fixes it
>> + * Without this parameters brightness keys Fn+F5 and F6 do not work
>> + */
>> +static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
>> +{
>> + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
>> + acpi_osi_setup("");
>> + return 0;
>> +}
>
> What does this do to the rest of the function keys? Does everything
> else still work as expected, including suspend and resume?
>
>> static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
>> {
>> @@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[]
>> __initdata = {
>> DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
>> },
>> },
>> + /* Without this brightness keys do not work */
>> + {
>> + .callback = dmi_disable_osi_all,
>> + .ident = "ASUSTeK COMPUTER INC. X200MA",
>> + .matches = {
>> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
>> + },
>> + },
>> {}
>> };
>>
>> --
>> 1.9.1
>> --
>> To unsubscribe from this list: send the line "unsubscribe stable" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-12-18 13:40:15

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

I did not notice the inline question.
The rest of the keys work as they did before.
Now other regressions have been noticed.
Many people use acpi_osi= as a boot paremeter, since there
is no other way to get Fn+F5 and F6 working.

18.12.2014 16:25, Josh Boyer пишет:
> On Thu, Dec 18, 2014 at 7:16 AM, Dmitry Tunin <[email protected]> wrote:
>> Add "acpi_osi=" quirk for ASUS X200MA
>> More information can be found in UX302LA bugreport
>> https://bugzilla.kernel.org/show_bug.cgi?id=70241
>>
>> X200MA is affected by th e same bug and the solution has been tested
>>
>> I reported it to launchpad too
>> https://bugs.launchpad.net/ubuntu/bug/1400068
>>
>> Cc: [email protected]
>> Signed-off-by: Dmitry Tunin <[email protected]>
>>
>
> The UX301LA models have the same setup, with 16 devices instead of 8.
> I discussed this with Matthew Garrett a bit and a more ideal approach
> is to actually enumerate all 16 devices between the firmware and i915
> driver. The problem we have is that the intel opregion spec that
> hasn't been updated since 2008 doesn't cover the additional 8 devices.
> Anyway, that is being tracked here:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=81762
>
>> ---
>> drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
>> index 7556e7c..f78ed08 100644
>> --- a/drivers/acpi/blacklist.c
>> +++ b/drivers/acpi/blacklist.c
>> @@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct
>> dmi_system_id *d)
>> acpi_osi_setup("!Windows 2012");
>> return 0;
>> }
>> +/*
>> + * Some ASUS models firmware declares 16 devices instead of 8
>> + * 'acpi_osi=' kernel parameter fixes it
>> + * Without this parameters brightness keys Fn+F5 and F6 do not work
>> + */
>> +static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
>> +{
>> + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
>> + acpi_osi_setup("");
>> + return 0;
>> +}
>
> What does this do to the rest of the function keys? Does everything
> else still work as expected, including suspend and resume?
>
>> static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
>> {
>> @@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[]
>> __initdata = {
>> DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
>> },
>> },
>> + /* Without this brightness keys do not work */
>> + {
>> + .callback = dmi_disable_osi_all,
>> + .ident = "ASUSTeK COMPUTER INC. X200MA",
>> + .matches = {
>> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
>> + },
>> + },
>> {}
>> };
>>
>> --
>> 1.9.1
>> --
>> To unsubscribe from this list: send the line "unsubscribe stable" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-12-18 13:57:15

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Can you run acpidump and upload the ACPI tables somewhere?

--
Matthew Garrett | [email protected]

2014-12-18 14:03:15

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

It is already done.

https://bugzilla.kernel.org/attachment.cgi?id=160161

18.12.2014 16:57, Matthew Garrett пишет:
> Can you run acpidump and upload the ACPI tables somewhere?
>

2014-12-18 14:04:30

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Sry, wrong url b4

https://bugzilla.kernel.org/attachment.cgi?id=125091

18.12.2014 16:57, Matthew Garrett пишет:
> Can you run acpidump and upload the ACPI tables somewhere?
>

2014-12-18 14:07:03

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Here is another one from X200MA

https://bugzilla.kernel.org/attachment.cgi?id=160161

18.12.2014 16:57, Matthew Garrett пишет:
> Can you run acpidump and upload the ACPI tables somewhere?
>

2014-12-18 14:09:37

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

On Thu, Dec 18, 2014 at 05:04:23PM +0300, Dmitry Tunin wrote:
> Sry, wrong url b4
>
> https://bugzilla.kernel.org/attachment.cgi?id=125091

Can you check whether acpi_osi="Windows 2012" also results in things
working?

--
Matthew Garrett | [email protected]

2014-12-18 14:22:44

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

No, It does not. That's first I tried.

18.12.2014 17:09, Matthew Garrett пишет:
> On Thu, Dec 18, 2014 at 05:04:23PM +0300, Dmitry Tunin wrote:
>> Sry, wrong url b4
>>
>> https://bugzilla.kernel.org/attachment.cgi?id=125091
>
> Can you check whether acpi_osi="Windows 2012" also results in things
> working?
>

2014-12-18 14:26:39

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Ah, I see - can you try acpi_osi="!Windows 2013" ?

--
Matthew Garrett | [email protected]

2014-12-18 14:34:40

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

I tried that too. No effect.

18.12.2014 17:26, Matthew Garrett пишет:
> Ah, I see - can you try acpi_osi="!Windows 2013" ?
>

2014-12-18 14:36:29

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

That's odd - it looks like the default behaviour in the absence of any
OSI strings is to just default to an OSYS value that matches Windows
2012, so disabling the 2013 value should be equivalent. If it's not,
it's definitely not safe to turn off all values - there are several
devices that change behaviour as a result.

--
Matthew Garrett | [email protected]

2014-12-18 14:40:25

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

But at least two devices work well with this quirk.
That must be some ASUS UEFI firmware fault, but still it is a workaround.
You can find some more information in those bugzilla reports.

https://bugzilla.kernel.org/show_bug.cgi?id=89401
https://bugzilla.kernel.org/show_bug.cgi?id=70241

18.12.2014 17:36, Matthew Garrett пишет:
> That's odd - it looks like the default behaviour in the absence of any
> OSI strings is to just default to an OSYS value that matches Windows
> 2012, so disabling the 2013 value should be equivalent. If it's not,
> it's definitely not safe to turn off all values - there are several
> devices that change behaviour as a result.
>

2014-12-18 14:43:45

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

The actual fix is known - Intel need to fix their code to match their
specification. Applying this patch may break functionality that other
users are depending on.

--
Matthew Garrett | [email protected]

2014-12-18 14:51:11

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Oh, I see - acpi_osi= disables _OSI entirely, so we end up going down a
different path that results in us claiming to be XP. That results in a
bunch of changes in exposed hardware, so this patch certainly isn't
acceptable.

--
Matthew Garrett | [email protected]

2014-12-18 18:09:27

by Len Brown

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

NAK on addoing this acpi_osi= quirk to upstream Linux.

The reason is that problem is being actively debugged.
Quirks in upstream Linux are for when we give up.

Sure, it is perfectly okay for individual users to invoke it.
It is even fine for a distro to check in this workaround if they care
about that box working *now*
and they are not concerned about side effects.

But the real fix is in development, and checking workarounds with
possible other side-effects
into up-stream Linux is just a distraction from getting it right for
not just this machine,
but other machines w/ the same issue.

thanks,
Len Brown, Intel Open Source Technology Center

ps. lots of people are mis-using acpi_osi= in debugging, please consult
Documentation/kernel-parameters.txt for a detailed description of how
this cmdline option works. Note, in particular, that acpi_osi=XYZ by itself
will _add_ XYZ to the list of recognized strings. If that string is
already built
into Linux (eg. "Windows 2012"), then adding it again has no effect.

2014-12-18 18:20:09

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Len,

I completely agree that debugging and testing of a real solution would be a problem.
And adding "acpi_osi=" is not too hard as a boot option.

In some cases it can be built-in, if it is a box solution.

So the patch is no good.

18.12.2014 21:09, Len Brown пишет:
> NAK on addoing this acpi_osi= quirk to upstream Linux.
>
> The reason is that problem is being actively debugged.
> Quirks in upstream Linux are for when we give up.
>
> Sure, it is perfectly okay for individual users to invoke it.
> It is even fine for a distro to check in this workaround if they care
> about that box working *now*
> and they are not concerned about side effects.
>
> But the real fix is in development, and checking workarounds with
> possible other side-effects
> into up-stream Linux is just a distraction from getting it right for
> not just this machine,
> but other machines w/ the same issue.
>
> thanks,
> Len Brown, Intel Open Source Technology Center
>
> ps. lots of people are mis-using acpi_osi= in debugging, please consult
> Documentation/kernel-parameters.txt for a detailed description of how
> this cmdline option works. Note, in particular, that acpi_osi=XYZ by itself
> will _add_ XYZ to the list of recognized strings. If that string is
> already built
> into Linux (eg. "Windows 2012"), then adding it again has no effect.
>

2014-12-18 20:04:55

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

Ah, http://cgit.freedesktop.org/~jani/drm/log/?h=didl nominally has
support for doing the right thing here - any chance you can try that
tree?

--
Matthew Garrett | [email protected]

2014-12-18 21:20:27

by Dmitry Tunin

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

I did already. It is not that simple.
https://bugzilla.kernel.org/show_bug.cgi?id=70241#c86

18.12.2014 23:04, Matthew Garrett пишет:
> Ah, http://cgit.freedesktop.org/~jani/drm/log/?h=didl nominally has
> support for doing the right thing here - any chance you can try that
> tree?
>

2014-12-19 01:46:15

by Aaron Lu

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

CC Jani, who is working on the patchset to enable 8+ output devices and
may have some comments on this.

Regards,
Aaron

On 12/18/2014 09:25 PM, Josh Boyer wrote:
> On Thu, Dec 18, 2014 at 7:16 AM, Dmitry Tunin <[email protected]> wrote:
>> Add "acpi_osi=" quirk for ASUS X200MA
>> More information can be found in UX302LA bugreport
>> https://bugzilla.kernel.org/show_bug.cgi?id=70241
>>
>> X200MA is affected by th e same bug and the solution has been tested
>>
>> I reported it to launchpad too
>> https://bugs.launchpad.net/ubuntu/bug/1400068
>>
>> Cc: [email protected]
>> Signed-off-by: Dmitry Tunin <[email protected]>
>>
>
> The UX301LA models have the same setup, with 16 devices instead of 8.
> I discussed this with Matthew Garrett a bit and a more ideal approach
> is to actually enumerate all 16 devices between the firmware and i915
> driver. The problem we have is that the intel opregion spec that
> hasn't been updated since 2008 doesn't cover the additional 8 devices.
> Anyway, that is being tracked here:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=81762
>
>> ---
>> drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>>
>> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
>> index 7556e7c..f78ed08 100644
>> --- a/drivers/acpi/blacklist.c
>> +++ b/drivers/acpi/blacklist.c
>> @@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct
>> dmi_system_id *d)
>> acpi_osi_setup("!Windows 2012");
>> return 0;
>> }
>> +/*
>> + * Some ASUS models firmware declares 16 devices instead of 8
>> + * 'acpi_osi=' kernel parameter fixes it
>> + * Without this parameters brightness keys Fn+F5 and F6 do not work
>> + */
>> +static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
>> +{
>> + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
>> + acpi_osi_setup("");
>> + return 0;
>> +}
>
> What does this do to the rest of the function keys? Does everything
> else still work as expected, including suspend and resume?
>
>> static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
>> {
>> @@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[]
>> __initdata = {
>> DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
>> },
>> },
>> + /* Without this brightness keys do not work */
>> + {
>> + .callback = dmi_disable_osi_all,
>> + .ident = "ASUSTeK COMPUTER INC. X200MA",
>> + .matches = {
>> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
>> + DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
>> + },
>> + },
>> {}
>> };
>>
>> --
>> 1.9.1
>> --
>> To unsubscribe from this list: send the line "unsubscribe stable" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-12-19 03:23:35

by Aaron Lu

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] acpi: Add "acpi_osi=" for ASUS X200MA to enable, brightness keys

On 12/19/2014 09:46 AM, Aaron Lu wrote:
> CC Jani, who is working on the patchset to enable 8+ output devices and
> may have some comments on this.

Change Jani's email address, I got a warning from the mailer about his other
email address.

>
> Regards,
> Aaron
>
> On 12/18/2014 09:25 PM, Josh Boyer wrote:
>> On Thu, Dec 18, 2014 at 7:16 AM, Dmitry Tunin <[email protected]> wrote:
>>> Add "acpi_osi=" quirk for ASUS X200MA
>>> More information can be found in UX302LA bugreport
>>> https://bugzilla.kernel.org/show_bug.cgi?id=70241
>>>
>>> X200MA is affected by th e same bug and the solution has been tested
>>>
>>> I reported it to launchpad too
>>> https://bugs.launchpad.net/ubuntu/bug/1400068
>>>
>>> Cc: [email protected]
>>> Signed-off-by: Dmitry Tunin <[email protected]>
>>>
>>
>> The UX301LA models have the same setup, with 16 devices instead of 8.
>> I discussed this with Matthew Garrett a bit and a more ideal approach
>> is to actually enumerate all 16 devices between the firmware and i915
>> driver. The problem we have is that the intel opregion spec that
>> hasn't been updated since 2008 doesn't cover the additional 8 devices.
>> Anyway, that is being tracked here:
>>
>> https://bugs.freedesktop.org/show_bug.cgi?id=81762
>>
>>> ---
>>> drivers/acpi/blacklist.c | 20 ++++++++++++++++++++
>>> 1 file changed, 20 insertions(+)
>>>
>>> diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
>>> index 7556e7c..f78ed08 100644
>>> --- a/drivers/acpi/blacklist.c
>>> +++ b/drivers/acpi/blacklist.c
>>> @@ -162,6 +162,17 @@ static int __init dmi_disable_osi_win8(const struct
>>> dmi_system_id *d)
>>> acpi_osi_setup("!Windows 2012");
>>> return 0;
>>> }
>>> +/*
>>> + * Some ASUS models firmware declares 16 devices instead of 8
>>> + * 'acpi_osi=' kernel parameter fixes it
>>> + * Without this parameters brightness keys Fn+F5 and F6 do not work
>>> + */
>>> +static int __init dmi_disable_osi_all(const struct dmi_system_id *d)
>>> +{
>>> + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
>>> + acpi_osi_setup("");
>>> + return 0;
>>> +}
>>
>> What does this do to the rest of the function keys? Does everything
>> else still work as expected, including suspend and resume?
>>
>>> static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
>>> {
>>> @@ -371,6 +382,15 @@ static struct dmi_system_id acpi_osi_dmi_table[]
>>> __initdata = {
>>> DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
>>> },
>>> },
>>> + /* Without this brightness keys do not work */
>>> + {
>>> + .callback = dmi_disable_osi_all,
>>> + .ident = "ASUSTeK COMPUTER INC. X200MA",
>>> + .matches = {
>>> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
>>> + DMI_MATCH(DMI_PRODUCT_NAME, "X200MA"),
>>> + },
>>> + },
>>> {}
>>> };
>>>
>>> --
>>> 1.9.1
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe stable" in
>>> the body of a message to [email protected]
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>