cancel
Showing results for 
Search instead for 
Did you mean: 

qt5 stm32mp135

MWoło.2
Senior II

Hi,

I encounter a performance issue on the qt5 application on STM32MP135. I build a simple application with three plaintextedit objects showing temperature with 1s period from ds18b20. Everything compiles well and works, but the refreshing temperature on plaintextedit consumes 80% of the CPU (only refreshing after that go to 10% or less)

Maybe someone has a similar problem to my. The same application on STM32MP157 works perfectly response on the screen and consumes only 10 to 20% in peak on CPU load. 

In my opinion, something is wrong with the compilation options

I built it like for STM32MP157 without accepting EULA (this model has no graphics on board).

 

bitbake -k st-example-image-qt -c populate_sdk
bitbake -k st-example-image-qt

 

 Thanks for any hints

BR

Michal

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @MWoło.2 ,
Different things to mention. MP157 has a GPU while MP135 does not have, that already make a huge difference.
But that is not all. In fact, as MP13 has no GPU, it can try to pass through MESA libraries that can take a lot of resources.
To have the best performances that the MP13 can offer, I recommend the following modifications:

- In Yocto, add a qtbase_git.bbappend to give QT5 a new config flags:
qtbase_git.bbappend:

QT_CONFIG_FLAGS += " -linuxfb "

Then to run your application, I advice you a script that export different variable that will help to have better performances. Inside them, you also ask to use the linuxfb  platform that you ask to add at qt5 compilation just before:

launch_script.sh:

#!/bin/sh
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
export QT_QPA_EGLFS_KMS_CONFIG=/home/root/config/qt_config.json
#export QT_FONT_DPI=96
#export QT_QPA_EGLFS_HIDECURSOR=1
export QT_QPA_EGLFS_KMS_ATOMIC=1
#export QML2_IMPORT_PATH=~/imports/
#export PATH=/usr/local/qt5-install/bin/:/usr/local/apitrace/bin:$PATH
export QSG_NO_DEPTH_BUFFER=1
export QSG_NO_STENCIL_BUFFER=1
export QSG_NO_CLEAR_BUFFERS=1
export QT_QPA_PLATFORM=linuxfb # because the default built into Qt is eglfs
export QT_QPA_FB_DRM=1 # otherwise it uses /dev/fbX which doesn't exist
export QT_QUICK_BACKEND=software
#export QT_QPA_EGLFS_DEBUG=1

sleep 1
psplash-drm-quit
sleep 1
(cd <your_bin_folder> && ./<your_app>)

I supposed that you went through the EGLFS image, that is the recommended one on MP13 instead of qtwayland

I hope that it well improve your perfs,
Kind regards,
Erwan.

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
Erwan SZYMANSKI
ST Employee

Hello @MWoło.2 ,
Different things to mention. MP157 has a GPU while MP135 does not have, that already make a huge difference.
But that is not all. In fact, as MP13 has no GPU, it can try to pass through MESA libraries that can take a lot of resources.
To have the best performances that the MP13 can offer, I recommend the following modifications:

- In Yocto, add a qtbase_git.bbappend to give QT5 a new config flags:
qtbase_git.bbappend:

QT_CONFIG_FLAGS += " -linuxfb "

Then to run your application, I advice you a script that export different variable that will help to have better performances. Inside them, you also ask to use the linuxfb  platform that you ask to add at qt5 compilation just before:

launch_script.sh:

#!/bin/sh
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
export QT_QPA_EGLFS_KMS_CONFIG=/home/root/config/qt_config.json
#export QT_FONT_DPI=96
#export QT_QPA_EGLFS_HIDECURSOR=1
export QT_QPA_EGLFS_KMS_ATOMIC=1
#export QML2_IMPORT_PATH=~/imports/
#export PATH=/usr/local/qt5-install/bin/:/usr/local/apitrace/bin:$PATH
export QSG_NO_DEPTH_BUFFER=1
export QSG_NO_STENCIL_BUFFER=1
export QSG_NO_CLEAR_BUFFERS=1
export QT_QPA_PLATFORM=linuxfb # because the default built into Qt is eglfs
export QT_QPA_FB_DRM=1 # otherwise it uses /dev/fbX which doesn't exist
export QT_QUICK_BACKEND=software
#export QT_QPA_EGLFS_DEBUG=1

sleep 1
psplash-drm-quit
sleep 1
(cd <your_bin_folder> && ./<your_app>)

I supposed that you went through the EGLFS image, that is the recommended one on MP13 instead of qtwayland

I hope that it well improve your perfs,
Kind regards,
Erwan.

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 Erwan

I try and let You know.

Thanks

Best Regards

Michal

Hi Erwan,

One shortly question

export QT_QPA_EGLFS_KMS_CONFIG=/home/root/config/qt_config.json

The 'qt_config.json' is an existing file somewhere or is created during the application start-up?

Thanks

BR

Michal

@MWoło.2 ,
I took an old script that I had in the hand a long time ago, I am not sure about this param. If I remember well, I think that you can write a specific config file and mention its localisation as it has been done here, but you can remove this variable if you do not have a config file at this path.

Let me know when you will have tried.

Kind regards,
Erwan.

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.
MWoło.2
Senior II

Hi Erwan,

working perfectly, I just commented this line with json. Really huge difference between running application using script and without.

Thanks a lot

BR

Michał