wrong auto-rotation using accelerometer with panel orientation property in drm connector
Affected version
postmarketOS/Alpine with Gnome 44.3 on wayland
Bug summary
The device is https://wiki.postmarketos.org/wiki/ASUS_Chromebook_Detachable_CZ1_(google-katsu)
This device has:
- panel mounted at 270 degrees, it's reported properly in
drm_info
command - accelerometer mounted at 180 degrees, udev rule is in place, so
monitor-sensor
command reports proper orientation
The problem is that auto-rotation doesn't work correctly and is wrong by +-90 degrees
Steps to reproduce
Use device with accelerometer and panel orientation quirk
What happened
Initially mutter sets proper orientation respecting property from drm connector (270 degrees), but it gets wrong by +-90 degrees when using accelerometer.
Orientation is correct when I block kernel module, so accelerometer is unavailable
What did you expect to happen
I expect mutter taking into account panel orientation when doing auto-rotate with accelerometer
Relevant logs, screenshots, screencasts etc.
Connector 0 part from drm_info command
├───Connectors
│ ├───Connector 0
│ │ ├───Object ID: 32
│ │ ├───Type: DSI
│ │ ├───Status: connected
│ │ ├───Physical size: 135x216 mm
│ │ ├───Subpixel: unknown
│ │ ├───Encoders: {0}
│ │ ├───Modes
│ │ │ └───1200x1920@60.00 preferred driver
│ │ └───Properties
│ │ ├───"EDID" (immutable): blob = 0
│ │ ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│ │ ├───"link-status": enum {Good, Bad} = Good
│ │ ├───"non-desktop" (immutable): range [0, 1] = 0
│ │ ├───"TILE" (immutable): blob = 0
│ │ ├───"CRTC_ID" (atomic): object CRTC = 53
│ │ └───"panel orientation" (immutable): enum {Normal, Upside Down, Left Side Up, Right Side Up} = Left Side Up