cancel
Showing results for 
Search instead for 
Did you mean: 

How to run "/usr/share/examples/gui/analogclock/analogclock" in "st-example-image-qtwayland"

zqizh.1
Associate II

Hi,

My test kit is STM32MP157C-DK2, the image is "st-example-image-qtwayland", the display is DSI display.

I tested with procedure:

1. run " /usr/share/examples/gui/analogclock/analogclock"

get error message:

"

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

[  1] Failed to open device: No such file or directory, Try again...

[  2] Failed to open device: No such file or directory, Try again...

[  3] Failed to open device: No such file or directory, Try again...

[  4] Failed to open device: No such file or directory, Try again...

[  5] _OpenDevice(1086): FATAL: Failed to open device, errno=No such file or directory.

"

2. weston.sh stop

3. run " /usr/share/examples/gui/analogclock/analogclock"

get error message:

"

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

Failed to create wl_display (Connection refused)

qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, xcb.

Aborted (core dumped)

"

Please advise how to run the QT example:"/usr/share/examples/gui/analogclock/analogclock"

Thanks,

QiZhang

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @zqizh.1​ 

Your configuration files seem to be ok.

About the steps you follow, could you confirm you only did the following ones:

PC $> DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
PC $> bitbake st-example-image-qtwayland

Then, you flashed your board with the built image and at the board prompt, you ran the command

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

From my board (stm32mp157c-dk2), I can see a small window showing the analog clock on the display.

Some questions I have:

  • what is your host development environment (ubuntu 20, Windows, virtualbox)?
  • could you send me the ouput log of the modetest command run from the board?
  • could you re-build a new image from scratch?

Anyway, don't focus on error messages when stopping weston: your qt applications in this image need weston to be active.

Best regards,

--JM

View solution in original post

7 REPLIES 7
Jean-Marc B
ST Employee

Hi @zqizh.1​ 

could you try to define the following environment variable please?

export QT_QPA_PLATFORM=wayland-egl

Then re-launch your application.

Best regards,

--JM

Hi JM,

There is no difference, please see the log.

0693W00000Kbc4oQAB.pngRgds,

QiZhang

Hi @zqizh.1​ 

I just rebuilt the st-example-image-qtwayland image and ran /usr/share/examples/gui/analogclock/analogclock without any trouble.

By the way, the environment variable QT_QPA_PLATFORM should not be set to wayland-egl but to wayland (it should be set by default when booting the board with the image as we see it from your log).

So there is another problem ;)

Which is your Distribution kit version please? Is it based on ecosystem-3.1 ?

Best regards,

--JM

 edit : fix for typo

zqizh.1
Associate II

Hi JM,

I refer to section 5 in 

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

to get the source code,

Then follow section 2.2 in 

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

to build image.

Rgds,

QiZhang

zqizh.1
Associate II

Hi JM,

Please check configuration file in the attachment.

Rgds,

QiZhang

Hi @zqizh.1​ 

Your configuration files seem to be ok.

About the steps you follow, could you confirm you only did the following ones:

PC $> DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
PC $> bitbake st-example-image-qtwayland

Then, you flashed your board with the built image and at the board prompt, you ran the command

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

From my board (stm32mp157c-dk2), I can see a small window showing the analog clock on the display.

Some questions I have:

  • what is your host development environment (ubuntu 20, Windows, virtualbox)?
  • could you send me the ouput log of the modetest command run from the board?
  • could you re-build a new image from scratch?

Anyway, don't focus on error messages when stopping weston: your qt applications in this image need weston to be active.

Best regards,

--JM

MBell.5
Associate III

Hi @zqizh.1​ 

you have to run the application from weston terminal,

try to open the terminal from your graphical interface and launch it from there....

or from a remote terminal using:

"DISPLAY:=0 <your_command>"

best regards

Mattia