The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Hans de Goede 2728f39dfc platform/x86: intel-vbtn: Stop reporting SW_DOCK events
Stop reporting SW_DOCK events because this breaks suspend-on-lid-close.

SW_DOCK should only be reported for docking stations, but all the DSDTs in
my DSDT collection which use the intel-vbtn code, always seem to use this
for 2-in-1s / convertibles and set SW_DOCK=1 when in laptop-mode (in tandem
with setting SW_TABLET_MODE=0).

This causes userspace to think the laptop is docked to a port-replicator
and to disable suspend-on-lid-close, which is undesirable.

Map the dock events to KEY_IGNORE to avoid this broken SW_DOCK reporting.

Note this may theoretically cause us to stop reporting SW_DOCK on some
device where the 0xCA and 0xCB intel-vbtn events are actually used for
reporting docking to a classic docking-station / port-replicator but
I'm not aware of any such devices.

Also the most important thing is that we only report SW_DOCK when it
reliably reports being docked to a classic docking-station without any
false positives, which clearly is not the case here. If there is a
chance of reporting false positives then it is better to not report
SW_DOCK at all.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210321163513.72328-1-hdegoede@redhat.com
2021-03-21 17:44:34 +01:00
Documentation docs: driver-api: Add Surface DTX driver documentation 2021-03-17 18:39:39 +01:00
LICENSES
arch
block
certs
crypto
drivers platform/x86: intel-vbtn: Stop reporting SW_DOCK events 2021-03-21 17:44:34 +01:00
fs pstore fixes for v5.12-rc2 2021-03-05 17:21:25 -08:00
include platform/surface: Add DTX driver 2021-03-17 18:39:38 +01:00
init
ipc
kernel io_uring-5.12-2021-03-05 2021-03-05 12:44:43 -08:00
lib
mm
net
samples
scripts gcc-plugins fixes for v5.12-rc2 2021-03-05 17:23:03 -08:00
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS docs: driver-api: Add Surface DTX driver documentation 2021-03-17 18:39:39 +01:00
Makefile Linux 5.12-rc2 2021-03-05 17:33:41 -08:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.