Hi, I am using an IMX6 board with freescale linux built using buildroot. I am running the X11 windowing system and trying to run a c++ QT application on both an LVDS touch screen and external HDMI display. Ideally the end solution involves a QT application running on the LVDS screen, then the user plugs in the HDMI and we move the application over to the HDMI screen instead without killing the application (long startup times).
I am using a device tree to configure the frame buffers and IPUs. The problem I am having is I can find no way to display on both the touch screen panel and the HDMI screen at the same time. The only solution that has worked so far has been enabling "Xinerama" in the xorg.conf file to mirror the display. However with this solution opengl does not work at all and our QT application requires opengl. Even worse it appears Xinerama causes QT 5.10 applications to crash on startup and requires a patch to the QT source code (see QTBUG-64928). Seeing as Xinerama won't work I would like to show the application on both screens using xrandr commads. I.e. something like:
xrandr --output <HDMISCREEN> --same-as <LVDSSCREEN>
In order to use the above command both screens must appear in the xrandr query. For some reason I can only get one to show up at a time. I have read that perhaps only one device can use the vivante driver at a time but have not found any official documentation on limitations. My question is why does xrandr only show a single device at a time when both are configured in the xorg.conf? Below is my example xorg.conf file and the output from xrandr
cat /etc/X11/xorg.conf
Section "Device" Identifier "FrontPanel" Driver "vivante" Option "fbdev" "/dev/fb0" Option "vivante_fbdev" "/dev/fb0" EndSection
Section "Device" Identifier "HDMI" Driver "vivante" Option "fbdev" "/dev/fb2" Option "vivante_fbdev" "/dev/fb2" EndSection
Section "Monitor" Identifier "FrontMonitor" EndSection
Section "Monitor" Identifier "HDMIMonitor" EndSection
Section "Screen" Identifier "FrontScreen" Monitor "FrontMonitor" Device "FrontPanel" DefaultDepth 24 EndSection
Section "Screen" Identifier "HDMIScreen" Monitor "HDMIMonitor" Device "HDMI" DefaultDepth 24 EndSection
Section "ServerLayout" Identifier "Test1" Screen 0 "FrontScreen" Screen 1 "HDMIScreen" EndSection Section "ServerLayout" Identifier "Test2" Screen 0 "HDMIScreen" Screen 1 "FrontScreen" EndSection
To try each server layout I just pass the identifier to the startx command and then look at the output of the xrandr query. In "Test1" the application runs on the LVDS and in "Test2" the application runs on HDMI, but never are both displays available, so the device tree is configured correctly.
startx -- -layout Test1
xrandr -q
Screen 0: minimum 240 x 240, current 1280 x 800, maximum 8192 x 8192
DISP3 BG connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
U:1280x800p-60 60.76*+
startx -- -layout Test2
xrandr -q
Screen 0: minimum 240 x 240, current 1920 x 1080, maximum 8192 x 8192
DISP4 BG - DI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
U:1920x1080p-60 60.00*+
S:1920x1080p-50 50.00
S:1920x1080p-30 30.00
S:1920x1080p-25 25.00
S:1920x1080p-24 24.00
S:1280x720p-60 60.00
S:1280x720p-50 50.00
S:720x576p-50 50.00
S:720x480p-60 59.94
V:640x480p-60 60.00
Hello Jordan,
One can check useful similar example developed by third party
Qt5 Demo Airport Check-in Dual Display with Toradex Colibri iMX6 - Favorite Videos
Available options are described in nxp linux documentation
https://www.nxp.com/webapp/Download?colCode=L4.14.78_1.0.0_LINUX_DOCS&appType=license&location=null
other features, not found in documentation may be supported with help of NXP Professional Services|NXP
Regards
I understand it is possible but I am asking about why I am experiencing a certain behavior. I have read through the documentation, specifically the "Chapter 10: XServer Video Driver" of "i.MX_Graphics_Users_Guide.pdf". The problem is, even in that chapter when they run 'xrandr' the output only lists a single connected screen, never multiple screens.
Am I not allowed to use the "vivante" driver for more than one fbdev at a time?
I can enable "Xinerama" and have HDMI to the right of the LVDS and just run an application in windowed mode and drag it over to the HDMI screen. This would be an exceptable solution if you could use opengl and Xinerama which you can not.