![]() |
Automatic screen rotation - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PineTab (https://forum.pine64.org/forumdisplay.php?fid=140) +--- Forum: PineTab Software (https://forum.pine64.org/forumdisplay.php?fid=142) +--- Thread: Automatic screen rotation (/showthread.php?tid=18322) |
RE: Automatic screen rotation - hansen - 05-19-2024 (04-29-2024, 02:34 PM)Kevin Kofler Wrote: I think you must have everything in one line. I tried all the 6 permutations and found no difference. While executing Code: sudo systemd-hwdb update Code: /etc/udev/hwdb.d/60-sensor.hwdb:2: Property expected, ignoring record with no properties. Did I miss anything? RE: Automatic screen rotation - frtodd - 05-21-2024 (05-19-2024, 09:28 AM)hansen Wrote:(04-29-2024, 02:34 PM)Kevin Kofler Wrote: I think you must have everything in one line. Sorry for the delay: busy weekend! Can you post your 60-sensor.hwdb into a code block? It sounds to me like there's something it doesn't like about how your configuration is formatted. RE: Automatic screen rotation - hansen - 06-05-2024 Sorry, didn't had much time the last weeks...after all these tries I deleted the 60-sensor.hwdb file. I'll set it up again and let you know. RE: Automatic screen rotation - Sumisu - 08-01-2024 (04-10-2024, 06:37 AM)frtodd Wrote: I finally did an OS update today. After the last update rotation quit working for me. After this update, it was still broken. Hi guys, I am quiete new to the Pinetab2 and hope I do not ask stupid questions. My problem is that the Auto Screen Rotation works, but not as it is supposed to. I installed the iio-sensor and when i take it out ot the case the taskbar always urns to the left hand side, so the rotation is wrong for 90 degrees. The mentioned solution here is to create the file, maybe this is a dumb question, but how can I create this file:60-sensor.hwdb and what is the content. Could you post this file? Thank in advance Sumisu RE: Automatic screen rotation - frtodd - 08-01-2024 (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? 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:* Those nine numbers should be able to fix your issue. They are labeled a matrix meaning they represent: Code: 0 1 0 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! RE: Automatic screen rotation - KittyMuffin - 08-26-2024 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?tid=18322&pid=121865#pid121865 and iio-sensor-proxy documentation https://github.com/IMbackK/iio-sensor-proxy RE: Automatic screen rotation - hansen - 09-08-2024 perfect, that's it! ? RE: Automatic screen rotation - mtomaschett - 11-13-2024 (08-26-2024, 01:16 PM)KittyMuffin Wrote: My screen was 90 degrees off clockwise, the following worked for me Bravo! This did the trick! RE: Automatic screen rotation - josh.bialkowski - 02-15-2025 (08-26-2024, 01:16 PM)KittyMuffin Wrote: # This also worked for me, though I actually ended up using: Code: sensor:modalias:of:NaccelerometerT_null_Csilan,sc7a20:* Which I found from here: https://github.com/systemd/systemd/blob/main/hwdb.d/60-sensor.hwdb#L982C1-L983C48 RE: Automatic screen rotation - biketool - 02-15-2025 I had same problem with my new pinetab2 arch/kde. Set the rotation to forced/manual, reboot, set to automatic again while holding the tablet in correct orientation when still in forced, it stays correct, reboot to be safe, use as normal now. I am not sure if the reboots were needed or not but it seemed smart somehow and I didn't get results from only switching between auto to forced. |