Bug 447154 - Automatic screen rotation is inverted in 90 degree (left/right) on 2-in-1 laptop.
Summary: Automatic screen rotation is inverted in 90 degree (left/right) on 2-in-1 lap...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.23.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-18 02:05 UTC by Alan
Modified: 2022-01-12 08:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan 2021-12-18 02:05:24 UTC
SUMMARY
***
I've got a 2-in-1 laptop. The automatic screen rotation works well but when I flip the screen to the left or to the right (90 degree), the screen is inverted (the task bar is located above whereas it should be at the bottom). So, it is no good. iio-sensor-proxy is installed and my laptop is well defined in 60-sensor.hwdb file (ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1).
***


STEPS TO REPRODUCE
1. Start a Plasma Wayland Session
2. Enable Automatic screen rotation, even when not in tablet mode
3. Turn my laptop in all directions. 

OBSERVED RESULT

Normal mode = ok.
360 degree= ok.
90 degree left= screen inverted.
90 degree right= screen inverted.

EXPECTED RESULT

90 degree left= screen not inverted.
90 degree right= screen not inverted.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Manjaro 21.2 rc1
KDE Plasma Version:  5.23.4
KDE Frameworks Version: 5.88
Qt Version: 5.15.2
Comment 1 Zamundaaa 2021-12-21 14:28:54 UTC
Please check the output of "monitor-sensor" for whether or not the rotation sensor itself is working correctly, it's most likely a driver bug / hardware quirk
Comment 2 Alan 2021-12-22 13:56:28 UTC
Hello,

here are the results of monitor-sensor:

Right: Right-up
Horizontal: normal
Left: Left-up.

Thanks 

Regards.
Comment 3 Nate Graham 2022-01-11 23:25:02 UTC
Works fine for my 2-in-1 FWIW, so it's at least not universally broken.
Comment 4 Zamundaaa 2022-01-12 08:05:06 UTC
Definitely a driver / configuration issue then. AFAIK right should be "left up" and vice versa, the ACCEL_MOUNT_MATRIX probably needs adjusting