Running app on a specific frame buffer without X
-
Hi,
Can you explain what is the environment required to run an application on a specific frame buffer without the use of X11?I want to run a Qt app on fb1 which is implemented by a simple virtual frame buffer that doesn't run on X11.
By virtual frame buffer, I don't mean the Qt tool but a linux module that creates a virtual frame buffer device (/dev/fb1)
I launch the application by running this command :
sudo ./app -platform linuxfb:fb=/dev/fb1
It gives me a lot of these errors and nothing is written to the buffer :
QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::setCompositionMode: Painter not active
I managed to run the application using Xvfb which uses the X libraries, but I don't want to use it since X is kind of heavy for our purpose.
I am starting to suspect that Qt uses calls to the X library to paint things but i might be wrong.
Can you please confirm that this task is at least feasible; running a Qt application on a virtual frame buffer without the use of X11. If so, what can be the cause of all these errors?
My environment :
1 - Embedded system- Tegra Jetson TX1 running Ubuntu 16.04 (aarch64)
- Qt 5.11.02 compiled from the sources - opensource
2 - Development PC
- Ubuntu 16.04 running on VirtualBox VM
- Qt 5.11.02 installed from the online installer
I have the same behavior on both environments.
Thanks a lot. -
I'm answering my own question for other people.
It is possible to use a Qt app running on a custom made virtual linux frame buffer kernel module. In fact, my problem came from this module. It is its responsiblitity to set the channel bit fields according to the requested bits per color and there was a problem with that part.
It was already reported somewhere else on this forum that when Qt does not recognize color profile, it fails silently, making the paintEngine error hard to understand.
https://forum.qt.io/topic/84533/problems-getting-qt-running-on-embedded-device/8The bug has already been reported but is still unresolved :
https://bugreports.qt.io/browse/QTBUG-64169 -
I'm answering my own question for other people.
It is possible to use a Qt app running on a custom made virtual linux frame buffer kernel module. In fact, my problem came from this module. It is its responsiblitity to set the channel bit fields according to the requested bits per color and there was a problem with that part.
It was already reported somewhere else on this forum that when Qt does not recognize color profile, it fails silently, making the paintEngine error hard to understand.
https://forum.qt.io/topic/84533/problems-getting-qt-running-on-embedded-device/8The bug has already been reported but is still unresolved :
https://bugreports.qt.io/browse/QTBUG-64169@deejay2221 said in Running app on a specific frame buffer without X:
I'm answering my own question for other people.
is your issue solved then? If so please don't forget to mark your post as such. Thanks
-
Hi and welcome to devnet,
If you successfully used the proposed modifications from the bug reports, would you consider creating a submission to Qt for its inclusion ? That way you won't have to apply the patch again when you update your Qt version.