RPi4 & Ubuntu MATE - How to enable video acceleration - Dedoimedo

Dedoimedo has released an excellent tutorial on How to enable video acceleration on the Pi4 with Ubuntu MATE.

https://www.dedoimedo.com/computers/rpi4-ubuntu-mate-hw-video-acceleration.html

1 Like

Hi Frank,

Have you successfully enable OpenGL via the method described in the blog post?

Followed the post modified usercfg.txt the X is still on llvmpipe which is software rendering:

[email protected]:/usr/share/X11/xorg.conf.d$ glxinfo | grep OpenGL
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 10.0.1, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.2.0-devel (git-6cba468 2020-07-01 focal-oibaf-ppa)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 20.2.0-devel (git-6cba468 2020-07-01 focal-oibaf-ppa)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.2.0-devel (git-6cba468 2020-07-01 focal-oibaf-ppa)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

This is my usercfg.txt:

dtoverlay=vc4-fkms-v3d
#dtoverlay=vc4-kms-v3d-pi4
max_framebuffers=2
gpu_mem=128
hdmi_enable_4kp60=1
dtparam=spi=off
disable_overscan=1

I did. On a install using Wimpy's Desktopify script.

Did you follow the author's tests commands to see if 3D drives are loaded?

I was able to use OpenGL in both Firefox and VLC.

Yes, both already been okay

[email protected]:~cat /proc/device-tree/soc/[email protected]/status
[email protected]:~$ cat /proc/device-tree/v3dbus/[email protected]/status
[email protected]:~

The dmesg output also shows the driver was loaded:

[ 186.592458] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[ 186.592826] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[ 186.593130] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[ 186.593309] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[ 186.605997] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 186.606509] vc_sm_cma: module verification failed: signature and/or required key missing - tainting kernel
[ 186.607519] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 186.607529] [vc_sm_connected_init]: start
[ 186.619158] [vc_sm_connected_init]: installed successfully
[ 186.635797] mc: Linux media interface: v0.10
[ 186.670139] videodev: Linux video capture interface: v2.00
[ 186.756356] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 186.759297] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 186.771643] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 186.772391] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 186.787119] bcm2835-isp bcm2835-isp: bcm2835_isp_probe: ril.isp returned 1 i/p (1 expected), 2 o/p (3 expected) ports
[ 186.798027] bcm2835-isp bcm2835-isp: Unregister from media controller
[ 186.798036] (efault): Unregistering node (null)[0] device node /dev/video0
[ 186.798040] (efault): Unregistering node (null)[0] device node /dev/video0
[ 186.798043] (efault): Unregistering node (null)[0] device node /dev/video0
[ 186.798047] (efault): Unregistering node (null)[0] device node /dev/video0
...
[ 187.339454] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[ 187.339467] checking generic (3e3cf000 7f8000) vs hw (0 ffffffffffffffff)
[ 187.339471] fb0: switching to vc4drmfb from simple
[ 187.340065] Console: switching to colour dummy device 80x25
[ 187.340265] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 187.340269] [drm] No driver support for vblank timestamp query.
[ 187.340273] [drm] Setting vblank_disable_immediate to false because get_vblank_timestamp == NULL
[ 187.340758] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[ 187.561374] Console: switching to colour frame buffer device 240x67
[ 187.586096] vc4-drm gpu: fb0: vc4drmfb frame buffer device

I think it's the X11 part doesn't contains driver to use the HW GL engine.

If you have time please check the glxinfo | grep OpenGL on your Rpi4 Ubuntu Mate setup, see if you get different renderer up and running.