タブレットモードで画面の回転を変更するには/usr/lib/udev/hwdb.d/60-sensor.hwdbをどのように変更する必要がありますか?

タブレットモードで画面の回転を変更するには/usr/lib/udev/hwdb.d/60-sensor.hwdbをどのように変更する必要がありますか?

オペレーティングシステム:Debian 11

udev次の設定ファイルが付属しています/usr/lib/udev/hwdb.d/60-sensor.hwdb

# Allowed properties are:
#    ACCEL_MOUNT_MATRIX=<matrix>
#    PROXIMITY_NEAR_LEVEL=<value>
#
# where <matrix> is a mount-matrix in the format specified in the IIO
# subsystem[1]. The default, when unset, is equivalent to:
#   ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
# eg. the identity matrix,
# and <value> is an integer value above which an object is considered
# close by a proximity sensor:
#   PROXIMITY_NEAR_LEVEL=100
#
# [1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dfc57732ad38f93ae6232a3b4e64fd077383a0f1
#
# Note for devices where the display (LCD panel) is mounted non upright
# in the device's casing, e.g. mounted upside-down or 90 degree rotated,
# the ACCEL_MOUNT_MATRIX should be such that the x and y axis matches the
# x and y axis of the display, not those of the casing, so that desktop
# environments using the accelerometer data for rotation will e.g.
# automatically flip their output for an upside-down display when the device
# is held upright.
#
#    ACCEL_LOCATION=<location>
#
# where <location> is the location of the sensor. This value could be 'base'
# or 'display'. The default, when unset, is equivalent to:
#    ACCEL_LOCATION=display

このような例

#########################################
# Google Chromebooks
#########################################
sensor:modalias:platform:cros-ec-accel:dmi:*:svnGOOGLE:*
 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1

Debian 11を実行しているPixelbookがあり、タブレットモードの画面は常に180度回転します(縦モードとプロファイルモード)。回転行列を適用すると、画面がz軸に基づいて180度回転すると思いました。つまり... [-1 0 0 -1, 0 0 0 1] in /etc/udev/hwdb です。 d ファイルを使用すると問題が解決します。しかし、これまでの努力は何の変化ももたらさなかった。回転行列が間違っているからですか?

もう1つの問題は、Pixelbookに2つの加速度計があることです。 1つはカバーに、もう1つはベースにあります。modaliascros-ec-accelに示されているように、起動するたびに変更される数値sysfsが追加されます。上記の例では、センサーが間違っているか不適切に参照されていますか?私は試してみましたが、役に立ちませんでした。.N.autoNsensor:modalias:platform:cros-ec-accel.*:dmi:*:svnGOOGLE:pnEve*ACCEL_LOCATION=<lid|base>

ベストアンサー1

おすすめ記事