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.

TDA2EVM5777: kmscube error:display 0 failed to set mode: Permission denied

Part Number: TDA2EVM5777

The development board I use is TDA2EVM5777, the HDMI monitor is connected, and the software version is PROCESSOR_SDK_VISION_03_08_00_00_setuplinux. I ran the OpenGL example on this basis, and the result was that the HDMI monitor did not display anything. The debug information is as follows:

root@dra7xx-evm:~/test# ./kmscube
### Display [0]: CRTC = 31, Connector = 29, format = 0x34325258
 Mode chosen [1920x1080] : Clock => 128480, Vertical refresh => 60, Type => 72
 Horizontal => 1920, 1939, 1943, 1952, 0
 Vertical => 1080, 1090, 1092, 1097, 0
### Primary display => ConnectorId = 29, Resolution = 1920x1080
Using display 0x1 with EGL version 1.4
EGL Version "1.4 build 1.17@4948957"
EGL Vendor "Imagination Technologies"
EGL Extensions "EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import"
display 0 failed to set mode: Permission denied

What is the reason why HDMI cannot be displayed? How can i solve this problem?

  • Linux/DRA745: kmscube : display 0 failed to set mode: Permission denied - Processors forum - Processors...

    e2e.ti.com
    Part Number: DRA745 Tool/software: Linux Evm log as below: dra7xx-evm login: _____ _____ _ _ | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ | | _| .'| . |

    Thanks

    Gaviraju

  • I followed the suggestions in the link you gave, and the HDMI monitor did not display anything as before, and the debug information did not change.

    root@dra7xx-evm:~# /etc/init.d/weston stop
    Stopping Weston
    Terminated
    root@dra7xx-evm:~#
    root@dra7xx-evm:~# cd test/
    root@dra7xx-evm:~/test# ./
    kmscube         openglunderqml 
    root@dra7xx-evm:~/test# ./kmscube
    ### Display [0]: CRTC = 31, Connector = 29, format = 0x34325258
     Mode chosen [1920x1080] : Clock => 128480, Vertical refresh => 60, Type => 72
     Horizontal => 1920, 1939, 1943, 1952, 0
     Vertical => 1080, 1090, 1092, 1097, 0
    ### Primary display => ConnectorId = 29, Resolution = 1920x1080
    Using display 0x1 with EGL version 1.4
    EGL Version "1.4 build 1.17@4948957"
    EGL Vendor "Imagination Technologies"
    EGL Extensions "EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import"
    display 0 failed to set mode: Permission denied
    root@dra7xx-evm:~/test#

  • Hi,

    Two questions:

    1. Can you please run modetest and share the output?
    2. Does the default kmscube work? It will be present in /usr/bin/kmscube

    Regards

    Karthik

  • 1.Can you please run modetest and share the output?

    root@dra7xx-evm:~# modetest
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    Encoders:
    id crtc type possible crtcs possible clones 
    Connectors:
    id encoder status  name  size (mm) modes encoders
    CRTCs:
    id fb pos size
    Planes:
    id crtc fb CRTC x,y x,y gamma size possible crtcs
    Frame buffers:
    id size pitch
    root@dra7xx-evm:~#
    2.Does the default kmscube work? It will be present in /usr/bin/kmscube
    root@dra7xx-evm:~# ps |grep kmscube
      881 root      2360 S    grep kmscub
    root@dra7xx-evm:~# kmscube -a
    ### Enabling all displays
    ### Display [0]: CRTC = 31, Connector = 29, format = 0x34325258
     Mode chosen [1920x1080] : Clock => 128480, Vertical refresh => 60, Type => 72
     Horizontal => 1920, 1939, 1943, 1952, 0
     Vertical => 1080, 1090, 1092, 1097, 0
    ### Primary display => ConnectorId = 29, Resolution = 1920x1080
    Using display 0x1 with EGL version 1.4
    EGL Version "1.4 build 1.17@4948957"
    EGL Vendor "Imagination Technologies"
    EGL Extensions "EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import"
    display 0 failed to set mode: Permission denied
  • Hi,

    I have a new problem: the above kmscube error is caused by egl cannot be initialized:

    root@dra7xx-evm:~# eglinfo
    PVR:(Error): WSEGL_InitialiseDisplay: Failed to create output [0, ]
    Unable to initialise egl
    egl error 'EGL_NOT_INITIALIZED' (0x3001)

    The reason why egl has this error is still unknown.

    I am a little doubtful whether the driver version of sgx does not match or is caused by other reasons. Running pvrsrvctl will also report some error messages:

    root@dra7xx-evm:~# pvrsrvctl --start --no-module
    [ 2228.453790] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
    PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (129) [0, ]
    pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_SRV_CONNECT_FAILED)
    root@dra7xx-evm:~# cat /proc/pvr/version
    Version SGX_DDK_Linux_XOrg sgxddk 1.17@4948957 (release) omap_linux
    System Version String: SGX revision = 116
    root@dra7xx-evm:~# uname -a
    Linux dra7xx-evm 4.19.73 #3 SMP PREEMPT Tue Sep 15 10:54:39 CST 2020 armv7l GNU/Linux
    root@dra7xx-evm:~# gles1test1
    PVR:(Error): WSEGL_InitialiseDisplay: Failed to create output [0, ]
    'eglInitialize' returned egl error 'EGL_NOT_INITIALIZED' (0x3001)
    root@dra7xx-evm:~#

    Now I don’t know what to do. I’m contacting the TDA2 platform for the first time, and I also hope that God will give some advice.

  • Hi,

    • By default, weston application is automatically launched when the power on the board. In order to run the kmscube application, we need to stop the weston application. The step to stop weston application is 
    /etc/init.d/weston stop

    • Unfortunately, the above step is not working in the Vision SDK. So I followed the below steps to stop the weston application.
    root@dra7xx-evm:~# ps | grep weston
     1125 root     66052 S    weston --idle-time=0
     1132 root     10000 S    /usr/libexec/weston-keyboard
     1133 root     17780 S    /usr/libexec/weston-desktop-shell
    
    
    root@dra7xx-evm:~# kill 1125
    

    • launch the kmscube application
    root@dra7xx-evm:~# kmscube &

    • Follow the below steps to view the o/p on the display
    root@dra7xx-evm:~# cd /opt/vision_sdk/
    root@dra7xx-evm:/opt/vision_sdk# ./vision_sdk_load.sh
    root@dra7xx-evm:/opt/vision_sdk# ./apps.out
    

    Choose the option 1 & 8 from the menu, now you can see the o/p on the display

    Thanks

    Gaviraju

  • Hi,

    This can indeed make HDMI display the picture output by apps.out, but my ultimate goal is to make HDMI display the OpenGL picture I wrote myself, such as running kmscube -a, there should be gl rendering output, but HDMI does not have any Output.

    root@dra7xx-evm:~# /etc/init.d/weston stop
    Stopping Weston
    Terminated
    root@dra7xx-evm:~# ps | grep weston
      847 root     66056 S    weston --idle-time=0
      856 root      9984 S    /usr/libexec/weston-keyboard
      857 root     17768 S    /usr/libexec/weston-desktop-shell
      872 root      2360 S    grep weston
    root@dra7xx-evm:~# kill 847
    root@dra7xx-evm:~#
    root@dra7xx-evm:~# kmscube -a &
    [1] 873
    root@dra7xx-evm:~# ### Enabling all displays
    ### Display [0]: CRTC = 31, Connector = 29, format = 0x34325258
     Mode chosen [1920x1080] : Clock => 128480, Vertical refresh => 60, Type => 72
     Horizontal => 1920, 1939, 1943, 1952, 0
     Vertical => 1080, 1090, 1092, 1097, 0
    ### Primary display => ConnectorId = 29, Resolution = 1920x1080
    Using display 0x1 with EGL version 1.4
    EGL Version "1.4 build 1.17@4948957"
    EGL Vendor "Imagination Technologies"
    EGL Extensions "EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import"
    root@dra7xx-evm:~#
  • Hi,

    You should run the apps.out in the Vision SDK in order to view the OpenGL o/p on the Display because the Display module is controlled by IPU core & VDRM will pass the rendered o/p buffer from Linux to the Display link running on the IPU.  

    Please follow the steps mentioned in my previous post, you will see the kmscube o/p on the display.

    or

    You can go with PSDKLA 6.03 instead of Vision SDK, here all the HW module is controlled by Linux including Display. When you launch the kmscube application in the PSDKLA then you will see the O/P on the display.

    Thanks

    Gaviraju

  • Thanks for your reply, but I'm still confused.

    Can PSDKLA 6.03 support my development board? I think the official information supports AM57x.

  • Hi,

    I already tried on the TDA2x EVM & it's working successfully. We need to choose the appropriate DTB file according to our board.

    I used dra7-evm.dtb for tda2x platform & it's available in the /boot/ directory.

    Thanks

    Gaviraju