carlonluca / pot

Raspberry Pi accelerated video/image rendering with Qt: custom QML components and QtMultimedia backend.
https://bugfreeblog.duckdns.org
GNU General Public License v2.0
177 stars 43 forks source link

Keyboard not working in 5.6.0-rc1 build #54

Closed floouuu closed 7 years ago

floouuu commented 8 years ago

Hello,

I noticed that the keyboard is not working for me in the Qt 5.6.0-rc1 build. For debugging purposes, I set the environment variable export QT_LOGGING_RULES=qt.qpa.*=true. When starting my qml application, I get the following log lines:

qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_brcm")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_brcm")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_brcm"
qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_brcm"
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
qt.qpa.input: libinput: input device 'Microsoft  Microsoft Basic Optical Mouse v2.0 ', /dev/input/event0 is tagged by udev as: Mouse
qt.qpa.input: libinput: input device 'Microsoft  Microsoft Basic Optical Mouse v2.0 ', /dev/input/event0 is a pointer caps
qt.qpa.input: libinput: input device 'Microsoft Wired Keyboard 600', /dev/input/event1 is tagged by udev as: Keyboard
qt.qpa.input: libinput: input device 'Microsoft Wired Keyboard 600', /dev/input/event1 is a keyboard
qt.qpa.input: libinput: input device 'Microsoft Wired Keyboard 600', /dev/input/event2 is tagged by udev as: Keyboard Joystick
qt.qpa.input: libinput: input device 'Microsoft Wired Keyboard 600', /dev/input/event2 is a keyboard
qt.qpa.input: X-less xkbcommon not available, not performing key mapping

Looks like the hardware is found, but the mapping does not work. I installed libxkbcommon0 and also libxkbcommon-x11-0 on the pi, but I still got the same error. After googling a bit I think it must have to do something with the configure options when compiling qt, see http://doc.qt.io/qt-5/configure-options.html#third-party-libraries. Is this the case?

Thank you, Florian

floouuu commented 8 years ago

Also from http://blog.qt.io/blog/2015/11/17/embedded-linux-news-in-qt-5-6/

Qt 5.5 introduced support for libinput when it comes to getting input events from keyboards, mice, touchpads, and touchscreens. Qt 5.6 takes this one step further: when libinput is available at build time, it will be set as the default choice in eglfs and linuxfb, replacing Qt’s own evdevkeyboard, mouse, and touch backends. In some rare cases this will not be desirable (for example when using evdevkeyboard-specific keyboard layouts from the Qt 4 QWS times), and therefore the QT_QPA_EGLFS_NO_LIBINPUT environment variable is provided as a means to disable this and force the pre-5.6 behavior.

Kind regards, Florian

floouuu commented 8 years ago

It's me again :-)

BTW, a quick workarround for the problem is setting the environment variable QT_QPA_EGLFS_NO_LIBINPUT at runtime:

export QT_QPA_EGLFS_NO_LIBINPUT=1

Kind regards, Florian

floouuu commented 7 years ago

Since the workarround is working quite nice for some time now, I will close the issue.