AnsweredAssumed Answered

X11 mate-screensaver immediate Deadlock with Vivante GPU drivers... what solution suggestions?

Question asked by Luis Mendes on Aug 19, 2017
Branched to a new discussion



I've prepared a rootfs with Ubuntu Mate 17.04 and kernel imx4.1.15_2.0.0. Vivante X11 GPU drivers (obtained from Yocto Pyro) were installed and configured. I'm using a Technexion EDM1-CF module on Fairy baseboard with a I.MX6Q SoC.

libdrm was recompiled with the drm-update-arm.patch and re-installed, xserver-xorg was also recompiled and modified to recognize Vivante GPU as well as to update DRI code dependence on drm-update-arm.patch.

X11 works fine along with Open GL accelerated applications, although I suspect that performance is not as high as reported by some users, for instance glxgears -info reports the following:

GL_RENDERER   = Vivante GC2000
GL_VERSION    = 2.1 2.0.1
GL_VENDOR     = Vivante Corporation
GL_EXTENSIONS = WGL_ARB_extensions_string WGL_EXT_extensions...

VisualID 33, 0x21
329 frames in 5.0 seconds = 65.746 FPS
348 frames in 5.0 seconds = 69.522 FPS
335 frames in 5.0 seconds = 66.912 FPS
374 frames in 5.0 seconds = 74.726 FPS

Above test was made at 1280x720 screen resolution.

Although X11 works along with Open GL accelerated applications, once Ubuntu Mate screensaver starts, or simply opening the screensaver preferences dialog window causes an immediate Deadlock on X11 windowing system.

Typically if a reboot is performed, a kernel oops can be seen in dmesg referencing drm_legacy_lock_free(...) kernel function as the deadlock origin. The kernel oops output is:


CPU: 0 PID: 1737 Comm: mate-screensave Tainted: G           O    4.1.15-g6223605
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)                      
task: cc203dc0 ti: ccd38000 task.ti: ccd38000                                   
PC is at drm_legacy_lock_free+0x30/0x100                                        
LR is at __local_bh_enable_ip+0x60/0xf0   

Further kernel oops details in attached file kernel_oops.txt.


The deadlock only occurs with the Vivante GPU driver, that is, if X is started with software accelerated Mesa OpenGL, no deadlock is observed and screensaver works properly. The same is true if open-source Etnaviv GPU driver from a Vanilla kernel is used with Mesa OpenGL, provided that export MESA_GL_VERSION_OVERRIDE="2.1" is performed before running the screensaver from a terminal window.


Suggestions for solving the Deadlock are welcome!!!

Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to: