linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Lv Zheng <lv.zheng@intel.com>
Cc: Jiri Eischmann <jeischma@redhat.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open"
Date: Wed, 10 May 2017 18:12:40 +0200	[thread overview]
Message-ID: <20170510161240.13229-3-benjamin.tissoires@redhat.com> (raw)
In-Reply-To: <20170510161240.13229-1-benjamin.tissoires@redhat.com>

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


  parent reply	other threads:[~2017-05-10 16:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 16:12 [PATCH 0/2] acpi/button: revert v4.10 behavior Benjamin Tissoires
2017-05-10 16:12 ` [PATCH 1/2] Revert "ACPI / button: Remove lid_init_state=method mode" Benjamin Tissoires
2017-05-11  0:58   ` Zheng, Lv
2017-05-11  1:19     ` Zheng, Lv
2017-05-11 10:12       ` Benjamin Tissoires
2017-05-12  5:08         ` Zheng, Lv
2017-05-12  9:50           ` Benjamin Tissoires
2017-05-15  4:54             ` Zheng, Lv
2017-05-15  7:42               ` Benjamin Tissoires
2017-05-16  5:05                 ` Zheng, Lv
2017-05-10 16:12 ` Benjamin Tissoires [this message]
2017-05-11  0:59   ` [PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open" Zheng, Lv
2017-05-11  9:45     ` Benjamin Tissoires
2017-05-12  2:36       ` Zheng, Lv
2017-05-12 21:50         ` Rafael J. Wysocki
2017-05-15  7:45           ` Benjamin Tissoires
2017-05-15  9:17             ` Rafael J. Wysocki
2017-05-15  9:37               ` Benjamin Tissoires
2017-05-15 11:01                 ` Rafael J. Wysocki
2017-05-15 13:05                   ` Benjamin Tissoires
2017-05-16  5:33                     ` Zheng, Lv
2017-05-16  5:47                       ` Zheng, Lv
2017-05-16  7:15                         ` Benjamin Tissoires
2017-05-16  8:30                           ` Zheng, Lv
2017-05-16 10:10                             ` Benjamin Tissoires
2017-05-17  7:32                               ` Zheng, Lv
2017-05-17 11:54                                 ` Peter Hutterer
2017-05-17 14:16                                 ` Benjamin Tissoires
2017-05-24  8:08                   ` Benjamin Tissoires
2017-05-24 23:01                     ` Rafael J. Wysocki
2017-05-25  6:17                       ` Zheng, Lv
2017-05-26  7:39                     ` Peter Hutterer
2017-05-27 19:23                       ` Rafael J. Wysocki
2017-05-11  0:09 ` [PATCH 0/2] acpi/button: revert v4.10 behavior Rafael J. Wysocki
2017-05-11  9:33   ` Benjamin Tissoires

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=20170510161240.13229-3-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=jeischma@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).