diff mbox series

ACPI: button: Add a DMI quirk for Razer Blade Stealth 13 late 2019 lid-switch

Message ID 20200102202754.24028-1-jason@jlekstrand.net (mailing list archive)
State Mainlined, archived
Headers show
Series ACPI: button: Add a DMI quirk for Razer Blade Stealth 13 late 2019 lid-switch | expand

Commit Message

Jason Ekstrand Jan. 2, 2020, 8:27 p.m. UTC
Running evemu-record on the lid switch event shows that the lid reports
the first close but then never reports an open.  This causes systemd to
continuously re-suspend the laptop every 30s.  Resetting the _LID to
open fixes the issue.

v2: Updated the comment to better describe the behavior of ACPI

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
---
 drivers/acpi/button.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Hans de Goede Jan. 2, 2020, 9:27 p.m. UTC | #1
Hi,

On 02-01-2020 21:27, Jason Ekstrand wrote:
> Running evemu-record on the lid switch event shows that the lid reports
> the first close but then never reports an open.  This causes systemd to
> continuously re-suspend the laptop every 30s.  Resetting the _LID to
> open fixes the issue.
> 
> v2: Updated the comment to better describe the behavior of ACPI
> 
> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>

Thanks, looks good to me now:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   drivers/acpi/button.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
> index 662e07afe9a1..ef5d473e7992 100644
> --- a/drivers/acpi/button.c
> +++ b/drivers/acpi/button.c
> @@ -122,6 +122,17 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
>   		},
>   		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
>   	},
> +	{
> +		/*
> +		 * Razer Blade Stealth 13 late 2019, notification of the LID device
> +		 * only happens on close, not on open and _LID always returns closed.
> +		 */
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Razer"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "Razer Blade Stealth 13 Late 2019"),
> +		},
> +		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
> +	},
>   	{}
>   };
>   
>
Rafael J. Wysocki Jan. 7, 2020, 10:53 a.m. UTC | #2
On Thu, Jan 2, 2020 at 10:27 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 02-01-2020 21:27, Jason Ekstrand wrote:
> > Running evemu-record on the lid switch event shows that the lid reports
> > the first close but then never reports an open.  This causes systemd to
> > continuously re-suspend the laptop every 30s.  Resetting the _LID to
> > open fixes the issue.
> >
> > v2: Updated the comment to better describe the behavior of ACPI
> >
> > Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
>
> Thanks, looks good to me now:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Applied as 5.6 material, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 662e07afe9a1..ef5d473e7992 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -122,6 +122,17 @@  static const struct dmi_system_id dmi_lid_quirks[] = {
 		},
 		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
 	},
+	{
+		/*
+		 * Razer Blade Stealth 13 late 2019, notification of the LID device
+		 * only happens on close, not on open and _LID always returns closed.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Razer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Razer Blade Stealth 13 Late 2019"),
+		},
+		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
+	},
 	{}
 };