Hardware graphics acceleration doesn't seem to be working

I’ve installed EOS on an (up to date) RPi 4 with community-sway (no desktop on install). Hardware graphics acceleration drivers seem to be properly loaded.

$ glxinfo | grep "renderer string"
OpenGL renderer string: V3D 4.2.14.0

However, something seem to be wrong. When I play an x264 or x265 video, I get constant frame drops and sluguish play. I use mpv and vlc.

With LibreELEC or OMSC, videos run smoothly…

By the way, the boot partition has config.txt and config.txt.orig. This is not from my install, but from the original image. Moreover, config.txt has twice dtoverlay=vc4-kms-v3d, one is commented, but rather confusing.

Any indication would be much appreciated.

The bootloader reads config.txt. You can ignore the config.txt.orig. We use our own config.txt so the original one is probably getting renamed. The commented lines aren’t also read in config.txt, so that isn’t the issue too. I usually don’t have that good of an experience watching videos on the raspberry pi, I haven’t tried LibreELEC or OMSC though. Is this a new issue, was it playing fine in the past?

Can you check if ffmpeg-m2m package is installed? I had good results in the past using it but I haven’t updated it in a long while

PKGBUILDS/ffmpeg-m2m at main · endeavouros-arm/PKGBUILDS

Thx for the quick reply!

I know that but I think a clean install should be precisely that, clean. Having config.txt.orig and repeated lines in config files can be confusing for newbies (and for experienced users too).

I just mentioned it to be clear in that it is not a hardware issue but a distro (or user) one.

So it seems :sweat_smile:

$ sudo pacman -S ffmpeg-m2m 
[sudo] password for cedricmc: 
resolving dependencies...
warning: cannot resolve "libdav1d.so=6-64", a dependency of "ffmpeg-m2m"
warning: cannot resolve "libvidstab.so=1.1-64", a dependency of "ffmpeg-m2m"
warning: cannot resolve "libvpx.so=7-64", a dependency of "ffmpeg-m2m"
warning: cannot resolve "libx265.so=199-64", a dependency of "ffmpeg-m2m"
$ pacman -Qo /usr/lib/lib{dav1d,vidstab,vpx,x265}.so
/usr/lib/libdav1d.so is owned by dav1d 1.5.1-1
/usr/lib/libvidstab.so is owned by vid.stab 1.1.1-2
/usr/lib/libvpx.so is owned by libvpx 1.15.0-1
/usr/lib/libx265.so is owned by x265 4.1-1
$ sudo pacman -Sd ffmpeg-m2m 
resolving dependencies...
looking for conflicting packages...
:: ffmpeg-m2m-5.1.2.r85.g105c1cbdf4-1 and ffmpeg-2:7.1.1-5 are in conflict. Remove ffmpeg? [y/N] y

Package (2)             Old Version  New Version              Net Change  Download Size

ffmpeg                  2:7.1.1-5                             -37.15 MiB               
endeavouros/ffmpeg-m2m               5.1.2.r85.g105c1cbdf4-1   32.87 MiB      13.33 MiB

Total Download Size:   13.33 MiB
Total Installed Size:  32.87 MiB
Net Upgrade Size:      -4.28 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 ffmpeg-m2m-5.1.2.r85.g105c1...    13.3 MiB  3.48 MiB/s 00:04 [----------------------------------] 100%
(1/1) checking keys in keyring                                [----------------------------------] 100%
(1/1) checking package integrity                              [----------------------------------] 100%
error: ffmpeg-m2m: signature from "Sravan Pannala <sradjoker@endeavouros.com>" is unknown trust
:: File /var/cache/pacman/pkg/ffmpeg-m2m-5.1.2.r85.g105c1cbdf4-1-aarch64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).

You probably need a different version of ffmpeg than what is used in the archlinuxarm repos. That’s how you get smooth video afaik. IIRC i got the ffmpeg-m2m package structure from LibreELEC or some other similar project in the past because I was also facing video issues on the raspberry pi. They have their own patched ffmpeg too.

The reason why you are getting sugglish play is that hardware encoding is done by the VPU and isn’t used by default. The Pi uses v42l2m2m protocol which the ffmpeg-m2m package enables. Thats where the m2m name comes from too.

Wonder if @Pudge has anything to share here.

I have both installed, ffmpeg and ffmpeg-rpi, the first of which is a dependency of mpv (no wonder why it does not work smoothly). However the second is a dependency for vlc-rpi, whose GUI won’t work because of some wayland problem…

[VLC media player 3.0.21 Vetinari (revision 3.0.21-0-gdd8bfdbabe8)
[0000aaaacc7e84b0] main xml reader error: XML reader not found
[0000aaaacc71c660] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

The CLI, cvlc, does work though, with frame drops, as mpv. Moreover, I have installed ffmpeg-rpi-bin (and removed ffmpeg to do so) and ffplay also shows frame drops. I infer that there are also some problems with ffmpeg-rpi

1 Like