Boot2Qt 5.15 Dual Screen with HDMI and VGA

Hi Toradex Community,

I am currently trying to display a Qt application on two displays (same app with two windows).

Here is the current configuration I’m using:

  • SoM: Apalis iMX6 v1.1Y
  • Carrier Board: Apalis Evaluation Board
  • One 1920x1080 screen connected via DVI
  • One 1366x768 screen connected via VGA
  • Image is Boot2Qt 5.15.17 using Yocto 3.1.

Looking at the documentation here: https://developer.toradex.com/linux-bsp/application-development/multimedia/display-output-resolution-and-timings-linux/#imx-6-based-modules, I tried to set multiple outputs like so:

setenv vidargs video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=vdac,640x480M@60,if=RGB565 fbmem=32M

Doing this, no fb* gets detected in /dev and obviously my app gives

EGLFS: Failed to open /dev/fb0
EGLFS: Can’t continue without a display
Aborted

If I set VGA to fb2 instead of fb1:

setenv vidargs video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:dev=vdac,640x480M@60,if=RGB565 fbmem=32M

The HDMI display works, but VGA is still not found.

Individually, I’m able to get the HDMI display working, but not the VGA on its own.

What am I missing to make this work? Is this even possible with Apalis iMX6?

Thank you in advance!
Anthony

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Anthony,

Thank you for reaching out to the Toradex Community with your dual-screen setup query. Let’s work through the issue of your VGA display not being detected on the Apalis iMX6.

  1. Framebuffer Configuration: Ensure that each display is assigned to a separate framebuffer device. Your current vidargs settings should map HDMI to /dev/fb0 and VGA to /dev/fb1. Try the following configuration:

    setenv vidargs 'video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb1:dev=vdac,1366x768M@60,if=RGB565 fbmem=32M'
    

    This setup assumes mxcfb0 is for HDMI and mxcfb1 is for VGA. Adjust the resolutions and timings as needed.

  2. Kernel and Device Tree: Verify that your kernel and device tree support both HDMI and VGA outputs. Check the device tree for correct display node configurations and ensure necessary drivers are enabled.

  3. Debugging Tools: Use tools like fbset to check current framebuffer settings and modetest from the libdrm package to verify the DRM state. These can help confirm if the displays are recognized and configured correctly.

  4. Kernel Logs: Review kernel logs for any errors related to display initialization, which might provide clues on why the VGA display isn’t detected.

By following these steps, you should be able to resolve the issue with your VGA display. If you have further questions, feel free to ask.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

LVDS and HDMI display are not coming together IMX6 Apalis.

Please check this thread - Configures dual-screen display based on Qtwayland

Hi @alex.tx ,

Here’s an update on this topic.

First of all, it seems like I haven’t enabled the VGA overlay in the /boot/overlays.txt in the Boot Filesystem. I’ve done that and am now able to display my Qt App on that screen too.

However, it still cannot display simultaneously on both HDMI and VGA, either it is Duplicate or Extended mode.

I’ve looked into how Toradex Easy Installer handles that, since TEZI UI displays on both screens in duplicate mode. I’ve noticed that unlike Boot2Qt, TEZI uses Wayland instead of EGLFS.

So I’ve tried modifying my Yocto recipe to add Wayland, updated the /etc/xdg/weston/weston.ini file and ran my Qt app using the wayland platform, but I still get the same behavior.

Currently, weston.ini looks like this:

dle-time=0
shell=kiosk-shell.so
modules=screen-share.so
use-pixman=true

[output]
name=DPI-1
mode=1920x1080-32@60

[output]
name=HDMI-A-1
clone-from=DPI-1
fullscreen=true

[output]
name=LVDS-1
mode=off

[output]
name=VGA-1
clone-from=DPI-1
fullscreen=true

[screen-share]
command=/usr/bin/weston --backend=vnc-backend.so --shell=fullscreen-shell.so

[shell]
background-color=0xff000000
background-image=/usr/share/weston/wallpaper.png
background-type=centered
panel-position=none

which is identical as TEZI’s. However changing basic stuff, such as panel-position or transform, doesn’t seem to affect the display behavior.

I’ve also tried following what’s on your link regarding kms.conf and such, but I’m having trouble understanding the why’s, and it doesn’t seem to affect the result either.

Note: When running the Qt App, I notice that the other screen displays “OUT OF RANGE”, either it’s the HDMI or VGA monitor.

Thanks in advance,
Anthony

Just realized, there was an obvious missing line at the begin of weston.ini, fixed the file to look like this:

[core]
idle-time=0

[output]
name=DPI-1
mode=1920x1080-32@60

[output]
name=HDMI-A-1
clone-from=DPI-1

[output]
name=VGA-1
clone-from=DPI-1

[screen-share]
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize

[shell]
panel-position=none

I also changed the way I called weston to find the config file, like so:

weston --backend=fbdev-backend.so --tty=1 --config=/etc/xdg/weston/weston.ini

Now when I run my Qt app with --platform wayland, I can see some changes I apply to the file, such as panel-position.

The HDMI screen displays with weston followed by my app, and the VGA is still receiving some signal from the board, but only displaying OUT OF RANGE popup.

Most likely, your VGA display does not support the set resolution and/or pixel clock.
Try using a VGA display that supports the 1920x1080-32@60 mode or decrease the HDMI resolution to 1366x768.