Automatic screen rotation
#31
(08-26-2024, 01:16 PM)KittyMuffin Wrote: My screen was 90 degrees off clockwise, the following worked for me

1. # pacman -S iio-sensor-proxy

2. # nano /etc/udev/hwdb.d/61-sensor-local.hwdb

3. Put the following in and save
#
sensor:modalias:*sc7a20:*
  ACCEL_MOUNT_MATRIX=0, 0, -1; 1, 0, 0; 0, -1, 0
#

4. # systemd-hwdb update
5. # udevadm trigger -v -p DEVNAME=/dev/iio:device1
6.  Settings -> Display & Monitor -> check "Automatic"
7. Maybe reboot, not sure


I figured the correct accel_mount_matrix by drawing 2 cubes and assigning X,Y and Z axis, one cube for Pinetab rotation and one for screen rotation and then correcting the accel_mount_matrix based on the differences. Also the numbers can be -1,0,1.

Credits to mtomaschett with this post https://forum.pine64.org/showthread.php?...#pid121865
and iio-sensor-proxy documentation https://github.com/IMbackK/iio-sensor-proxy

After upgrading to Plasma 6.6 I had to change the file  /etc/udev/hwdb.d/61-sensor-local.hwdb to

#
sensor:modalias:*sc7a20:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 0, 1; 0, 1, 0
#

...in order to get it working again.
  Reply
#32
Thanks a lot !!
I also faced this issue and could not find the proper matrix, so I finally deactivated auto-rotation.
It works perfectly now.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTab 2 login screen rotation fix chzbacon 11 14,202 03-17-2024, 04:53 PM
Last Post: mtomaschett
  Ubuntu touch rotation GloriousCoffee 3 5,243 01-09-2024, 06:01 AM
Last Post: polrus
  Low-level persistent display rotation diodelass 8 15,790 10-06-2020, 07:17 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)