Automatic screen rotation
#25
(08-01-2024, 08:09 AM)Sumisu Wrote: how can I create this file:60-sensor.hwdb and what is the content. Could you post this file?
Thank in advance

Sumisu

Sumisu,

Welcome to the party! I'm glad it's almost working for you!

The contents of the file /etc/udev/hwdb.d/60-sensor.hwdb are simple:
Code:
sensor:modalias:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1

Those nine numbers should be able to fix your issue. They are labeled a matrix meaning they represent:

Code:
0 1 0
1 0 0
0 0 1


Note there is only a single "1" in each column or row. I believe this matrix accounts for the fact that the rotation sensor may be oriented differently or respond differently on each device. If your device is always 90 degrees off, then hopefully all you have to do is change the matrix to find the orientation that works for you. So, for example, I might try each of the following to see if one of them works:

  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 0, 1; 0, 1, 0
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
  ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, 1; 1, 0, 0
  ACCEL_MOUNT_MATRIX=0, 0, 1; 1, 0, 0; 0, 1, 0
  ACCEL_MOUNT_MATRIX=0, 0, 1; 0, 1, 0; 1, 0, 0

Good luck!
  Reply


Messages In This Thread
Automatic screen rotation - by frtodd - 06-06-2023, 07:05 PM
RE: Automatic screen rotation - by zoward - 06-07-2023, 08:26 AM
RE: Automatic screen rotation - by frtodd - 06-07-2023, 11:12 AM
RE: Automatic screen rotation - by exu - 06-07-2023, 12:22 PM
RE: Automatic screen rotation - by zoward - 06-08-2023, 04:07 AM
RE: Automatic screen rotation - by zoward - 06-07-2023, 04:57 PM
RE: Automatic screen rotation - by frtodd - 06-07-2023, 05:26 PM
RE: Automatic screen rotation - by Corconegre - 06-13-2023, 01:57 AM
RE: Automatic screen rotation - by KelsonV - 06-13-2023, 11:20 AM
RE: Automatic screen rotation - by chzbacon - 06-19-2023, 06:54 PM
RE: Automatic screen rotation - by rqkeating - 06-20-2023, 10:21 AM
RE: Automatic screen rotation - by mtomaschett - 03-17-2024, 01:53 PM
RE: Automatic screen rotation - by hansen - 04-07-2024, 06:58 AM
RE: Automatic screen rotation - by frtodd - 04-10-2024, 06:37 AM
RE: Automatic screen rotation - by hansen - 04-28-2024, 07:53 AM
RE: Automatic screen rotation - by frtodd - 04-28-2024, 03:08 PM
RE: Automatic screen rotation - by Sumisu - 08-01-2024, 08:09 AM
RE: Automatic screen rotation - by frtodd - 08-01-2024, 11:29 AM
RE: Automatic screen rotation - by Kevin Kofler - 04-28-2024, 05:58 PM
RE: Automatic screen rotation - by hansen - 04-29-2024, 10:33 AM
RE: Automatic screen rotation - by Kevin Kofler - 04-29-2024, 02:34 PM
RE: Automatic screen rotation - by hansen - 05-19-2024, 09:28 AM
RE: Automatic screen rotation - by frtodd - 05-21-2024, 07:08 PM
RE: Automatic screen rotation - by hansen - 06-05-2024, 10:57 AM
RE: Automatic screen rotation - by KittyMuffin - 08-26-2024, 01:16 PM
RE: Automatic screen rotation - by hansen - 09-08-2024, 02:38 AM

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

Forum Jump:


Users browsing this thread: 4 Guest(s)