cancel
Showing results for 
Search instead for 
Did you mean: 

st-example-image-qt Qt examples extremely slow

EduardG
Associate II

Hello, I'm testing the st-example-image-qt, but when I launch the Qt examples works extremely slow, looks like Qt doesn't use the hardware acceleration.

Any clue about it?

Best Regards

Eduard

1 ACCEPTED SOLUTION

Accepted Solutions
Bernard PUEL
ST Employee

Hello Eduard,

I/ The problem probably comes from the fact you may not have accepted the EULA (gcnano is under Third party licensing).

you should have on your board:

root@stm32mp1:~# cat /etc/lsb-release.d/graphics-1.0 

LIBGLES1=gcnano-userland-multi-binary-stm32mp

II/ Here is my complete build process for reference:

  • I use the release from Github:

$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-4.19-thud-mp1-19-02-20

  • Then I patch the partition size of rootfs to be able to flash it (in meat-st-stm32mp layer):

conf/machine/include/st-machine-common-stm32mp.inc

# New value proposed for rootfs is 768MB

-ROOTFS_PARTITION_SIZE = "768432"

+ROOTFS_PARTITION_SIZE = "1400000"

  • Then for the setup and build (make sure you accept the EULA:(

$ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

$ bitbake st-example-image-qt

Depending on your host PC, sometimes the builds does not succeed (see: https://community.st.com/s/question/0D50X0000AVSWK1SQP/what-is-the-process-for-initializing-the-openembedded-build-environment-stexampleimageqt).

Here is my build setup:

$ source layers/meta-st/scripts/envsetup.sh 

[HOST DISTRIB check]

Linux Distrib: Ubuntu

Linux Release: 16.04

[BUILD_DIR configuration]

Selected BUILD_DIR: build-openstlinuxeglfs-stm32mp1

[source layers/openembedded-core/oe-init-build-env][with previous config]

===========================================================================

Configuration files have been created for the following configuration:

  DISTRO      : openstlinux-eglfs

  DISTRO_CODENAME  : thud

  MACHINE      : stm32mp1

  BB_NUMBER_THREADS : <no-custom-config-set>

  PARALLEL_MAKE   : <no-custom-config-set>

  BUILD_DIR     : build-openstlinuxeglfs-stm32mp1

  DOWNLOAD_DIR   : /local/github/openstlinux-4.19-thud-mp1-19-02-20/build-openstlinuxeglfs-stm32mp1-disco/downloads

  SSTATE_DIR    : /local/github/openstlinux-4.19-thud-mp1-19-02-20/build-openstlinuxeglfs-stm32mp1-disco/sstate-cache

  SOURCE_MIRROR_URL : <no-custom-config-set>

  SSTATE_MIRRORS  : <no-custom-config-set>

  WITH_EULA_ACCEPTED: YES

===========================================================================

Available images for OpenSTLinux layers are:

 - Official OpenSTLinux images:

   st-image-weston    -  OpenSTLinux weston image with basic Wayland support (if enable in distro)

 - Other OpenSTLinux images:

   - Supported images:

     st-image-core     -  OpenSTLinux core image

   - Proposed images as example only:

     st-example-image-qt  -  ST example of image based on QT framework  (require 'openstlinux-eglfs' distro)

     st-example-image-x11 -  ST example of image based on X11      (require 'openstlinux-x11' distro)

     st-example-image-xfce -  ST example of image based on XFCE framework (require 'openstlinux-x11' distro)

     and more images are available on meta-st-openstlinux/recipes-samples/images.

You can now run 'bitbake <image>'

View solution in original post

7 REPLIES 7
Bernard PUEL
ST Employee

Hello,

first important information about this image: https://wiki.st.com/stm32mpu/wiki/QT_overview.

So performances of this image is really not the target. Which examples you considered "extremely slow" ?

Here are some trials I have done with correct behavior:

root@stm32mp1:~# psplash-drm-quit

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

root@stm32mp1:~# /usr/share/examples/opengl/hellowindow/hellowindow

root@stm32mp1:~# /usr/share/examples/opengl/cube/cube

EduardG
Associate II

Hello Bernard, thanks for you answer.

The hellowindow application looks well, but use the 100% of cpu.

0690X000008AstdQAC.png

The cube application move 1 frame each 3 seconds and use 100% of CPU.

0690X000008AsufQAC.png

We test the GTK environment and looks like use the gpu in correct way, but Qt looks like doesn't use it.

You can show the "extremely slow" examples in:

root@stm32mp1:/usr/share/examples/quick#

Best Regards

Eduard

Bernard PUEL
ST Employee

Hello Eduard,

Thanks for the detailed information. I would say your GPU is not working and all the job is done by the CPU. So probably a build issue or flashing issue.

I/ Could you please check on your board:

1. GPU kernel driver is well probed:

root@stm32mp1:~# dmesg | grep galcore

[   8.038278] galcore: loading out-of-tree module taints kernel.

root@stm32mp1:/usr/lib# lsmod | grep galcor

galcore              331776 0

2. user library are well installed (in "vendor" partition):

root@stm32mp1:~# ls -lisa /usr/lib | grep GLES

 8611    0 lrwxrwxrwx 1 root root      27 Mar 9 2018 libGLESv1_CM.so -> /vendor/lib/libGLESv1_CM.so

11595    0 lrwxrwxrwx 1 root root      24 Mar 9 2018 libGLESv2.so -> /vendor/lib/libGLESv2.so

23098    0 lrwxrwxrwx 1 root root      21 Mar 14 18:18 libGLESv2.so.2 -> /usr/lib/libGLESv2.so

II/ You can also check GPU load with netdata: just browse on your host PC the following page: http://<your board ip @>:19999/stm32.html.

See https://wiki.st.com/stm32mpu/wiki/Netdata for more details.

On my side I have the following results:

  • hellowindow (less than 10% cpu and 30% gpu):

0690X000008Au8EQAS.png

  • cube (around 10% cpu and 80% gpu):

0690X000008Au8sQAC.png

If you confirm the GPU issue, please check your build especially around the /vendor partition or during flashing (standard partition size need to be adapted for Qt image if you keep the webkit).

rgs,

Bernard

EduardG
Associate II

Hello Bernard, thaks a lot for your answer.

Answering your questions:

The module is not loaded, due that the st-example-image-qt doesn't generate the module.

The /lib in vendor folder doesn't exist.

I have make several test:

  • compile again the recipe st-example-image-qt without webkit and modifying the flashlayout in order to increase the space in sdcard partition, the installation finish without problems.
  • the  st-example-image-qt doesn't generate the galcore.ko module, is needed add the package "gcnano-driver-stm32mp" to st-example-image-qt.bb, then the galcore module appear in dmesg (is loaded by kernel)
  • The libGLES only is installed in /usr/lib/

/usr/lib/libGLESv2.so.2 -> libGLESv2.so.2.0.0

/usr/lib/libGLESv2.so.2.0.0

  • In /vendor doesn't appear any lib folder

Build Configuration:

0690X000008Ayt4QAC.png

Galcore kernel module:

0690X000008AytJQAS.png

After these changes we have the same issue, the system doesn't use the GPU.

Can you share the recipe for "st-example-image-qt" that are you using? looks like is not the same

Best Regards

Eduard Gavin

Bernard PUEL
ST Employee

Hello Eduard,

I/ The problem probably comes from the fact you may not have accepted the EULA (gcnano is under Third party licensing).

you should have on your board:

root@stm32mp1:~# cat /etc/lsb-release.d/graphics-1.0 

LIBGLES1=gcnano-userland-multi-binary-stm32mp

II/ Here is my complete build process for reference:

  • I use the release from Github:

$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-4.19-thud-mp1-19-02-20

  • Then I patch the partition size of rootfs to be able to flash it (in meat-st-stm32mp layer):

conf/machine/include/st-machine-common-stm32mp.inc

# New value proposed for rootfs is 768MB

-ROOTFS_PARTITION_SIZE = "768432"

+ROOTFS_PARTITION_SIZE = "1400000"

  • Then for the setup and build (make sure you accept the EULA:(

$ DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

$ bitbake st-example-image-qt

Depending on your host PC, sometimes the builds does not succeed (see: https://community.st.com/s/question/0D50X0000AVSWK1SQP/what-is-the-process-for-initializing-the-openembedded-build-environment-stexampleimageqt).

Here is my build setup:

$ source layers/meta-st/scripts/envsetup.sh 

[HOST DISTRIB check]

Linux Distrib: Ubuntu

Linux Release: 16.04

[BUILD_DIR configuration]

Selected BUILD_DIR: build-openstlinuxeglfs-stm32mp1

[source layers/openembedded-core/oe-init-build-env][with previous config]

===========================================================================

Configuration files have been created for the following configuration:

  DISTRO      : openstlinux-eglfs

  DISTRO_CODENAME  : thud

  MACHINE      : stm32mp1

  BB_NUMBER_THREADS : <no-custom-config-set>

  PARALLEL_MAKE   : <no-custom-config-set>

  BUILD_DIR     : build-openstlinuxeglfs-stm32mp1

  DOWNLOAD_DIR   : /local/github/openstlinux-4.19-thud-mp1-19-02-20/build-openstlinuxeglfs-stm32mp1-disco/downloads

  SSTATE_DIR    : /local/github/openstlinux-4.19-thud-mp1-19-02-20/build-openstlinuxeglfs-stm32mp1-disco/sstate-cache

  SOURCE_MIRROR_URL : <no-custom-config-set>

  SSTATE_MIRRORS  : <no-custom-config-set>

  WITH_EULA_ACCEPTED: YES

===========================================================================

Available images for OpenSTLinux layers are:

 - Official OpenSTLinux images:

   st-image-weston    -  OpenSTLinux weston image with basic Wayland support (if enable in distro)

 - Other OpenSTLinux images:

   - Supported images:

     st-image-core     -  OpenSTLinux core image

   - Proposed images as example only:

     st-example-image-qt  -  ST example of image based on QT framework  (require 'openstlinux-eglfs' distro)

     st-example-image-x11 -  ST example of image based on X11      (require 'openstlinux-x11' distro)

     st-example-image-xfce -  ST example of image based on XFCE framework (require 'openstlinux-x11' distro)

     and more images are available on meta-st-openstlinux/recipes-samples/images.

You can now run 'bitbake <image>'

EduardG
Associate II

Hello Bernad, thanks a lot for your answer.

You are right, just adding the EULA agreement, the GPU works like expected. (ACCEPT_EULA_stm32mp1 = "1" at local.conf)

CPU use "cube application"

0690X000008B30xQAC.png

GPU use "cube application"

0690X000008B317QAC.png

Thanks again for your help, we can continue testing the MPU features.

Best Regards

Eduard Gavin

Bernard PUEL
ST Employee

Very good !