Qt for Rpi2 and GUI on LCD instead of HDMI
-
Hi everyone!
I cross compiled Qt for Rpi2, I can now run app from PC on raspberry but it always shows on HDMI output, not on my LCD connected by SPI. Here is specs of my LCD http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)I am beginner in Qt and Linux but I suppose problem is in configuration. Because I can only run app usin eglfs by default but my LCD using framebuffer fb1.
Is it possible to change output destination from hdmi to my LCD? I think it could be done by set QT_QPA_PLATFORM variable but I have no idea how to do that.
When I run app with -platform linuxfb:fb=/dev/fb1 it looks like on video:
VIDEOThanks
-
Hi paavo91,
with the nature of the bcm you can not set the eglfs platform plugin to use a different display than the hdmi out. LinuxFB can´t use the hardware acceleration.
One workaround we used is to run a deamon to copy the framebuffer of hdmi out to a spi lcd like in https://github.com/tasanakorn/rpi-fbcp.
This is working on a rpi2 with abut 10% processor time and also with redirecting the touch Input from the lcd to the application. -
@sneubert I dont know how to check it :( Only think I know I configured this LCD to use fb1 (in file /usr/share/X11/xorg.conf.d/99-fbturbo.conf)
I used this tutorial http://www.jarzebski.pl/blog/2015/06/19/jak-ozenic-wyswietlacze-waveshare-z-raspberry-pi-2.html
-
ok, i can´t read the text but in this tutuorial the xserver is started with
/etc/rc.local
so delete the linesu -l pi -c startx
from there and reboot. seems like xserver and your application are both writing to fb1, that´s why your Video shows this result.