Configure primary screen (left/right screen) for apalis iMX8


I’m trying to configure the primary screen for apalis iMX8, i want LVDS output is primary, HDMI is extended.

I was able to configure both display success, but HDMI is now default primary screen. This will produce problem with Qt application when the HDMI is unplug and re-plug.

After reseach, i try to add “priamry;” to imx8qp-apalis-v1-1.dtsi as below:

lvds-channel@0 {
fsl,data-mapping = “spwg”;
fsl,data-width = <24>;
status = “okay”;

But it doesn’t work.

I also try to config the weston.ini but i don’t find how.
The weston.log indicate that the HDMI always load first.

[05:41:26.611] DRM: head ‘HDMI-A-1’ found, connector 148 is connected, EDID make ‘PHL’, model ‘PHL 243V5’, serial ‘ZV0163101444’
[05:41:26.611] DRM: head ‘LVDS-1’ found, connector 151 is connected, EDID make ‘unknown’, model ‘unknown’, serial ‘unknown’

The imx6 have a way to configure by uboot but i don’t find how to do with imx8 because imx8 use drm-backend not fbdev backend.

I believe that it can be configured by device tree but i don’t know how yet.

Please help,
Many thanks,

TDX Wayland with XWayland 5.7.2+build.21 (dunfell) apalis-imx8-07314487 ttyLP1
Model: Toradex Apalis iMX8 QuadPlus 2GB V1.1C, Serial# 07314487

Hi @jorge.tx pls check

Hi All,

After investigating, i am still not find any official way to config.
However, i do a trick below:

echo off > /sys/class/drm/card1-HDMI-A-1/status
sleep 1
echo on > /sys/class/drm/card1-HDMI-A-1/status

after that, the LVDS become primary, :)).
So, i will apply this way if there are no better solution.


It might depend on your board QT and operating system you are using.
But in my case with yocto linux and b2qt QT6.4. I achieved it by changing the kms.conf file.

This might be helpfull if it works for you.

Following are the settings for me that works, LVDS is primary and QT app works on it.

b2qt-apalis-imx8:~:>cat /etc/kms.conf
“device”: “/dev/dri/card0”,

{ “name”:“LVDS1”, “mode”:“1280x800”, “size”:“1280x800”, “virtualIndex”:0 , “primary”: true },
{ “name”:“HDMI1”, “mode”:“3840x2160”,“size”:“1920x1080”,“virtualIndex”:1 }


“device”: “/dev/dri/card0”, : card0 or card1 might changes according to your board or device tree settings.


1 Like

Thank you for your guide,

i am using the yocto linux BSP 5.7.2 with Qt 5.14, that there is no /etc/kms.conf file.
I will try to rebuild the yocto linux version newer.