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.

AM335x + SGX + EGLFS = Device freezes (DRM drop/set master failed)

Hello,

I am using an ARM Sitara AM335x board (Kernel 4.1) for our QT Quick interface running on platform EGLFS.

We are using hardware acceleration with pvrsrvinit and omapdrm_pvr. (-platform EGLFS).

The application works just fine, until it eventually freezes. Actually, the whole device freezes.

It is very difficult for me to debug what’s happening, since when it freezes, I lose connection via serial communication, or ssh, and I can't log the cause of this issue.

The application service logs the following:

Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM drop masater failed
Apr 18 12:42:37 karimcitoh myserviceapplication[248]: DRM set master failed

This started happening after adding hardware acceleration: installing the kernel modules and using EGLFS. Nothing changed in the QT quick application (I don’t even use a for or a while loop).

Before, I used to run it on Xorg and it didn’t give any error or problem, but it was very slow, that’s why I needed to accelerate it, and switched to EGLFS.

Could it be a DRM issue? Any idea of how can I solve it? Would it be possible that I am using an old version of the graphic drivers? Or any other idea on how to analyse this more in depth?

Thank you so much in advance,

kind regards,

Karim

  • Hi,

    I will ask the software team to comment.
  • Hello Karim,

    Does the user karimcitoh in this system has root privileges?

    Best regards,
    Kemal

  • Hello Kemal,

    Thanks for your quick answer!
    No, the user running the processes does not have root privileges. What are the root privileges necessary for?

    Kind regards,
    Karim
  • Could you do one test with the root user, since the DRM set master and DRM drop master may fail due to insufficient permissions.
  • I tested it and run the application as root, and the error is gone.

    What permissions do I need exactly in order to not have this error?
    Could this errors be the reason why eventually the screen and the whole device freezes?

    Any idea which logs would be helpful to debug why is the device freezing and not responding anymore?
    Again, thank you so much for all your help and the quick answers!
    Kind regards,
    Karim
  • Also, the output of sgx_check.sh is the following:

    root@element-a080ae ~ # ./sgx_check.sh 
    WSEGL settings
    [default]
    #WindowSystem=libpvrDRMWSEGL_FRONT.so
    WindowSystem=libpvrDRMWSEGL.so
    DisableHWTQTextureUpload=0
    ParamBufferSize=1677216
    DefaultPixelFormat=RGB565
    ------
    ARM CPU information
    processor	: 0
    model name	: ARMv7 Processor rev 2 (v7l)
    BogoMIPS	: 597.68
    Features	: half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x3
    CPU part	: 0xc08
    CPU revision	: 2
    
    Hardware	: Generic AM33XX (Flattened Device Tree)
    Revision	: 0000
    Serial		: 0000000000000000
    ------
    SGX driver information
    Version SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@2253347 (release) omap335x_linux
    System Version String: SGX revision = 125
    ------
    Framebuffer settings
    ./sgx_check.sh: 12: ./sgx_check.sh: fbset: not found
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    ctr                     3348  2 
    ccm                     6983  2 
    iptable_filter          1361  1 
    xt_REDIRECT             1070  1 
    nf_nat_redirect         1382  1 xt_REDIRECT
    xt_tcpudp               1966  2 
    iptable_nat             1655  1 
    nf_conntrack_ipv4       6088  1 
    nf_defrag_ipv4          1326  1 nf_conntrack_ipv4
    nf_nat_ipv4             5172  1 iptable_nat
    nf_nat                 13538  2 nf_nat_redirect,nf_nat_ipv4
    nf_conntrack           66025  3 nf_nat,nf_nat_ipv4,nf_conntrack_ipv4
    ip_tables              10153  2 iptable_filter,iptable_nat
    x_tables               16603  4 ip_tables,xt_tcpudp,iptable_filter,xt_REDIRECT
    evdev                   9623  2 
    omapdrm_pvr           324041  4 
    pm33xx                  4511  0 
    omap_rng                4394  0 
    rng_core                7360  1 omap_rng
    uvcvideo               66796  1 
    smsc95xx               16588  0 
    usbnet                 24608  1 smsc95xx
    arc4                    1571  2 
    mii                     4785  2 usbnet,smsc95xx
    videobuf2_vmalloc       4741  1 uvcvideo
    omap_wdt                3607  0 
    edt_ft5x06              9864  0 
    usb_f_acm               5241  1 
    u_serial               10628  3 usb_f_acm
    g_serial                3199  0 
    libcomposite           43111  2 usb_f_acm,g_serial
    wlcore_sdio             5914  0 
    wl18xx                 84459  0 
    wlcore                168153  1 wl18xx
    mac80211              325244  2 wl18xx,wlcore
    cfg80211              207820  3 mac80211,wl18xx,wlcore
    fuse                   75671  1 
    autofs4                24739  2 
    ------
    Boot settings
    console=ttyO0,115200n8 consoleblank=0 root=/dev/mmcblk0p3 rootfstype=ext4 rootwait vram=50M
    ------
    Linux Kernel version
    Linux element-a080ae 4.1.13-element-ge845443-dirty #11 PREEMPT Thu Apr 7 16:04:23 UTC 2016 armv7l GNU/Linux