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
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
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 :
Apalis iMX8 #
env print
That will display all the environment variables.
env set video 'HDMI-A-1:1080x1920'
env set tdxargs 'video=HDMI-A-1:1080x1920'
env save
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
Please let me know if it works. This is just one way to solve it, there might be others.
Best regards,
Josep
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!
Hi @emilfors ,
Thanks for the update , and donāt hesitate to come back to us or have a look at the community if you need additional help.
Best regards,
Josep