Recently I was asked to make a project work on a not-so-powerfull board based on the iMX6UL Processor.
The board isn’t that bad, until you try to run a GUI on it. The UL version of the iMX6 has no support for OpenGL, no support for EGLFS.
They tried to run chromium in kiosk mode, but it was laggy as hell. They have better luck with midori, but they miss a virtual keyboard, and every JS was laggy/buggy or simply ugly. Also they miss the finger scrolling. This could be addressed with some change in the UI of the web app, making long list paginated, but they don’t wan’t go this way.
So they asked my to check if there are other alternatives. I first tried to build a simple program with a QWebview to check if It could work and the performance was good but they still miss the virtual keyboard and the finger scrolling. I have to stick with QT 5.7 as they have this requirement.
So I cross compiled the QtVirtualKeyboard, enabled the module setting the required ENV var this way:
$ export QT_IM_MODULE=qtvirtualkeyboard
and then running the app.
This way a nice keyboard popup every time you tap on a editable field. Or at least it should. We found out that on the board it was so slow, you have wait the first load for the keyboard around 10 seconds, and then every time you press a button 2 seconds of patient was needed. Obviously not something a normal user would like. Also I had to fix a small glitch in the view of the keyboard. For some reason a black banner appeared on top of the keyboard, preventing the user to see the input. I forced the keyboard to be in full screen mode, modifying the default behavior in /src/virtualkeyboard/settings.cpp .
Qt Quick 2D Renderer for the rescue
After doing some research I realized that the keyboard relay on QtQuick2 that benefit and use HW acceleration a lot. I remembered the existence of an alternative renderer for platform where no acceleration was provided.
Qt Quick 2D Renderer use the Raster paint engine to render the contents of the scene graph instead of OpenGL [source code is available here ]. If you have already a QT Quick 2 build it’s really easy to build, else you need to spend some more time providing your build system OpenGL Dummy Libraries as they are needed to build QT Quick 2.
Build/Install and then set the ENV var:
Now if you run an app that use QT Quick 2 it will be rendered using Raster paint without any other modification. My test was promising, Keyboard was nice and responsive, the QML sample I build was rendered correctly and I was able to enter successfully text in any field.
So I build a QML App with a QWebView and here I had some troubles, as website was rendered wrong, squeezed and with vertical green line all over. I tried to use also QTWebKit and QtWebEngine [cross0 building], without any success.
If I got the keyboard working I got problem with the WebView and the other way around. Here I stopped my experiment as my client won’t go any further. They are evaluating to go the full QML way with the software renderer or upgrade the board with the iMX6 non UL processor.
I have the feeling that updating QT would help on most of the problem I had encountered, hopefully I’ll be able to hack a bit more on the device.