The `rotate` parameter for the touchscreen orientation does not work using environment variable QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS in QT5. e.g. QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/touch:rotate=90 has no effect. No value for rotation (90,180,270) has any effect. It used to work up until 2021.02 and stopped working since Buildroot 2021.05. Looking for the cause I found that since 2021.05 libxkbcommon (BR2_PACKAGE_LIBXKBCOMMON) and libinput (BR2_PACKAGE_LIBINPUT) are selected. In turn libevdev (BR2_PACKAGE_LIBEVDEV) is selected. Libinput and libxkbcommon are selected by BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM. As a quick check I removed the line 'source "package/kodi/Config.in"' form package/Config.in and rebuilt all in this case the touch-input rotation works. Kodi was never selected on the system. Would it make sense to only select libinput and libxkbcommon if BR2_PACKAGE_KODI is actually selected? I guess this affects all applications using QT5 with a rotated touch screen - can anyone confirm this issue?
I succeeded narrowing down the issue by commenting out "package/kodi/Config.in"' in package/Config.in and manually adding libraries. Adding only libevdev does not affect the behavior of QT. Adding libinput as well the touch screen rotation does no longer work. Apparently /usr/lib/qt/plugins/platforms/libqeglfs.so is dynamically linked against libinput if it is available during build time of Qt5.
It is not a bug but a behavior of Qt5 v5.15. (https://doc.qt.io/qt-5/inputs-linux-device.html) The issue can be solved/worked around in two different ways: Either: Disable the use of libinput (QT_QPA_EGLFS_NO_LIBINPUT=1) and continue using the environment variable QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/touch:rotate=90 OR: use the generic platform plugin configuration variable QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/touch:rotate=90
Thomas, All, (In reply to Thomas Ruschival from comment #0) > Looking for the cause I found that since 2021.05 libxkbcommon (BR2_PACKAGE_LIBXKBCOMMON) > and libinput (BR2_PACKAGE_LIBINPUT) are selected. In turn libevdev (BR2_PACKAGE_LIBEVDEV) > is selected. > Libinput and libxkbcommon are selected by BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM. Indeed, this code is incorrect; good catch! :-) I'll send a patch soonish to fix that. Regards, Yann E. MORIN.
Thomas, All, Thanks for the report. We believe the issue has now been fixed with commit b80c488d04 (package/kodi: fix selection of dependencies). Regards, Yann E. MORIN.