03-17-2024, 01:53 PM
(This post was last modified: 03-31-2024, 09:58 AM by mtomaschett.
Edit Reason: clarification
)
Screen rotation stopped working after recent upgrade. Running Arch Wayland:
I tried to add a custom mount matrix to fix the problem, but I am not able to get any matrix to be applied. Here's what I did:
1) Install:
2) Settings -> Display & Monitor: Orientation: "automatic" and "only when in tablet mode" selected (if these settings don't appear immediately, click to another settings panel, then back to "Display & Monitor")
3) Ensure that PineTab2 is attached to keyboard case
4) This command sometimes causes touchpad on case to become unresponsive; restart required:
5) remove PinTab2 from case, rotate 90 counter-clockwise (screen top switches from device's right edge to device's left edge)
6) rotate 90 clockwise (screen top switches from device's left edge to device's bottom edge)
7) Ctrl-C to quit. Return PineTab2 to case (screen top switches back to device's right edge). Get device info (note lack of mount matrix entry):
8) Get current mount matrix:
9) Add custom mount matrix:
10) Update hwdb:
11) Register trigger:
12) Get device info (note: shows new mount matrix):
13) Repeat sensor test above:
14) Repeat get current mount matrix:
15) Journal shows nothing unless reboot with new settings:
I wasn't able to find any relevant leads by searching for terms from these journal entries.
Any suggestions?
Code:
$ uname -a
Linux pinetab2 6.6.13-danctnix1-1-pinetab2 #1 SMP PREEMPT_DYNAMIC Mon, 22 Jan 2024 11:53:08 +0000 aarch64 GNU/Linux
I tried to add a custom mount matrix to fix the problem, but I am not able to get any matrix to be applied. Here's what I did:
1) Install:
Code:
$ sudo pacman -S iio-sensor-proxy
2) Settings -> Display & Monitor: Orientation: "automatic" and "only when in tablet mode" selected (if these settings don't appear immediately, click to another settings panel, then back to "Display & Monitor")
3) Ensure that PineTab2 is attached to keyboard case
4) This command sometimes causes touchpad on case to become unresponsive; restart required:
Code:
$ monitor-sensor --accel
Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: right-up)
5) remove PinTab2 from case, rotate 90 counter-clockwise (screen top switches from device's right edge to device's left edge)
Code:
Accelerometer orientation changed: bottom-up
6) rotate 90 clockwise (screen top switches from device's left edge to device's bottom edge)
Code:
Accelerometer orientation changed: right-up [or "normal"]
7) Ctrl-C to quit. Return PineTab2 to case (screen top switches back to device's right edge). Get device info (note lack of mount matrix entry):
Code:
$ udevadm info -n /dev/iio:device1
P: /devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
M: iio:device1
R: 1
U: iio
T: iio_device
D: c 252:1
N: iio:device1
L: 0
E: DEVPATH=/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
E: DEVNAME=/dev/iio:device1
E: DEVTYPE=iio_device
E: OF_NAME=accelerometer
E: OF_FULLNAME=/i2c@fe5e0000/accelerometer@18
E: OF_COMPATIBLE_0=silan,sc7a20
E: OF_COMPATIBLE_N=1
E: MAJOR=252
E: MINOR=1
E: SUBSYSTEM=iio
E: USEC_INITIALIZED=9020319
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
8) Get current mount matrix:
Code:
$ cat /sys/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1/mount_matrix
1, 0, 0; 0, 0, 1; 0, 1, 0
9) Add custom mount matrix:
Code:
$ sudo nano /etc/udev/hwdb.d/61-sensor-local.hwdb
# /etc/udev/hwdb.d/61-sensor-local.hwdb
sensor:modalias:*sc7a20:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
# above matrix might not be correct rotation matrix: just testing
10) Update hwdb:
Code:
$ sudo systemd-hwdb update
11) Register trigger:
Code:
$ sudo udevadm trigger -v -p DEVNAME=/dev/iio:device1
/sys/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
12) Get device info (note: shows new mount matrix):
Code:
$ udevadm info -n /dev/iio:device1
P: /devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
M: iio:device1
R: 1
U: iio
T: iio_device
D: c 252:1
N: iio:device1
L: 0
E: DEVPATH=/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
E: DEVNAME=/dev/iio:device1
E: DEVTYPE=iio_device
E: OF_NAME=accelerometer
E: OF_FULLNAME=/i2c@fe5e0000/accelerometer@18
E: OF_COMPATIBLE_0=silan,sc7a20
E: OF_COMPATIBLE_N=1
E: MAJOR=252
E: MINOR=1
E: SUBSYSTEM=iio
E: USEC_INITIALIZED=9020319
E: ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
13) Repeat sensor test above:
Code:
$ monitor-sensor --accel
[Same result]
14) Repeat get current mount matrix:
Code:
$ cat /sys/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1/mount_matrix
[Same result]
15) Journal shows nothing unless reboot with new settings:
Code:
$ journalctl --since=today | grep iio
pinetab2 kernel: iio iio:device1: interrupts on the falling edge or active low level
pinetab2 iio-sensor-prox[3129]: Could not find trigger name associated with /sys/devices/platform/fe5e0000.i2c/i2c-5/5-0018/iio:device1
I wasn't able to find any relevant leads by searching for terms from these journal entries.
Any suggestions?