Orange Pi 5 Hardware Acceleration enabled?

Is Hardware Acceleration enabled on Orange Pi 5?

I don’t think so, at least not in the Bullseye image. But probably on the Bookworm image with a more recent Mesa drivers. Last resort is a 3rd party repository to install an even newer Mesa version and probably some closed source Mali driver from Rockchip (EDIT: firmware only) + builds for common GUI applications which make use of it: panfork mesa to support mali g610 : JianFeng Liu

curl -sSf 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9b2e0427d79318c66a5caf2917fe03ae16b59efc' | gpg --dearmor -o /etc/apt/trusted.gpg.d/rk3588-gpu.gpg
echo 'deb https://ppa.launchpadcontent.net/liujianfeng1994/panfork-mesa/ubuntu jammy main' > /etc/apt/sources.list.d/rk3588-gpu.list
echo 'deb https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu jammy main' >> /etc/apt/sources.list.d/rk3588-gpu.list
apt update
apt full-upgrade
apt install mali-g610-firmware rockchip-multimedia-config

More details about this:

I hope it works well on Debian, since the PPAs are for Ubuntu Jammy.

2 Likes

Previous comment probably requires up-voting, since at the time of writing Orange Pi 5 still does not have GPU acceleration working with DietPi on Bookworm out of box. Only after Mesa API upgrade to 23.0.0-devel + installation of mali-g610-firmware from [JianFeng Liu] PPA - look for “Enable 3D Acceleration, my Kodi player was able to properly detect Mali-G610 (Panfrost) and stopped burning ARM cores.

root@opi5:/etc/apt/trusted.gpg.d# apt list --upgradable 
Listing... Done
libegl-mesa0/jammy 23.0~panfork~csf~git221210.120202c6757~j+3 arm64 [upgradable from: 22.3.6-1+deb12u1]
libgbm1/jammy 23.0~panfork~csf~git221210.120202c6757~j+3 arm64 [upgradable from: 22.3.6-1+deb12u1]
libgl1-mesa-dri/jammy 23.0~panfork~csf~git221210.120202c6757~j+3 arm64 [upgradable from: 22.3.6-1+deb12u1]
libglapi-mesa/jammy 23.0~panfork~csf~git221210.120202c6757~j+3 arm64 [upgradable from: 22.3.6-1+deb12u1]
libglx-mesa0/jammy 23.0~panfork~csf~git221210.120202c6757~j+3 arm64 [upgradable from: 22.3.6-1+deb12u1]
librist4/jammy 0.2.7+dfsg-1+jammy arm64 [upgradable from: 0.2.7+dfsg-1]

root@opi5:/etc/apt/trusted.gpg.d# apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libdrm-amdgpu1 libllvm15 libz3-4
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  mali-g610-firmware
The following packages will be upgraded:
  libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa libglx-mesa0 librist4
6 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,900 kB of archives.
After this operation, 5,593 kB disk space will be freed.
Do you want to continue? [Y/n] y

Not sure, that rockchip-multimedia-config package was strictly required to enable GPU hardware acceleration, nonetheless I installed it alongside with mali-g610-firmware, that was indeed required.

Note:

  • liujianfeng1994 PPA signing key was updated - please, bear in mind, to import the right key into APT gpg keychain.

@MichaIng, much appreciated for solution sharing.

Further reading:

I was thinking to create a new topic, however this one fully matches my question and the problem I have. It turned out, that my previous comment on this thread was ahead of time - GPU hardware acceleration still does not work on DietPi/Bookworm with Orange Pi 5 (RK3588 chip). I used this method for verification in Kodi: [GUIDE] Kodi on Orange Pi 5 with GPU Hardware Acceleration and HDMI Audio - Orange Pi 5 / 5B / 5 Plus - Armbian Community Forums

During video playback, press ‘o’ on the keyboard, and it should show Video decoder: ff-hevc_rkmpp-drm_prime (HW)

In fact I can confirm, that this procedure works - shared and explained by the owner and maintainer of ppa:liujianfeng1994 - JianFeng Liu - aka @amazingfate. The problem though, I managed to get a fully working HW accelerated video stream with RK3588 (up to 4K@60fps) only using Armbian Jammy image - yes, it works indeed very well. But I failed to achieve the same result with DietPi/Debian/Armbian Bookworm OS - I failed to install/update required packages from Ubuntu PPA into Debian. Required steps are explained pretty well by the PPA maintainer/developer:

To make kodi support hardware decoding, you need:

1, ffmpeg supporting rkmpp. I've packaged it in my ppa: https://launchpad.net/~liujianfeng1994/+archive/ubuntu/rockchip-multimedia, which is based on the patch from https://github.com/JeffyCN/FFmpeg/.
2, kodi built with gles render system, which is also in my ppa
3, a gpu driver supporting gles. For rk356x you can use mainline panfrost driver. For rk3588 you can use panfork-mesa from my ppa: https://launchpad.net/~liujianfeng1994/+archive/ubuntu/panfork-mesa

With Ubuntu Jammy suggested workflow worked very well, however I ended up with dependency hell trying to forcefully install packages from Ubuntu PPA into Debian (apparently by default APT was smart enough to skip most of the packages from jammy repo - see my previous comment above). The only workaround I see is to build packages into Debian using source files from Ubuntu PPA - approach I would like to avoid at all costs, since I don’t even know, what exact packages I need from each repository to make things working.

If anybody has a working solution for this problem, please, share an idea, how it could be tackled. I really would like to have this setup working in DietPi and not Armbian.
Thank you.

I decided to revisit this problem. Not having a better solution I rebuilt required packages from sources. Luckily Debian community made the whole build process quite an easy journey even for novices, when it comes to building the package from PPA: CreatePackageFromPPA - Debian Wiki

I had to rebuilt ffmpeg and kodi packages (rockchip legacy multimedia packages), since only they could not satisfy required Ubuntu PPA dependencies from Debian repositories I listed in APT sources. All packages from “panfork mesa to support mali g610” PPA I was able to download and install “as is” without build requirement.

At the end of the day I got a working RK3588 GPU hardware accelerated setup in DietPi with the only drawback:

dietpi@opi5:~$ apt list --upgradable 
Listing... Done
kodi-bin/jammy 2:20.2+dfsg-4+gles arm64 [upgradable from: 2:20.2+dfsg-4+gles]
libavcodec60/jammy 7:6.0-5+git230804.e243e8d001~j1 arm64 [upgradable from: 7:6.0-5+git230804.e243e8d001~j1]
libavfilter9/jammy 7:6.0-5+git230804.e243e8d001~j1 arm64 [upgradable from: 7:6.0-5+git230804.e243e8d001~j1]
libavformat60/jammy 7:6.0-5+git230804.e243e8d001~j1 arm64 [upgradable from: 7:6.0-5+git230804.e243e8d001~j1]

dietpi@opi5:~$ sudo apt full-upgrade 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  kodi-bin libavcodec60 libavfilter9 libavformat60
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

I installed listed packages manually, since they don’t have dependencies covered by Debian official repositories. It means, that when [JianFeng Liu] provides updates to his PPA (and he actively maintains it for now), I will have to rebuild mentioned packages from sources again, that is not good (not scalable). I still don’t understand/know, when/if he is going to submit his work to Ubuntu upstream, in which case, I believe, it will have a better chances to make it to Debian as well.

For the moment I share all these details just in case somebody has/had the same problem and would like to replicate provided steps on his/her own potentially improving my answer here.

1 Like