Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Temporarily stop Qt5/QML from updating framebuffer (/dev/fb0)

On an embedded system, due to very specific hardware/software limitations, we need another program to be able to display info via the framebuffer (/dev/fb0), while keeping our Qt5/QML program running in the background.
We display a custom QQuickItem derived black rectangle (with nothing but a 'return' in the update()) in QML while the second program runs, but we still see flickering on our LCD display.
We surmise that QT is still painting the Screen Graph (possibly of other items layered beneath the rectangle) to /dev/fb0, thus causing flickering by both programs writing to /dev/fb0 at the same time.
We cannot use a second framebuffer approach (/dev/fb1) because the compositing increases processor loads dramatically such that the system becomes unusable.
One thought is iterate through screen graph tree, marking all nodes 'ItemHasContents' flag as false so the screen graph renderer will not write to FB, then re-enable when the secondary program finishes its task.
Another thought is to turn off rendering via the top level QWindow, but nothing in the documentation says this is even possible...
Is this possible via QT, or even though a shell script?

like image 768
Gio Avatar asked Dec 02 '25 21:12

Gio


1 Answers

/dev/fb0 sounds like you'd be working on a Linux-based system.

You're not saying whether you need the Qt application really continuing to run, just without screen updates, or whether simply "freezing" it while your other app uses the frame buffer would suffice.

If you are fine with the latter, the easiest solution to stop the Qt app from rendering is simply send it a SIGSTOP signal, it will freeze and cease to upgrade the frame buffer. Once you're done with the fb, send a SIGCONT signal. Sometimes the simplest approaches are the best...

like image 107
tofro Avatar answered Dec 05 '25 10:12

tofro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!