Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1638940

[PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open"

From Benjamin Tissoires <benjamin.tissoires@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open"
Date 2017-05-10 18:20 +0200
Message-ID <tFCvg-2Uw-13@gated-at.bofh.it> (permalink)
References <tFCvg-2Uw-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This reverts commit 77e9a4aa9de10cc1418bf9a892366988802a8025.

Even if the method implementation can be buggy on some platform,
the "open" choice is worse. It breaks docking stations basically
and there is no way to have a user-space hwdb to fix that.

On the contrary, it's rather easy in user-space to have a hwdb
with the problematic platforms. Then, libinput (1.7.0+) can fix
the state of the LID switch for us: you need to set the udev
property LIBINPUT_ATTR_LID_SWITCH_RELIABILITY to 'write_open'.

When libinput detects internal keyboard events, it will
overwrite the state of the switch to open, making it reliable
again. Given that logind only checks the LID switch value after
a timeout, we can assume the user will use the internal keyboard
before this timeout expires.

For example, such a hwdb entry is:

libinput:name:*Lid Switch*:dmi:*svnMicrosoftCorporation:pnSurface3:*
 LIBINPUT_ATTR_LID_SWITCH_RELIABILITY=write_open

Link: https://bugzilla.gnome.org/show_bug.cgi?id=782380
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/acpi/button.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 6d5a8c1..e19f530 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -113,7 +113,7 @@ struct acpi_button {
 
 static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier);
 static struct acpi_device *lid_device;
-static u8 lid_init_state = ACPI_BUTTON_LID_INIT_OPEN;
+static u8 lid_init_state = ACPI_BUTTON_LID_INIT_METHOD;
 
 static unsigned long lid_report_interval __read_mostly = 500;
 module_param(lid_report_interval, ulong, 0644);
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open" Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-05-10 18:20 +0200
  RE: [PATCH 2/2] Revert "ACPI / button: Change default behavior to  lid_init_state=open" "Zheng, Lv" <lv.zheng@intel.com> - 2017-05-11 03:00 +0200
    Re: [PATCH 2/2] Revert "ACPI / button: Change default behavior to  lid_init_state=open" Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-05-11 11:50 +0200

csiph-web