From: Maximilian Luz Date: Mon, 4 Jul 2022 23:33:04 +0000 (+0200) Subject: quirks: Add quirks to improve tablet-mode on the Surface Laptop Studio X-Git-Tag: 1.22.0~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=238a56eb7c0e803caa4d6bbea17df155a6467730;p=platform%2Fupstream%2Flibinput.git quirks: Add quirks to improve tablet-mode on the Surface Laptop Studio The Microsoft Surface Laptop Studio can operate in multiple postures. In one of these, dubbed "slate/tent", the screen is angled roughly 45°, covering the keyboard but not the touchpad. Unfortunately, this state is (as far as we can tell) indiscernible to the display being flipped 180° backwards (dubbed "slate/flipped"), where the keyboard points away from the user and is now behind the screen. Due to this, it makes sense to enable tablet-mode in this (general) "slate" state, which is what the corresponding kernel driver currently does. This, for example, can tell desktop environments to bring up a touch keyboard in certain situations and to allow for automatic screen rotation (which is required in the "flipped" mode). Unfortunately, libinput disables all integrated peripherals, including the touchpad, when tablet-mode is on, rendering the touchpad unusable in the "slate/tent" state. Therefore, set ModelTabletModeNoSuspend=1 to keep the touchpad functional. For simplicity, apply this quirk to all input devices on the Surface Laptop Studio. Those are already disabled by firmware in the respective postures, meaning things work well without suspension by libinput. Signed-off-by: Maximilian Luz --- diff --git a/quirks/30-vendor-microsoft.quirks b/quirks/30-vendor-microsoft.quirks index b5fb914..36efebb 100644 --- a/quirks/30-vendor-microsoft.quirks +++ b/quirks/30-vendor-microsoft.quirks @@ -27,6 +27,11 @@ MatchUdevType=touchpad AttrPressureRange=25:10 AttrPalmPressureThreshold=500 +[Microsoft Surface Laptop Studio Built-In Peripherals] +MatchName=*Microsoft Surface* +MatchDMIModalias=dmi:*svnMicrosoftCorporation:*pnSurfaceLaptopStudio +ModelTabletModeNoSuspend=1 + [Microsoft Nano Transceiver v2.0] MatchUdevType=mouse MatchBus=usb