cancel
Showing results for 
Search instead for 
Did you mean: 

Am I the first one trying to run openstlinux-eglfs/st-example-image-qt on stm32mp157c-dk2?

AndreyN
Associate III

Hi Folks,

I am trying to build openstlinux-eglfs/st-example-image-qt using yocto/openstlinux distribution (please see details below) for stm32mp157c-dk2 board. After fixing compilation problem with qt3d (scene2d example failed to compile) I was able to boot from SD card.

There is STM background on HDMI and bootloader splashscreen on attached screen (which remains black if no HDMI connected). Whatever example I am trying to run using seral console, they does not work with following errors:

root@stm32mp1:/usr/share/examples/gui/openglwindow# ./openglwindow

No usable crtc/encoder pair for connector "DSI1"

qt.qpa.input: X-less xkbcommon not available, not performing key mapping

Could not set DRM mode for screen HDMI1 (Permission denied)

Could not queue DRM page flip on screen HDMI1 (Permission denied)

(last message repeated continuously)

I would highly appreciate any hints how to make eglfs image/examples work.

Best regards,

Andrey.

~/stm32mp157c-dk2/Distribution-Package/openstlinux-4.19-thud-mp1-19-02-20$ bitbake st-example-image-qt

WARNING: You have included the meta-gnome layer, but 'x11' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-gnome README for details on enabling meta-gnome support.

Loading cache: 100% |########################################################################################################################################################| Time: 0:00:00

Loaded 3526 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION          = "1.40.0"

BUILD_SYS           = "x86_64-linux"

NATIVELSBSTRING     = "ubuntu-19.04"

TARGET_SYS          = "arm-openstlinux_eglfs-linux-gnueabi"

MACHINE             = "stm32mp1"

DISTRO              = "openstlinux-eglfs"

DISTRO_VERSION      = "2.6-snapshot-20190830"

TUNE_FEATURES       = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"

TARGET_FPU          = "hard"

DISTRO_CODENAME     = "thud"

ACCEPT_EULA_stm32mp1 = "1"

GCCVERSION          = "8.%"

PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"

meta-oe             

meta-gnome          

meta-xfce           

meta-initramfs      

meta-multimedia     

meta-networking     

meta-webserver      

meta-filesystems    

meta-perl           

meta-python         = "HEAD:f1511d254632a34c1deb51f4bf8b8c21e7423f51"

meta-st-stm32mp     = "HEAD:dcc955d6992cc46ce07440caaa5a17942776bbe6"

meta-qt5            = "HEAD:fd1f0f47312e7ee80e5ca65b8b2992cb068b1656"

meta-st-openstlinux = "HEAD:4e36cf0c7c7bdb24700a990f73afcda84cdcf0cf"

meta                = "HEAD:f0394e80a37f1da47042a1aa0487594f390603f9"

Initialising tasks: 100% |###################################################################################################################################################| Time: 0:00:08

Sstate summary: Wanted 373 Found 356 Missed 17 Current 2598 (95% match, 99% complete)

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

NOTE: Tasks Summary: Attempted 8069 tasks of which 8027 didn't need to be rerun and all succeeded.

NOTE: Writing buildhistory

Summary: There was 1 WARNING message shown.

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hello @AndreyN​ 

Please refer to this link for explanation.

https://wiki.st.com/stm32mpu/wiki/DRM_KMS_troubleshooting_grid

Note that it is incomplete, prior to launch demo you need to do :

root@stm32mp1:~# psplash-drm-quit

root@stm32mp1:~# export QT_QPA_EGLFS_ALWAYS_SET_MODE="1"

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Olivier GALLIEN
ST Employee

Hello @AndreyN​ 

Please refer to this link for explanation.

https://wiki.st.com/stm32mpu/wiki/DRM_KMS_troubleshooting_grid

Note that it is incomplete, prior to launch demo you need to do :

root@stm32mp1:~# psplash-drm-quit

root@stm32mp1:~# export QT_QPA_EGLFS_ALWAYS_SET_MODE="1"

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi Oliver,

Thank you very much for the hint! After entering two commands you mentioned, I am able to run qt examples (roughly the half of them, the rest is crashing =) ). The output is going to HDMI and not to board's display even if I boot without HDMI cable attached. Also, the error message "No usable crtc/encoder pair for connector "DSI1" " is still displayed in terminal. Are there any news regarding this issue? The last relevant post I found is 6 months old.

> Please refer to this link for explanation.

> https://wiki.st.com/stm32mpu/wiki/DRM_KMS_troubleshooting_grid

> Note that it is incomplete, prior to launch demo you need to do :

Maybe it is worth to extend the wiki page to make it easier for others to find required steps.

Do you eventually have an idea how to fix compile errors related to qt3d/scene2d example when compiling st-example-image-qt? Is it a known problem or would you like me to post more details?

Thank you,

Andrey.

RFirm
Associate II

Hello!

Someone solved how to change the output of the aplications to the board's display?

Thanks

AntonioST
ST Employee

The original post is more that one year old and based on the openstlinux version available at that time.

I have tested openstlinux-5.4-dunfell-mp1-20-06-24

https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package

I did not found the compile error reported above with qt3d.

With the DK2 board without HDMI cable I get the output on the board's LCD. After boot the board I typed:

root@stm32mp1:~# psplash-drm-quit

root@stm32mp1:~# /usr/share/examples/gui/openglwindow/openglwindow

While the display works fine, I get the info message

No modes available for output "HDMI1"

because in file /usr/share/qt5/cursor.json is listed HDMI1. Since HDMI is not connected, QT cannot get the video modes.

If you want to only use the display (no HDMI) and you are annoyed by the warning, you can replace in the file the line

 { "name": "HDMI1", "mode": "1280x720" }

with the DK2 display data

 { "name": "DSI1", "mode": "480x800" }

If you need to use different config file for different use cases, check the file /etc/profile.d/qt-eglfs.sh

It set QT_QPA_EGLFS_KMS_CONFIG=/usr/share/qt5/cursor.json

You can set the variable above before lunching the QT application, using a different script.

Trick from https://doc.qt.io/qt-5/embedded-linux.html

eglfs uses the full screen, that is not always welcome.

You can tell QT to use only part of the full display, e.g.

 { "name": "DSI1", "mode": "480x800", "size": "200x200" }

RFirm
Associate II

Thank you for your aswer!@AntonioST​ 

My cursor.json file was like this:

{ 
"device": "/dev/dri/card0",
 "hwcursor": false,
}

Then i added these 2 lines as you said:

 "name":"DSI1",

 "mode":"480x800"

so, my final file is like:

{
 "device": "/dev/dri/card0",
 "hwcursor": false,
 "name":"DSI1",
 "mode":"480x800"
}

It helped me to run Qt applications on the DSI screen.

But now im facing a new problem, the applications are freezing after few seconds running. I Tested some examples like openglwindow and my own qml aplications too. They both are freezing now.

Any sugestions about this?

Thank you in advance!