LVDS and HDMI display are not coming together IMX6 Apalis

Hello

I have IMX6 module plugged into the custom board which has HDMI output to monitor and LVDS display

I am trying to get both displays simultaneously using following reference Display Output, Resolution and Timings (Linux) | Toradex Developer Center

Setting UBoot commands can activate either of panels in my case e.g.

LVDS display
setenv vidargs 'video=mxcfb0:dev=ldb,if=RGB24 fbmem=32M'

HDMI Display
setenv vidargs ‘mxc_hdmi.only_cea=1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb0:off video=mxcfb2:off video=mxcfb3:off fbmem=32M’

But when I try to pass display arguments in UBoot for both displays (below command), I can see display on LVDS and black display on HDMI monitor. Please help me out. Thanks

setenv vidargs 'video=mxcfb0:dev=ldb,if=RGB24 mxc_hdmi.only_cea=1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off video=mxcfb3:off fbmem=32M' && saveenv && bootd

corresponding xrandr command output

root@apalis-imx6:~# xrandr 
Screen 0: minimum 240 x 240, current 1280 x 800, maximum 8192 x 8192
DISP4 BG - DI1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   U:1280x800p-59  60.00*+
   U:1920x1080p-59  59.94  
   U:1024x768p-60  60.01  
   U:800x600p-86  86.08  
root@apalis-imx6:~#

Yocto version is thud (2.6.4)

root@apalis-imx6:~# uname -a
Linux apalis-imx6 4.14.170-3.0.4+gbaa6c24240a4 #1 SMP Thu Jul 11 11:39:01 UTC 2024 armv7l armv7l armv7l GNU/Linux

DTS file is also attached which we use for our custom board. It has been patched with custom changes as compared to standard eval board dts file
imx6q-apalis-ixora-v1.1.dts (8.6 KB)

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Based on the information provided, it seems you are trying to enable dual display output on an iMX6 module with both LVDS and HDMI displays connected. The U-Boot environment variable vidargs you’ve set appears correct at first glance for enabling both displays. However, the issue of the HDMI display showing black while the LVDS display works as expected can be attributed to a few potential causes:

  1. Display Timing and Configuration: Ensure that the display timings and configurations for both the LVDS and HDMI displays are correctly specified in the vidargs. The mxc_hdmi.only_cea=1 parameter forces HDMI to use only CEA (Consumer Electronics Association) modes, which are standard for HDMI interfaces but might not be compatible with your specific HDMI display if it expects a different timing or resolution. Try removing this parameter to allow for more flexibility in the HDMI output settings.

  2. Framebuffer Memory Allocation: The framebuffer memory allocation (fbmem=32M) might be insufficient for both displays, especially at high resolutions. Try increasing this value to allocate more memory to the framebuffers, which might be necessary to support both displays at their respective resolutions and color depths.

  3. Device Tree Configuration: Since you are using a custom board and have mentioned that the DTS file has been patched, it’s crucial to ensure that the HDMI and LVDS outputs are correctly configured in the device tree. This includes verifying the pin configurations, display interfaces, and any other relevant settings that might affect display output. Ensure that both displays are enabled and correctly configured in the device tree.

  4. Kernel Version and Drivers: You mentioned using Linux kernel version 4.14.170. Ensure that this kernel version includes the necessary drivers and patches for supporting dual display output on the iMX6. Sometimes, specific patches or driver versions are required to enable certain hardware features or fix known issues.

  5. X11 Configuration: Since you’ve provided xrandr output, it’s clear you are using an X11 environment. Ensure that your X11 configuration (e.g., xorg.conf) correctly identifies and configures both displays. You might need to explicitly configure the X server to use both displays in a dual-head setup.

  6. Testing Different Configurations: As a troubleshooting step, try enabling only the HDMI display with the LVDS turned off, and vice versa, to isolate whether the issue is related to dual display support or specific to one of the displays.

  7. Reviewing Kernel Logs:

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

Real-Time Clock / RTC (Linux) | Toradex Developer Center.

I have tried out by removing mxc_hdmi.only_cea=1 parameter but same result. No HDMI display. Corresponding vidargs below
setenv vidargs 'video=mxcfb0:dev=ldb,if=RGB24 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off video=mxcfb3:off fbmem=32M' && saveenv && bootd

set the framebuffer memory to 64M doesn’t make any difference. I am not sure if that makes any difference

setenv vidargs 'video=mxcfb0:dev=ldb,if=RGB24 mxc_hdmi.only_cea=1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off video=mxcfb3:off fbmem=64M' && saveenv && bootd

As mentioned both displays one at a time working but not simultaneously so I can rule out this possibility

This point is most possibly the case. I am not sure how I make sure dual display possibility in the kernel level

I am not very deep into the xrandr display configuration

As mentioned both displays one at a time working but not simultaneously so I can rule out this possibility

Not helpful

Hi @Usman !

I would like to ask some questions regarding your setup:

Best regards,

Hi @henrique.tx

I am using Apalis iMX6Q 2GB IT V1.1C module. This module is plugged into our custom board which has capability to display output on LVDS and HDMI
thumbnail_20240816_113559

My yocto is old. Yocto version is thud (2.6.4). It has no tdx-info receipe.
I have manually installed tdx-info and following is the out below

We are running old version since we do not much really need to update the software frequently due to project work and current software is working stable enough for our needs. Now we need to add dual display option in our current distribution

Hi @Usman!

Thanks for the additional info.

Please keep in mind that newer releases are not only important to have access to newer features and better/up-to-date implementations, but also to have a more secure device since new bugs are found and fixed constantly. Continuing using old software (e.g. Linux Kernel itself) can be seen a making your system more vulnerable to known bugs/attacks.

Therefore the recommendation is to bring your system to a reasonably up-to-date release.

Regarding the dual display setup, I found this old thread where a possible set of kernel arguments is shared. Have you tried like this?

Also, in the link you shared (Display Output, Resolution and Timings (Linux) | Toradex Developer Center) it states:

[…] one might have to tweak the framebuffer timings or adapt the kernel sources to use different clock parents for the different framebuffers. The clock tree in /sys/kernel/debug/clk/clk_summary can be used to debug the issue.

Have you looked into this?

Best regards,

Hi @Usman!

I need to fix an information I shared previously:

You are using Yocto release 2.6 (Thud), which I mistakenly read as BSP release version 2.6 from Toradex. You are actually using BSP release version 3 from Toradex, which is not EOL’d as of now.

Sorry for this mistake. I removed the wrong information from my previous message.

Best regards,

Hello @Usman,

Are you sure the HDMI display is not working with this setup?
It should be functional, but not your primary display.
The LVDS display configured under mxcfb0 will be your primary display.

To test this, can you try to run the following command:

dd if=/dev/urandom of=/dev/fb2 bs=8M count=1

If the display is working, you should see random pixels on the HDMI screen.
Please let me know if you can confirm the HDMI display is working with this setup.


Now, if the HDMI display is working, you are probably missing the X11 configuration to use both screens.
The following documentation should be helpful in this case: X-Server (Linux) | Toradex Developer Center

Best Regards,
Bruno

1 Like

I think the configuration is same as mentioned in this thread. Let me share mine here again if you see different then please let me know

root@apalis-imx6:~# ./tdx-info 

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           4.14.170-3.0.4+gbaa6c24240a4 #1 SMP Thu Aug 31 08:43:19 UTC 2023
Kernel command line:      enable_wait_mode=off vmalloc=400M ip=off root=PARTUUID=c388fc57-02 ro,noatime rootfstype=ext4 rootwait fec_mac=00:14:2d:a1:ba:29 consoleblank=0 no_console_suspend=1 console=tty1,115200n8 video=mxcfb0:dev=ldb,if=RGB24, bpp=18 video2=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 video=mxcfb2:off video=mxcfb3:off ldb=dul1 fbmem=32M
Distro name:              NAME="TDX X11"
Distro version:           VERSION_ID="2.6-snapshot-20230509"
Distro variant:           -
Hostname:                 apalis-imx6
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.1
Toradex version:          0028 V1.1C
Serial number:            10598953
Processor arch:           armv7l
------------------------------------------------------------
mxcfb2: fb@1 {
                compatible = "fsl,mxc_sdc_fb";
                disp_dev = "hdmi";
                interface_pix_fmt = "RGB24";
                mode_str ="1920x1080M@60";
                default_bpp = <16>;
                int_clk = <0>;
                late_init = <0>;
                status = "disabled";
        };

        mxcfb3: fb@2 {
                compatible = "fsl,mxc_sdc_fb";
                disp_dev = "lcd";
                interface_pix_fmt = "RGB565";
                mode_str ="CLAA-WVGA";
                default_bpp = <16>;
                int_clk = <0>;
                late_init = <0>;
                status = "disabled";
        };

&ldb {
	status = "okay";
	lvds-channel@0 {
		reg = <0>;
		fsl,data-mapping = "spwg"; /* "jeida"; */
		fsl,data-width = <24>;
		crtc = "ipu2-di1";
		primary;
		status = "okay";

		display-timings {
			/delete-property/800x600;
			/delete-property/1024x768;
			/delete-property/1920x1080;

			native-mode = <&timing_wxga>;
			timing_wxga: 1280x800 {
				clock-frequency = <71100000>;  /* <68930000> */

				/delete-property/hsync-active;
				/delete-property/vsync-active;

				hactive = <1280>;
				vactive = <800>;
				hfront-porch = <16>;
				hback-porch = <16>;
				hsync-len = <128>;		/* <82 160 200> */
				vfront-porch = <14>;
				vback-porch = <3>;
				vsync-len = <6>;		/* <10 23 29> */
				pixelclk-active = <1>;
			};
		};
		lvds0_out: endpoint {
			remote-endpoint = <&panel_in_lvds0>;
		};
	};
	lvds-channel@1 {
		status = "disabled";
	};
};

TBH I dont know to what value I can change in the clock. I didn’t change it. I have shared the output of clock summary in text file
clk_summary.txt (22.4 KB)

with this command I see random pixels on the screen, means HDMI screen is working

I’ve been through this page. Unfortunately the configuration for dual display is not properly described. After some trial with following xorg.conf I see the bootlogs in the LVDS display and after that display is switched to HDMI and my Qt application is displayed on HDMI display. I want same application runs on both screens. (I have commented out Screen 1 otherwise LVDS display flickers. Is it related to clock???)

/etc/X11/xorg.conf

Section "Device"                                                                                                                                                                                                                            
    Identifier "HDMI"                                                                                                                                                                                                                       
    Driver     "vivante"                                                                                                                                                                                                                    
    Option     "fbdev" "/dev/fb2"                                                                                                                                                                                                           
    Option     "vivante_fbdev" "/dev/fb2"                                                                                                                                                                                                   
    Option      "HWcursor"  "false"                                                                                                                                                                                                         
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "Device"                                                                                                                                                                                                                            
    Identifier  "i.MX Accelerated Framebuffer Device"                                                                                                                                                                                       
    Driver      "vivante"                                                                                                                                                                                                                   
    Option      "fbdev"     "/dev/fb0"                                                                                                                                                                                                      
    Option      "vivante_fbdev" "/dev/fb0"                                                                                                                                                                                                  
    Option      "HWcursor"  "false"                                                                                                                                                                                                         
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "ServerFlags"                                                                                                                                                                                                                       
    Option "BlankTime"  "0"                                                                                                                                                                                                                 
    Option "StandbyTime"  "0"                                                                                                                                                                                                               
    Option "SuspendTime"  "0"                                                                                                                                                                                                               
    Option "OffTime"  "0"                                                                                                                                                                                                                   
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "Monitor"                                                                                                                                                                                                                           
    Identifier "FrontMonitor"                                                                                                                                                                                                               
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "Monitor"                                                                                                                                                                                                                           
    Identifier "HDMIMonitor"                                                                                                                                                                                                                
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "Screen"                                                                                                                                                                                                                            
    Identifier "FrontScreen"                                                                                                                                                                                                                
    Monitor    "FrontMonitor"                                                                                                                                                                                                               
    Device     "i.MX Accelerated Framebuffer Device"                                                                                                                                                                                        
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Section "Screen"                                                                                                                                                                                                                            
    Identifier "HDMIScreen"                                                                                                                                                                                                                 
    Monitor    "HDMIMonitor"                                                                                                                                                                                                                
    Device     "HDMI"                                                                                                                                                                                                                       
EndSection                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                            
Section "ServerLayout"                                                                                                                                                                                                                      
    Identifier "Test1"                                                                                                                                                                                                                      
    Screen 0   "HDMIScreen"                                                                                                                                                                                                                 
#    Screen 1   "FrontScreen"                                                                                                                                                                                                               
EndSection

I think clk is fine because if it is issue of clk then either display shows corrupted screen.

In my case boot logs are shown in the LVDS screen and HDMI monitor is black. After the boot logs, LVDS screen is frozen and Qt application is shown in the HDMI screen. The content shown in either of the screens is clear and not corrupted

Hello @Usman,

Unfortunately screen mirroring is not supported by the Vivante X driver.
This should be possible using Weston, which we support in newer versions of the Linux BSP.

Another possible approach here would be to use Qt shared objects and start an application for each of the screens, but this increases the complexity of the implementation.
We have a demo of this, mirroring to a webgl platform plugin: GitHub - toradex/lowpower: Low Power Demo QML based + QtRemote demo

Best Regards,
Bruno

Can you please tell me from which BSP version weston is supported?

Then from my side this thread can be closed. Thanks for the support

Hello @Usman,

We support Weston since BSP 5.
However, I would recommend that you go to BSP 6, as it will be supported for longer.

Best Regards,
Bruno

1 Like