Jump to content

[GUIDE] Kodi on Orange Pi 5 with GPU Hardware Acceleration and HDMI Audio


adr3nal1n27

Recommended Posts

@luizkunDid you set the settings in Kodi as how amazingfate has in his instructions?

 

After starting kodi (from login screen), in Settings -> Player -> Videos, enable "Allow using DRM PRIME decoder" and "Allow hardware acceleration with DRM PRIME". And set "PRIME Render Method" to "Direct To Plane"

Link to comment
Share on other sites

Hi @royk , i made all steps from amazingfate guide , i'm sue that kodi is running with rk_hw acceleration , i tried to get gpu or mali log from dmesg , but no error log . It's so strange .
in Android 12 , it looks like it will use libGLES  as default , and it can play H265 (HEVC) format very well , is there any method to switch to use libgles for kodi ?
kodi_hevc_issue.thumb.jpg.46e65c93dee652f99c6a4f57f827c7ea.jpg

Link to comment
Share on other sites

I am on the same situation as @luizkun have installed Kodi following all the steps and can watch some movies, but others won't work (x265 hevc), . Will just get a blank screen with audio and subtitles working fine, but no image. Have you managed to sort this out?

 

I have followed the guide and verified everything is fine: gbm, drm_prime, direct to plane, etc

@amazingfate@royk please could you assist to resolve this? I am happy to follow any steps to provide additional information you may need or upload some sample videos for you to try to recreate the issue

Link to comment
Share on other sites

@PajPaj I just did a clean install, unfortunately I can't get it to work either.

 

@amazingfate Do you've an idea what could be wrong? Installed everything the same as before except the udev rules and the lines in rc.local because these are installed automatically by your package (tried to set these manually to be sure). I assume that installing the original driver will cause gbm/X11 stop to work?

Chromium does work with hw accelaration, but only when I set the Preferred Ozone platform to X11, while before the clean install it only worked with this setting at Wayland.

 

With your image "Armbian_23.05.0" I've got the same result. (audio over HDMI is working)

cat /proc/version

Linux version 5.10.110-rockchip-rk3588 (armbian@next) (aarch64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP Thu Mar 2 08:08:28 UTC 2023

kodi.log lib-list.txt

Edited by royk
Test with 23.05
Link to comment
Share on other sites

@amazingfateYes I saw that, but the setting is at "direct to plane". I think it falls back to egl although it isn't in the log. Besides that, hw acceleration in Chromium also doesn't  work under Wayland, but it does under xwayland, moonlight-embedded also doesn't work with Wayland. It all worked before.

It seems that somehow gles doesn't work with Wayland/gbm

Link to comment
Share on other sites

@amazingfate With Kodi I think you're right about that this was the cause of why it was using egl. It does play normal hevc (at least the one I tried)  but none of the hdr, I've tried a lot of different files of which I'm sure aren't drm protected.

 

Chromium is working here, but runs in xwayland, the moment I set "Preferred Ozone platform" to wayland in chrome://flags the hw decoder stops working, while I'd to set that before I reinstalled everything to make it work, it's not a real problem but it uses a bit more of the cpu.

 

Moonlight-qt does work, at default it also start in xwayland, but after installing qtwayland5 and running it with "QT_QPA_PLATFORM=wayland moonlight" it does run native in wayland.

 

kodi-error-hdr.txt

Link to comment
Share on other sites

@amazingfate Mine /etc/chromium-browser/default looks the same. I didn't had to at start, but after an update I'd to set that to wayland otherwise it was running in xwayland and the cpu usage was at 300/400% with 4k youtube video.

 

I suspect there is something not right with the libs/symlinks or do these looks the same on yours?

 

ls -l /usr/lib/aarch64-linux-gnu/libEGL*
lrwxrwxrwx 1 root root     20 feb 28 14:59 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0 -> libEGL_mesa.so.0.0.0
-rw-r--r-- 1 root root 292072 feb 28 14:59 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0.0.0
lrwxrwxrwx 1 root root     15 jan  4  2022 /usr/lib/aarch64-linux-gnu/libEGL.so.1 -> libEGL.so.1.1.0
-rw-r--r-- 1 root root  68040 jan  4  2022 /usr/lib/aarch64-linux-gnu/libEGL.so.1.1.0

 

ls -l /usr/lib/aarch64-linux-gnu/libGLESv*
lrwxrwxrwx 1 root root     21 jan  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.2.0
-rw-r--r-- 1 root root 141408 jan  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1.2.0
lrwxrwxrwx 1 root root     18 mrt  6 14:01 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.1.0
-rw-r--r-- 1 root root 149600 jan  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.1.0

 

ls -l /usr/lib/aarch64-linux-gnu/libmali-x11/
lrwxrwxrwx 1 root root       36 feb 18 18:02 libEGL.so -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36 feb 18 18:02 libEGL.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36 feb 18 18:02 libgbm.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36 feb 18 18:02 libGLESv2.so -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36 feb 18 18:02 libGLESv2.so.2 -> libmali-valhall-g610-g6p0-x11-gbm.so
-rw-r--r-- 1 root root 43763352 feb 18 18:02 libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36 feb 18 18:02 libOpenCL.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so

 

Link to comment
Share on other sites

I think they are the same:

```

$ ls -l /usr/lib/aarch64-linux-gnu/libEGL*
lrwxrwxrwx 1 root root     20  2月 28 21:59 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0 -> libEGL_mesa.so.0.0.0
-rw-r--r-- 1 root root 292072  2月 28 21:59 /usr/lib/aarch64-linux-gnu/libEGL_mesa.so.0.0.0
lrwxrwxrwx 1 root root     11  1月  4  2022 /usr/lib/aarch64-linux-gnu/libEGL.so -> libEGL.so.1
lrwxrwxrwx 1 root root     15  1月  4  2022 /usr/lib/aarch64-linux-gnu/libEGL.so.1 -> libEGL.so.1.1.0
-rw-r--r-- 1 root root  68040  1月  4  2022 /usr/lib/aarch64-linux-gnu/libEGL.so.1.1.0
$ ls -l /usr/lib/aarch64-linux-gnu/libGLESv*
lrwxrwxrwx 1 root root     17  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so -> libGLESv1_CM.so.1
lrwxrwxrwx 1 root root     21  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.2.0
-rw-r--r-- 1 root root 141408  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv1_CM.so.1.2.0
lrwxrwxrwx 1 root root     14  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv2.so -> libGLESv2.so.2
lrwxrwxrwx 1 root root     18  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.1.0
-rw-r--r-- 1 root root 149600  1月  4  2022 /usr/lib/aarch64-linux-gnu/libGLESv2.so.2.1.0
$ ls -l /usr/lib/aarch64-linux-gnu/libmali-x11/
total 42740
lrwxrwxrwx 1 root root       36  2月 19 01:02 libEGL.so -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36  2月 19 01:02 libEGL.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36  2月 19 01:02 libgbm.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36  2月 19 01:02 libGLESv2.so -> libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36  2月 19 01:02 libGLESv2.so.2 -> libmali-valhall-g610-g6p0-x11-gbm.so
-rw-r--r-- 1 root root 43763352  2月 19 01:02 libmali-valhall-g610-g6p0-x11-gbm.so
lrwxrwxrwx 1 root root       36  2月 19 01:02 libOpenCL.so.1 -> libmali-valhall-g610-g6p0-x11-gbm.so

```

Link to comment
Share on other sites

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  

Link to comment
Share on other sites

@amazingfate I'm really wondering if hdr video's play on yours because I have no clue what else I could try.

It's telling that the format is not supported

2023-03-07 23:36:33.121 T:141589   error <general>: CEGLImage::SupportsFormat - format not supported: 
2023-03-07 23:36:33.121 T:141589    info <general>: GLES: Selecting single pass rendering
2023-03-07 23:36:33.121 T:141589    info <general>: GLES: Selecting YUV 2 RGB shader
2023-03-07 23:36:33.121 T:141589   error <general>: CBaseRenderer::GetShaderFormat - unsupported format 179
2023-03-07 23:36:33.121 T:141589   error <general>: GLES: BaseYUV2RGBGLSLShader - unsupported format none

 

I've compiled newer versions of ffmpeg and kodi, tried to revert some of the changes in ffmpeg related to your comment, but still the same result, perhaps I'm doing something wrong.

Do you have the older version of ffmpeg still on your pc?

 

Software decoding does show the video with hdr, but unfortunately a bit to slow.

Edited by royk
Link to comment
Share on other sites

Might be worth pointing out even if maybe many people are aware that there's two completely differernt uses of the term 'DRM'.

DRM = Digital Rights Management. Ie support for enforcing copy right protection of media.

 

also 

 

DRM = Direct Render Manager.  A render and display path in Linux that can show images when not under X11.

https://en.wikipedia.org/wiki/Direct_Rendering_Manager

 

Edited by fredrum
Link to comment
Share on other sites

Hi @amazingfate , why do you think this issue related to Kernel not support this format ?
I developed ATV rom for OrangePi5 with latest kernel rkr3.6,  Kodi can play the same format which is failed on Armbian  , player show AMC(HW) , but instead of DRM it showed Surface on Android.
I mean Android Kodi can run HEVC x265 HDR10 very well .

i see that armbian also switch to use latest kernel rkr3.6 , can you help check again this issue on latest build ?

 

 

Link to comment
Share on other sites

@luizkun kodi linux will check if the drm format is supported by the kernel: https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/gbm/drm/DRMPlane.cpp#L48

Android works doesn't mean kernel supports that. Kodi linux use drm prime to make hardware decoding work. If you have the ability to solve this issue you can contribute to upstream xbmc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines