(continued from the "Dedoimedo" thread - which was a nice article, but so far has apparently produced exactly zero cases of working video acceleration for anybody, and on closer examination clearly never will, because it isn't even trying to do that...)
So, yeah - after updating to 21.04 today, the pi still has no video acceleration. Time to abandon this dead end and move on...
The problem is the Ubuntu side of things, not the MATE side. So If you want MATE with working hwaccel, you HAVE to start with the Raspbian image. I'm sure that if you're sufficiently determined you could get it to work on Ubuntu by building the Pi Foundation's kernel tree instead (and possibly also making custom builds of ffmpeg, VLC, MPV, etc), but after burning a LOT of days on this already, I decided to take the easy way out instead.
- Install Raspbian. To be exact: I used 2021-03-04-raspios-buster-armhf
- Install MATE, via
Now for the "fun" part...
Configuring lightdm to actually use MATE isn't difficult, but most of the search results you'll find will be either out of date (because lightdm's configuration gets a new set of random breaking changes every release) or just don't work.
The commands you need are
sudo update-alternatives --config x-window-manager and
sudo update-alternatives --config x-session-manager.
Once that's done, log out and back in, and you should have a MATE desktop.
The bad news is, it's a rather old version of MATE: only 1.20. The good news is, that's what shipped with 18.04, so you may be used to it anyway. Also, it doesn't have various 19.xx-and-later breakages, so it's actually less buggy than the current MATE release. (Unfortunately).
You will be missing a few really good pieces of MATE though: MATE Tweak, for example, appears to be Ubuntu-only; and most annoyingly, the hwsensors applet is also missing. Conky etc is an adequate replacement functionally, but is less attractive and much less convenient.
On the other hand, you get hardware video acceleration, and that's a more than fair tradeoff.
Accelerated video on the Pi is a long and complicated topic, and Pi's don't generally get a lot of use as desktops, so it's not especially surprising or unreasonable that Ubuntu hasn't bothered with it. What's puzzling is that, AFAICT, the kernel patches were mainlined in the kernel last autumn, so I can't understand how Ubuntu manages to not work, even if you rebuild the media players with MMAL support.
Regardless, the difference is night and day. On Ubuntu, trying to play a 1080p h265 video pegs all 4 cores at 100%, with all the usual frame-dropping etc you'd expect. (Overclocking can help a surprisingly large amount, but ultimately it's still just always going to suck).
On Raspbian, the same video takes less than 50% of ONE core: and most of that is apparently spent in IO wait, since the amout of CPU charged to the process in sysmon is 6%. So, yeah, that's quite a lot better.
There are plenty of LXDE leftovers scattered about. I haven't bothered removing them yet, but I doubtless will someday. If someone beats me to it for creating a list that can just be fed into an
apt purge, feel free to add it to this thread.
Anyway, after seven OS installs/upgrades, and days spent reading through the Pi develper logs and wasted on random articles that were uniformly either irrelevant or flat-out wrong, I finally have a DE I like and video acceleration that works. It's not perfect, but it's far far better overall than any of the versions that came before it.
In case you were curious: the Dedoimedo article is actually about getting OpenGL acceleration working. That's it. Nothing at all to do with video acceleration, other than that having a working GL layer lets VLC etc render into an OGL texture and use the HW to blit that onto the screen.