quirks: Add quirks to improve tablet-mode on the Surface Laptop Studio
authorMaximilian Luz <luzmaximilian@gmail.com>
Mon, 4 Jul 2022 23:33:04 +0000 (01:33 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Sun, 10 Jul 2022 18:25:22 +0000 (18:25 +0000)
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 <luzmaximilian@gmail.com>
quirks/30-vendor-microsoft.quirks

index b5fb914..36efebb 100644 (file)
@@ -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