This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: problem with launching a program

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3354

Tool/software: Linux

Hi~

I have ported ti-processor-sdk-linux-am335x-evm-05.02.00.10 to my am3354 board and got the Matrix GUI, but when I want to launch a test program it always takes two times.

My test program is a QT app, even I use "gst-play-1,0 test.avi" command to play an avi vedio,success comes in the second time.

  • Hello user4695541,

    Can you disable the matrix-gui and weston services with these commands and check whether your application will start at first attempt?
    root@am335x-evm:~# systemctl disable matrix-gui-2.0.service
    root@am335x-evm:~# systemctl disable weston.service
    root@am335x-evm:~# systemctl stop matrix-gui-2.0.service
    root@am335x-evm:~# systemctl stop weston.service
    root@am335x-evm:~# /etc/init.d/matrix-gui-2.0 stop
    root@am335x-evm:~# /etc/init.d/weston stop

    Use these two commands to re-enable the weston and matrix-gui services.
    root@am335x-evm:~# systemctl enable weston.service
    root@am335x-evm:~# systemctl enable matrix-gui-2.0.service

    Best regards,
    Kemal

  • hi,Kemal:
    Thank you for reply.
    After I used these commands and disabled the matrix-gui, my application can not work correctly.

    When testing my QT app, the console prints :
    Failed to create display (No such file or directory)

    When testing "gst-play-1.0 2.avi" commands, the console prints:
    WARNING Could not initialise Wayland output
    WARNING debug information: ../../../gst-plugins-bad-1.12.2/ext/wayland/gstwaylandsink.c(294): gst_wayland_sink_find_display (): /GstWaylandSink:waylandsink0:
    Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
  • So your application relies on wayland. Can you append -platform eglfs to the command line while running your application just to test what would happen?

  • When I run my application at first time, the app interface flashes across the screen. That means the program is still running, but you can't see the interface.
    Then the second start-up, everything is OK. So strange.

    I append -platform eglfs, the console prints :

    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Permission denied [0, ]
    EGL Error : Could not create the egl surface: error = 0x3003

    Aborted (core dumped)
  • Can you stop the weston (/etc/init.d/weston stop) then retry with the appended -platform eglfs?

  • When I stop the weston and run my app with the appended -platform eglfs, it works and interface can be seen on the screen !

    The console prints:
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).


    So is it weston affect my program startup? What does "-platform eglfs" mean?
    Do I need to append -platform eglfs to every my app? I tried without it, The console prints: Failed to create display (No such file or directory)
  • user4695541 said:
    When I run my application at first time, the app interface flashes across the screen. That means the program is still running, but you can't see the interface.


    This sounds like a race condition between two applications who tries to bring themselves to front. Is there any other application (like matrix gui) running on the background, when you are running your application?


    user4695541 said:
    So is it weston affect my program startup? What does "-platform eglfs" mean?

    "-platform eglfs" means that your application in running with eglfs backend in full screen mode. See this page for more details.


    user4695541 said:
    Do I need to append -platform eglfs to every my app?

    Since you are using gst-play in you application, it may also try to acquire the SGX resources which are already occupied by wayland. You need to find out that first, before making a decision whether to use "-platform eglfs" in every your application or not.

  • NO, no other application except matrix gui. I used tisdk-rootfs-image-am335x-evm.tar.xz file system. Shortly after power on, the matrix gui starts itself.
  • Can you disable only the matrix-gui with these commands and check whether your application will start at first attempt?
    root@am335x-evm:~# systemctl disable matrix-gui-2.0.service
    root@am335x-evm:~# systemctl stop matrix-gui-2.0.service
    root@am335x-evm:~# /etc/init.d/matrix-gui-2.0 stop

    You can use this command later to re-enable the matrix-gui service, if you want.
    root@am335x-evm:~# systemctl enable matrix-gui-2.0.service
  • Yes, my application can start at first attempt after I disable only the matrix-gui .