No video on HDMI display

Hello @emilfors ,

Can you run the following command after you have connected the USB power for the screen and paste the output here?

/usr/bin/appcontroller /usr/bin/startupscreen
root@b2qt-apalis-imx8:~# appcontroller /usr/bin/startupscreen 
qt.core.qobject.connect: QObject::connect: signal not found in QProcess
"FB_MULTI_BUFFER" "2"
"QTWEBENGINE_DISABLE_SANDBOX" "1"
"QT_IM_MODULE" "qtvirtualkeyboard"
"QT_QPA_EGLFS_FORCE888" "1"
"QT_QPA_EGLFS_FORCEVSYNC" "1"
"QT_QPA_EGLFS_KMS_ATOMIC" "1"
"QT_QPA_EGLFS_KMS_CONFIG" "/etc/kms.conf"
"QT_QPA_PLATFORM" "eglfs"
"WAYLAND_DISPLAY" "/run/wayland-0"
"XDG_RUNTIME_DIR" "/run/user/0"
"/usr/bin/startupscreen" QList()
Cannot create window: no screens available
Process stopped
quit

I’m currently working on an attempt to listen to the QGuiApplication::primaryScreenChanged signal, and not perform anything related to the GUI until that has been received. Hoping that it will be sent to my app when the Qt environment realizes the screen has been connected.

Nope, that didn’t help. Primary screen never changes :confused:

I managed to find a solution that might work for you :

To force a default mode when the EDID is not received correctly I set the tdxargs and video arguments instead if injecting an EDID blob.
To do that :

  • Connect to the board via serial console
  • In that console, hold a key while booting the system. This will interrupt the boot and give you access to the console. Just like this :
Apalis iMX8 #
  • In the console type:
env print

That will display all the environment variables.

  • Copy and save somewhere the value of video in case you want to restore it.
  • Then set the video and tdxargs values by typing

env set video 'HDMI-A-1:1080x1920'
env set tdxargs 'video=HDMI-A-1:1080x1920'
env save
  • Then you can reset the board.

To force the restart of the startupscreen service until the HDMI is plugged in, I modified the startupscreen.service , which is located in /lib/systemd/system/

[Unit]
Description=Boot to Qt Startup Screen
After=systemd-user-sessions.service
ConditionPathExists=!/usr/bin/b2qt

[Service]
User=root
ExecStart=/usr/bin/appcontroller /usr/bin/startupscreen
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target

The Restart and RestartSec lines do the magic :slight_smile:

Please let me know if it works. This is just one way to solve it, there might be others.

Best regards,
Josep

1 Like

Hi Josep,

Thank you. Unfortunately, I can’t stop the bootloader and because there is no fw_setenv in my system I can’t change the variable values that way either.
I don’t think it’s needed though, as I can see that with the forced EDID, if I do restart the application after the display is connected then everything works. There’s something happening during application startup that doesn’t happen if the display becomes available only after that.
I am going to try now to modify the application so it starts in a headless state if there is no display (it needs to perform some communications no matter what), and then have a udev rule restart it after the display is connected. If it works it’s not the cleanest of solutions, but might be enough for my purposes. I’ll let you know!

1 Like

Hi @emilfors ,
Thanks for the update :slight_smile: , and don’t hesitate to come back to us or have a look at the community if you need additional help.

Best regards,
Josep