From b24e437ab00efe191f57d56d0d5412e026a72c3b Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 18 Nov 2020 21:11:14 +0100 Subject: [PATCH] hwdb: Document how to properly set the mount-matrix for the base-accelerometer in 360 degree hinges style 2-in-1s with 2 accelerometers Document how the mount-matrix for the base-accelerometer must be set on 360 degree hinges style 2-in-1s with 2 sensors (one in the display and 1 in the base). Note the choice to define the lid being fully closed as an angle of 0 degrees is based on the ACPI tables of devices with a BOSC0200 ACPI device-node describing both sensors. In this case the ACPI tables contain mount-matrix info (and the kernel will soon support reading this and exporting it to userspace) and the mount-matrices defined in these ACPI tables are such that the angle of the G-force vector measured by the sensors is identical for both sensors when the laptop's lid is fully closed. This also feels more natural then defining the laptop being fully open (180 degrees open) as the home / 0 degree angle position. --- hwdb.d/60-sensor.hwdb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hwdb.d/60-sensor.hwdb b/hwdb.d/60-sensor.hwdb index b0d0d084de..a975abdf04 100644 --- a/hwdb.d/60-sensor.hwdb +++ b/hwdb.d/60-sensor.hwdb @@ -67,6 +67,16 @@ # or 'display'. The default, when unset, is equivalent to: # ACCEL_LOCATION=display # +# A note about setting ACCEL_MOUNT_MATRIX for ACCEL_LOCATION=base sensors, +# on 360 degree hinges style 2-in-1s with 2 sensors (one in the display and +# 1 in the base). Userspace will use both sensors to calculate the angle between +# the 2 halves and the angle is defined as being 0 when the device is folded +# as a regular clamshell laptop with its lid closed. This means that the +# base-accelerometer's mount-matrix must be such, that after applying +# the mount-matrices to both sensors, the base-accelerometer's readings must +# be identical to the display-accelerometer's readings (when the lid is +# closed). +# # Sort by brand, model #########################################