Bug 437326 - Automatic screen rotation on X11 (already works on Wayland)
Summary: Automatic screen rotation on X11 (already works on Wayland)
Status: REOPENED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.8
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-18 21:49 UTC by Marian Klein
Modified: 2023-09-27 21:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Klein 2021-05-18 21:49:03 UTC
SUMMARY
In display settings/configuration 
( that you can invoke also with
marian@HPSpectre:~$ systemsettings5 kcm_kscreen
)
add a new checkbox with label auto-orientation.
It is a missing feature in KDE especially useful for tablets/touchscreens and convertible laptops with touchscreens.

Take advantage of the binary /usr/bin/monitor-sensor  (package iio-sensor-proxy in ubuntu/debian) to detect orientation of the hardware (normal, inverted , sideways) from accelerometer and use this status to change the screen orientation with xrandr or equivalent automatically on background/deamon.

See https://gist.github.com/mildmojo/48e9025070a2ba40795c
(marian556, mikelduke)
https://github.com/mikelduke/rotate-touchscreen

STEPS TO REPRODUCE
 missing feature
Comment 1 Marian Klein 2021-05-18 22:56:16 UTC
make sure it works also with wayland (and Xorg) and with HiDPI
Comment 2 David Edmundson 2021-05-18 23:03:23 UTC
It does.

Please ensure QtSensors and all runtime deps are installed
Comment 3 Marian Klein 2021-05-18 23:15:21 UTC


I have kubuntu 21.04 (hirsute)

marian@HPSpectre:~$ apt search QtSensors
Sorting... Done
Full Text Search... Done
python3-pyqt5.qtsensors/hirsute 5.15.4+dfsg-1 amd64
  Python 3 bindings for QtSensors module

python3-pyqt5.qtsensors-dbg/hirsute 5.15.4+dfsg-1 amd64
  Python 3 bindings for QtSensors module (debug extension)

python3-pyside2.qtsensors/hirsute 5.15.2-1 amd64
  Python bindings for Qt5 Sensors module (Python 3)

qml-module-qtsensors/hirsute,now 5.15.2-2 amd64 [installed]
  Qt 5 Sensors QML module

qtsensors5-doc/hirsute,hirsute,now 5.15.2-2 all [installed]
  Qt 5 Sensors documentation

qtsensors5-doc-html/hirsute,hirsute 5.15.2-2 all
  Qt 5 Sensors HTML documentation

qtsensors5-examples/hirsute,now 5.15.2-2 amd64 [installed]
  Qt 5 sensors examples

Is it this qml-module-qtsensors ?
Comment 4 Marian Klein 2021-05-18 23:22:56 UTC
I installed qml-module-qtsensors
and the feature is still not present.
Display configuration has no new feature.
Please explain how to enable from user perspective (not developer perspective) the automatic screen rotation on sensor/accelarator input in KDE,  if that is possible at all.
Comment 5 Marian Klein 2021-05-18 23:32:09 UTC
Libraries and components for the developers implementing the feature is not sufficient. The KDE user interface (configuration/settings) with the feature must be available by default and must be intuitive enough and placed in the prominent and appropriate location Display configuration for the user to notice and take advantage of it.
Comment 6 Nate Graham 2021-05-19 17:39:48 UTC
There is a UI for this already available on Wayland, exactly where you're asking for it to be. :)  Are you using X11?
Comment 7 Marian Klein 2021-05-19 17:53:47 UTC
Yes. I am using X11, because there is no hardware acceleration for 4k video decoding videos in chrome on wayland. It does work on X11 though. Also scaling for HiDPI does not work consistently on wayland. Is there a plan to backport feature to X11? Why the feature is wayland related only? I will test it on wayland though.
Comment 8 Nate Graham 2021-05-19 17:57:16 UTC
I'm not totally familiar with the technical details, but I believe we were not easily able to backport support to X11. There are a lot of features that are Wayland-only because Wayland's basic architecture makes them possible in a way that is not easily possible on X11 without a lot of fragile hacks.
Comment 9 Marian Klein 2021-05-19 23:12:04 UTC
I can confirm the feature works for Wayland. 
Reducing the scope of this to X11/Xorg. I still would like to see it working 
for Xorg/X11.
Reopening this one last time. 
Wayland still has many issues , than can prevent many people to switch.
Comment 10 Marian Klein 2021-05-20 19:42:40 UTC
Is wishlist a synonym for 'never gonna happen' bin?
Comment 11 Nate Graham 2021-05-20 19:46:06 UTC
No.

But if I'm being honest, this is probably in the "never gonna happen" bin anyway, for reasons unrelated to its classification as a wishlist.