All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads
@ 2013-02-11 16:21 Seth Forshee
  2013-02-11 17:52 ` Matthew Garrett
  2013-04-01  1:53 ` Aaron Lu
  0 siblings, 2 replies; 69+ messages in thread
From: Seth Forshee @ 2013-02-11 16:21 UTC (permalink / raw)
  To: Len Brown, Rafael J. Wysocki, linux-acpi; +Cc: Ben Jencks, joeyli, Seth Forshee

The AML implementation for brightness control on several ThinkPads
contains a workaround to meet a Windows 8 requirement of 101 brightness
levels [1]. The implementation is flawed, as only 16 of the brighness
values reported by _BCL affect a change in brightness. _BCM silently
discards the rest of the values. Disabling Windows 8 compatibility on
these machines reverts them to the old behavior, making _BCL only report
the 16 brightness levels which actually work. Add a quirk to do this
along with a dmi callback to disable Win8 compatibility.

[1] http://msdn.microsoft.com/en-us/library/windows/hardware/jj128256.aspx

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51231
BugLink: http://bugs.launchpad.net/bugs/1098216
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---

This has been discussed previously at [2], however the description of
the problem there is incorrect. _BCM simply discards any value written
that isn't one of the brightness levels returned by _BCL for non-Win8
systems; it does not do any rounding.

This patch quirks six machines that have been confirmed to have this
problem, but there may be others. I looked for some way to do this other
than quirking for individual models, but unfortunately I couldn't find
any other criteria which worked.

Thanks,
Seth

[2] http://comments.gmane.org/gmane.linux.acpi.devel/58398


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

diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index cb96296..6c242ed 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -193,6 +193,13 @@ static int __init dmi_disable_osi_win7(const struct dmi_system_id *d)
 	return 0;
 }
 
+static int __init dmi_disable_osi_win8(const struct dmi_system_id *d)
+{
+	printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
+	acpi_osi_setup("!Windows 2012");
+	return 0;
+}
+
 static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 	{
 	.callback = dmi_disable_osi_vista,
@@ -269,6 +276,61 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
 	},
 
 	/*
+	 * The following Lenovo models have a broken workaround in the
+	 * acpi_video backlight implementation to meet the Windows 8
+	 * requirement of 101 backlight levels. Reverting to pre-Win8
+	 * behavior fixes the problem.
+	 */
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad L430",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L430"),
+		},
+	},
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad T430s",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T430s"),
+		},
+	},
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad T530",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T530"),
+		},
+	},
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad W530",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"),
+		},
+	},
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad X1 Carbon",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon"),
+		},
+	},
+	{
+	.callback = dmi_disable_osi_win8,
+	.ident = "Lenovo ThinkPad X230",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X230"),
+		},
+	},
+
+	/*
 	 * BIOS invocation of _OSI(Linux) is almost always a BIOS bug.
 	 * Linux ignores it, except for the machines enumerated below.
 	 */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2013-08-04  1:07 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.