@luizkun You could find the build options in the source that amazingfate has uploaded on his repository, just build ffmpeg with rkmpp and libdrm enabled, then build kodi with gles and at least gbm.
But just use a newer version doesn't work, already tried.
@amazingfate Tnx I will have a look if I could find something in there. But I'm 100% sure that HDR did work at the beginning, so there has been a change somewhere, still not sure if it's mpp, libdrm or something else. I was thinking something in ffmpeg, since you'd found a working solution and after that JeffyCN made some commits which makes no sense to me like:
#ifndef DRM_FORMAT_NV15 // fourcc_code('N', 'V', '1', '5')
#define DRM_FORMAT_NV15 fourcc_code('N', 'A', '1', '2')
#endif
Removed these lines but this had the same result.
Something else I was thinking is that at the beginning gbm used the original driver? and now panfork. But I'm unable to make the original driver to work in gbm.
I got Dolphin running under Armbian and it seems its mainly GPU bound for the games that Iv'e tested.
I am aware that the Panfrost drivers are not optimal but I thought I'd like to try and squeeze a few extra fps out of this setup by overclocking the GPU if that's possible.
In my case, one of the videos which didn´t work was HDR10 (I think it has no DRM, but don´t know for sure). That same video played properly on my debian amd64.
@amazingfate Do you know if the Kernel issue you mentioned would apply in a case where the same video can be played in debian amd64? Also is there any solution to play the same videos which work on Linux amd64 on armbian?
Thank you
Thank you to Armbian forum users @royk and @amazingfate , i tried to run Kodi on Armbian trunk release , everything works well except HEVC or X265 codec show only black screen ( i can hear the sound from playback but no display)
Do you have any idea to fix this issue ?
And one more question , i tried to update lib panforst-mali from launchpad to DDK version 15 with hope can fix this issue, but after "sudo apt dist-upgrade ;sudo apt install mali-g610-firmware" , i checked current version only 13,
@amazingfate can you help update your launchpad to latest version ? Thanks
I'm looking to try an OPi5 for GPGPU. After seeing trunk recently added the patches needed to use the "gofaster" option for panfork, and having seen reports of glmark2 scores of 4000 and 5000 while never coming close to that myself, I decided to pull together the various bits of info out there and just try all of the options. A number of things done below are often described vaguely -- hopefully it's helpful here to lay out a concrete set of steps to follow and what to expect.
There are two options for accelerated video: panfork and ARM's closed source "blob" driver. With either option, it sounds like you should switch from X11 to Wayland. If you are looking at doing OpenCL or Vulkan, you will have to use the blob driver for the foreseeable future. FYI, OpenCL benchmarks at 470 Gflops single precision, 910 Gflops half precision.
Option 1: Installing panfork
This is pretty much explained on the project page for this SBC, but maybe it will help someone to see each step in detail. I started with installing the latest nightly build. Then I ran the following in a terminal:
sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa
wget https://github.com/JeffyCN/rockchip_mirrors/raw/libmali/firmware/g610/mali_csffw.bin
sudo cp mali_csffw.bin /lib/firmware/
sudo chmod 664 /lib/firmware/mali_csffw.bin
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
sudo vi /etc/apt/preferences.d/rockchip-multimedia-ppu
[save the following three lines in this file]
Package: *
Pin: release o=LP-PPA-liujianfeng1994-rockchip-multimedia
Pin-Priority: 600
sudo vi /etc/apt/preferences.d/panfork-mesa-ppu
[save the following three lines in this file]
Package: *
Pin: release o=LP-PPA-liujianfeng1994-panfork-mesa
Pin-Priority: 600
sudo apt update
sudo apt dist-upgrade
sudo vi /etc/udev/rules.d/98-mali-accel.rules
[save the following four lines in this file]
KERNEL=="mpp_service", MODE="0660", GROUP="video"
KERNEL=="rga", MODE="0660", GROUP="video"
KERNEL=="system-dma32", MODE="0666", GROUP="video"
KERNEL=="system-uncached-dma32", MODE="0666", GROUP="video" RUN+="/usr/bin/chmod a+rw /dev/dma_heap"
sudo apt install chromium-browser=$(apt-cache show chromium-browser|grep Version|grep rkmpp|cut -d " " -f2) chromium-codecs-ffmpeg-extra=$(apt-cache show chromium-browser|grep Version|grep rkmpp|cut -d " " -f2) libv4l-rkmpp v4l-utils
sudo ln -s /lib /usr/lib64
cd /usr/lib64/ && sudo ln -s aarch64-linux-gnu/libv4l2.so.0.0.0 libv4l2.so
sudo vi /etc/rc.local
[add the following six lines to this file]
echo dec > /dev/video-dec0
chown root:video /dev/video-dec0
chmod 0660 /dev/video-dec0
echo enc > /dev/video-enc0
chown root:video /dev/video-enc0
chmod 0660 /dev/video-enc0
sudo vi /etc/chromium-browser/default
CHROMIUM_FLAGS="--use-gl=egl"
sudo apt install gnome-shell ubuntu-gnome-desktop glmark2-es2-wayland
sudo reboot
From there you are running Wayland and the panfork accelerated driver.
glmark2 benchmarking of various options for panfork:
For this, you need to use glmark2-es2-wayland (installed above).
First, I ran glmark2 on the system fresh from the above reboot:
foobar@orangepi5:~/install$ glmark2-es2-wayland
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Panfrost
GL_RENDERER: Mali-G610 (Panfrost)
GL_VERSION: OpenGL ES 3.1 Mesa 23.0.0-devel
=======================================================
. . . (test component scores omitted to shorten this post) . . .
=======================================================
glmark2 Score: 943
=======================================================
I was pretty underwhelmed given the scores I'd seen reported, so next I tried using the "gofaster" option for panfork (done by setting an environment variable, as shown below):
foobar@orangepi5:~/install$ PAN_MESA_DEBUG=gofaster glmark2-es2-wayland
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Panfrost
GL_RENDERER: Mali-G610 (Panfrost)
GL_VERSION: OpenGL ES 3.1 Mesa 23.0.0-devel
=======================================================
. . . (test component scores omitted to shorten this post) . . .
=======================================================
glmark2 Score: 2299
=======================================================
A significant improvement, but still short of the reports I had seen.
Finally, I adjusted the governors for the CPUs and DMC (Dynamic Memory Controller) to "performance" (example of how to do that shown below). Here things really shined. Adjusting the DMC is an important component of this:
foobar@orangepi5:~/install$ echo performance | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor /sys/class/devfreq/dmc/governor
performance
foobar@orangepi5:~/install$ PAN_MESA_DEBUG=gofaster glmark2-es2-wayland
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Panfrost
GL_RENDERER: Mali-G610 (Panfrost)
GL_VERSION: OpenGL ES 3.1 Mesa 23.0.0-devel
=======================================================
. . . (test component scores omitted to shorten this post) . . .
=======================================================
glmark2 Score: 4489
=======================================================
Since the score of 5000 was reported for an overclocked system, I called this done. It beats the out of the box score for the Khadas Edge2.
Option 2: installing the ARM blob driver
I also gave this a try -- partly due to interest in evaluating OpenCL performance, and partly to see if the vendor-provided driver could go even faster. I couldn't find a decent set of instructions for how to install the blob driver, so I took a different approach -- I used the package files produced by Khadas for building their Edge2 Ubuntu images. Maybe there are packages already available through Armbian, and I just couldn't identify them.
The package files can be found in these four repos:
https://github.com/numbqq/mali-debs
https://github.com/numbqq/mpp-rockchip-debs
https://github.com/numbqq/rga-rockchip-debs
https://github.com/numbqq/gstreamer-rockchip-debs
Altogether, I found the following package files:
gstreamer1.0-rockchip1_1.14-5_arm64.deb
rockchip-mpp-dev_1.5.0-8_arm64.deb
rockchip-mpp-sample_1.5.0-8_arm64.deb
rockchip-mpp_1.5.0-8_arm64.deb
rockchip-rga-dev_2.2.0-6_arm64.deb
rockchip-rga-sample_2.2.0-6_arm64.deb
rockchip-rga_2.2.0-6_arm64.deb
linux-gpu-mali-wayland_1.0-g610-20220510_arm64.deb
The last one had to be installed with "--force-overwrite" because of a file duplicated with an existing package. I also installed the ubuntu-desktop package to switch over to Wayland. On my first login, "echo $XDG_SESSION_TYPE" reported x11. I logged back out, and logged in again checking the gear icon to make sure the Wayland-related one was selected. I don't know if the gear icon was needed, but that time Wayland was active.
glmark2 benchmarking of various options for the blob driver:
First, I did a run with the default governor settings:
foobar@orangepi5:~/install$ glmark2-es2-wayland
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'.
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'.
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: ARM
GL_RENDERER: Mali-LODX
GL_VERSION: OpenGL ES 3.2 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03
=======================================================
. . . (omitted as above) . . .
=======================================================
glmark2 Score: 2564
=======================================================
Around 11% better than panfork "gofaster."
Then I did a run with the governors set to "performance":
foobar@orangepi5:~/install$ echo performance | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor /sys/class/devfreq/dmc/governor
performance
foobar@orangepi5:~/install$ glmark2-es2-wayland
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'.
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'.
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: ARM
GL_RENDERER: Mali-LODX
GL_VERSION: OpenGL ES 3.2 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03
=======================================================
. . . (omitted as above) . . .
=======================================================
glmark2 Score: 3961
=======================================================
So, in performance mode, panfork is the winner by 13%.
TP Link Archer T2U Revision 1 on Mediatek MT7610U works for me with build around Armbian 23.02.0-trunk.0212, Realtek RTL8811CU doesn't. I didn't checked last trunk 231 build yet, but that would be nice to have popular USB Realteks working out of the box, I spend a lot of time time trying to compile different drivers but that was nightmare without success.
We are trying to put together an automated test system for various (WiFi) USB devices. Hardware is in place, but software part is in early design phase: