Joshua-Riek / ubuntu-rockchip

Ubuntu for Rockchip RK35XX Devices
https://joshua-riek.github.io/ubuntu-rockchip-download/
GNU General Public License v3.0
2.26k stars 244 forks source link

orange pi 5 plus use kodi ,When playing 4k, the screen goes black, but the sound and subtitles are displayed normally #815

Open dengqz opened 4 months ago

dengqz commented 4 months ago

orange pi 5 plus use kodi ,When playing 4k, the screen goes black, but the sound and subtitles are displayed normally ![Uploading 截屏2024-05-19 23.12.06.png…]()

ubuntu24

AlexD81 commented 2 weeks ago

Could someone build new version of kodi pls? hopefully, latest stable, not alpha or beta. The one uploaded above doesn't works... When i login at login screen(kodi on gbm), kodi's interface if frosen (or non responsive)
Tried to build kodi myself using instructions above, but getting errors, this way is too complicated for regular users

lukaszsobala commented 2 weeks ago

@AlexD81 same problem here. I never found a way around this.

Bluesmanuk commented 2 weeks ago

Whenever there is a new build I run through the process, sometimes seeing new errors but with some research, managing to complete the compilation process.

However, Kodi performance is the same. Not bad by any means, just missing some common features already available on other hardware.

I always keep an eye on what Kodi, LibreELEC and Collabora (especially them) are doing with respect to all the kernel developments that are being sent upstream for mainline support.

I know that as soon as the right conditions are met then LibreELEC will quickly add support for the RK3588.

There is still some key work to be done and the latest H265 work by Collabora is WIP (work in progress).

This link will be particularly beneficial in following progress, where you can also see what has yet to be tackled.

https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md?ref_type=heads

I believe that until more progress is made in certain areas, any active work to make Kodi fully functional cannot realistically happen.

Personally I don;t believe that we will see anything complete this year but that is just my speculation based upon the progress that we have seen.

Without Collabora, I think that this SOC would be dead in the water in terms of complete functionality and all the hard work and progress from great people like Joshua would likely never have gotten off the ground because there would not have been a solid enough base to begin with in order to make any progress at all.

So bottom line for me is that it is a waiting game to see if and when full functionality will come to the RK3588.

AlexD81 commented 2 weeks ago

almost perfect solution would be using mpv as player for kodi, i even got dts/ac3 bitstream working for usb>spdif adapter, but in ubuntu 24, there are no working builds of kodi ,
kodi installed via apt is crashing on start, other builds have very sluggish ui, dont know why. The custom build uploaded above, starts ok, ui is ok, and also it works fine with mpv as player, but it's alpha, i would prefer last stable, and i would stick with it for a long time.
another problem is missing autoframerate, solved it by mapping commands to rc keys and using this tool for framerate switch https://github.com/jadahl/gnome-monitor-config.git

Bluesmanuk commented 2 weeks ago

I did experiment with using MPV as the player from within Kodi but I found no improvement in overall functionality.

lukaszsobala commented 2 weeks ago

@Bluesmanuk @AlexD81 no, mpv as a kodi player definitely works, and works very well, with hw acceleration.

The problem is that the resume time is not saved, which makes it a bit useless as a home media center thing. It is quite annoying, as I remember there was a time that Kodi itself worked with hardware acceleration... not sure what changed since then.

Bluesmanuk commented 2 weeks ago

@lukaszsobala

Sadly it doesn't perform any better for me but in terms of the resume issue I may have come across something that might help and I have confirmed works in MPV for Windows.

Add the line below to your mpv.conf. I had to create the file in the Windows version.

save-position-on-quit

I also tested uosc in the windows version to add some rudimentary GUI controls.

wxzmz commented 2 weeks ago

almost perfect solution would be using mpv as player for kodi, i even got dts/ac3 bitstream working for usb>spdif adapter, but in ubuntu 24, there are no working builds of kodi , kodi installed via apt is crashing on start, other builds have very sluggish ui, dont know why. The custom build uploaded above, starts ok, ui is ok, and also it works fine with mpv as player, but it's alpha, i would prefer last stable, and i would stick with it for a long time. another problem is missing autoframerate, solved it by mapping commands to rc keys and using this tool for framerate switch https://github.com/jadahl/gnome-monitor-config.git

Kodi plug-in MPV has another problem, how to solve it perfectly with SMB

AlexD81 commented 2 weeks ago

@nguyenhunga5 don't add shares via kodi's built-in smb. Use your ubuntu mapped share folder as source for kodi. Also, imo, you have to use remote control with mini-keyboard. like MX3 or better. Then you'll get full freedom with control mpv, for example, to quit mpv that running on top of kodi, press 'q' Everything works fine, i can share mpv conf file that allows perfectly smooth playback of 24p movies. I was waiting for libreelec, but now it's not really necessary, i like mpv over kodi approch more, much more possibilities. for example, mpv adds tonemapping that kodi is unable to do. Just need someone to compile latest stable build of kodi with patches , without them ui of kodi is sluggish for unknown reason

wxzmz commented 2 weeks ago

@nguyenhunga5 don't add shares via kodi's built-in smb. Use your ubuntu mapped share folder as source for kodi. Also, imo, you have to use remote control with mini-keyboard. like MX3 or better. Then you'll get full freedom with control mpv, for example, to quit mpv that running on top of kodi, press 'q' Everything works fine, i can share mpv conf file that allows perfectly smooth playback of 24p movies. I was waiting for libreelec, but now it's not really necessary, i like mpv over kodi approch more, much more possibilities. for example, mpv adds tonemapping that kodi is unable to do. Just need someone to compile latest stable build of kodi with patches , without them ui of kodi is sluggish for unknown reason

Indeed, I have been using mpv recently, mpv as a kodi external player, or as a celluloid, the compatibility is much better than the current patched kodi native effect.

'Q' is not a problem. I set the home button of the infrared/bluetooth remote control as the exit button of mpv.

AlexD81 commented 2 weeks ago

in my setup of mpv over kodi is still 1 problem left. Need advice how to toggle bitstream on/off via key press on rc.
the commands for bitstream are looking like this audio-device='alsa/iec958:CARD=Audio,DEV=0' audio-spdif=ac3,dts

probably it should be done via profiles in mpv conf ? but can't figure out how to do it and toggle profiles via key

Bluesmanuk commented 2 weeks ago

I decided to try using MPV as an external player and created the playercorefactory.xml as described above and confirmed with the Kodi wiki.

If I run kodi -fs I get an error

_ERROR: Unable to create GUI. Exiting 'this->recurse > 0' failed at ../src/pipewire/thread-loop.c:63 dounlock()

When I run Kodi from the GUI desktop icon it loads but when I attempt to play a file something flashes up at the top of the screen that is too short to read and then nothing happens.

AlexD81 commented 2 weeks ago

@Bluesmanuk what ubuntu version do yo uuse? I remember I had problemns with 22, but with 24 with last updates everything is fine. Btw when I clean everything " sudo apt purge kodi* " and then install custom build above, then it automatically updates to latest stable (actually it downgrades) and suprisingly this last stable working fine with no issues.

Bluesmanuk commented 1 week ago

@AlexD81

I am using 24 and after scrubbing any existing Kodi references I was able to install the posted Kodi, which updated (I noted that the version that is updated appeared to be from March if I am reading the date format correctly).

Now it is working and I added uosc which added some very useful GUI controls for MPV.

Following the latest updates, which seemed to include a kernel, MPV performance is the same as Kodi, with the added benefit of playing H265 and HDR stuff and the added bonus if doing a great job with HDR to SDR tone mapping.

I don't need to use kodi -fs either as things just work from the off.

So far, so good although I sometimes find that when I exit Kodi, the GUI stays on screen before exiting for a minute or so but I can live with that.

There are still some things that don't seem to play with hardware acceleration but this is generally 8K related, which is only of interest in terms of what the SOC is capable of rather than having any current interest in the practical functionality.

wxzmz commented 1 week ago

@AlexD81 I may have found the smb problem of mpv Ubuntu 24.04 v2.3.2 We installed ffmpeg 7:6.1.1-3ubuntu5+git20240717.8164ff7d~noble version,

when compiling debian/rules ifeq (,$(filter hurd-i386,$(DEB_HOST_ARCH))) CONFIG_extra += --enable-libsmbclient endif enable-libsmbclient in CONFIG_extra extra is not installed in our system

Modify debian/rules, Add --enable-libsmbclient to CONFIG := `CONFIG := --prefix=/usr \


--enable-rkrga \
--enable-libsmbclient \
--enable-version3`

dpkg-buildpackage -uc -us -b

Remove all debs containing extra For example, libavcodec-extra**.deb libavfilter-extra.deb libavformat-extra*.deb

Then reinstall the remaining debs apt install --reinstall ./*.deb

Kodi plug-in mpv can open smb

There are still some problems The smb server needs to open guest permissions If a password is added, it will prompt that I do not have permission

AlexD81 commented 1 week ago

@Bluesmanuk if i remember right your nickname, you're one of first testers of mo's 123 android, that's actually my purpose, to use this board as tv box. I though i already got everything that i ever need from this board, at least in ubuntu, , but now my board doesnt boot without any reasons, seems m2 storage got corrupted.... actually it is happened 2nd time when it gets corrupted.... will try to work from microsd from now, and reinstall if from clean. Will updatethis post if i had issues. So sadly disappointing. m2 was also 'brand' cheenese, never buy such stuff from ali

Bluesmanuk commented 1 week ago

@AlexD81

Yes that was me and was the best solution in Android for using Kodi. I did later note that it was essentially a standard version that was able to take advantage of the hardware acceleration already present in Android, without being specifically optimised for the hardware.

It is a shame that we have yet to see any progress on Android for the PI5.

I was one of the first to buy the OPI5 with a view to multiple use under the TV from a media centre to some better gaming and tinkering to take things forward from the very slow progress of hardware development at the time from AMLogic and others. The sheer power of the RK3588 was a quantum leap for this kind of manufacturer but that 5.1 kernel and appalling support from Rockchip and Orange Pi was always a potential warning sign.

Luckily the open source communities took things as far as they could until Collabora came to aid real development.

In hindsight, I would have waiting a couple of months and gone for an Intel N100 mini PC with out of the box working.

I managed to grab a cheap 256Gb Samsung M.2 NVME at the time from CEX that has held up very well.

AlexD81 commented 1 week ago

after clean ubuntu 24 install, i've installed custom build above, it auto updated, and started to crash on statup....

lukaszsobala commented 1 week ago

@AlexD81 how are you running Kodi? If as a standalone wayland session, it always crashes.

AlexD81 commented 1 week ago

@lukaszsobala yes, wayland. I tried to freeze custom build version with synaptic before, it helps for couple of days, and then something happens, and custom build starts to crash as well. Don't know what to do.... last time, the custom build after auto-updating was working, but can't reproduce it anymore

lukaszsobala commented 1 week ago

@AlexD81 just start a desktop wayland session and run kodi from there

AlexD81 commented 1 week ago

@lukaszsobala i already use wayland, not gbm

lukaszsobala commented 1 week ago

@lukaszsobala i already use wayland, not gbm

There are 4 (well, 5) ways you can start Kodi. 1) start as a standalone wayland session 2) start as a standalone X11 session (this is the GBM one?) I could never really tell what this eclectic GBM is. 3) start from within an X11 desktop session 4) start from within a Wayland desktop session 5) start from within a Wayland session using xwayland

I think you are starting it with method 1. I am referring to method 4. Only then I can even see the DRM PRIME render method option.

Bluesmanuk commented 1 week ago

Very interesting. I had been completely focussed on the GBM being the method required to be able to choose EGL or Direct To Plane that I had not really considered all of the other options.

So I tried one of the options that I had titled Kodi On Wayland and amazingly, I now have the options. The playercorefactory method to use MPV however wasn't working and is something that I will investigate further as a non important thing.

But now that I was able too see where we now are with native Kodi playback, I was able to run all my usual tests, which revealed all that I had seen before. EGL played the fewer formats and 10 bit HDR was a no no. Direct to plane was the one that played more formats and is perhaps acceptable for a day to day use within the restrictions that is does have. Note that if you need HDR to SDR tone mapping, it does not exist and you would never want to play HDR content on a non HDR monitor/TV.

Whilst there is no specific progress of note, it is good to know what is and what is not. It also bolsters my thoughts that until teams like LibreELEC dive in to RK3588, then fully functional Kodi use is out of the question, subject to somebody else jumping into the fray.

So watching the progress of Collabora development, specifically in the areas of H265, VP9 and HDMI audio will be the guide to when LibrELEC can produce something worthy of their time investment, which will also then filter through the Kodi team and onwards to official Linux support.

So right now, using MPV really is the one game in town that gives the best overall results and where HDR and tone mapping seems to work like a dream.

I feel that any other exploration of options is likely to produce more frustration rather than progress right now.

AlexD81 commented 1 week ago

@lukaszsobala sorry, I'm not highly familiar with ubuntu. I just boot into desktop and open kodi icon, is this method 4 ? (and it's wayland as shown in system info)
and kodi is crahing each time on start

Bluesmanuk commented 1 week ago

After the initial boot into Ubuntu, log off and click your username icon on the centre of the screen.

At the bottom right of the screen you should see a small white button.

Click on it and it will bring up a number of options that may mirror the list mentioned earlier. The selection may also be smaller or larger dependent upon what you have neem tinkering with. Select one and login.

Try each one to see which one works best.

AlexD81 commented 1 week ago

@Bluesmanuk kodi is crashing with all of them (

upd. after multiple invstall/reinstall different versions i finally got kodi working. Don't know how. What i remember, last time ive installed it via apt-get, instead of apt(dont know if there's a dfference) . Got kodi version 20.4 .

however, ive noticed, ubuntu doesnt output chroma 444.
Also gray color has some blue tint, you may notice it on noble's desktop wallpaper, for example.
but i can live with it )

Bluesmanuk commented 1 week ago

@AlexD81

Good to see you got it working.

The last time I looked at chroma 444, it seemed to be a rarely used option, so tended to ignore it as it was also rare for me to come across it in general use.

I looked hard for the blue tint but could not see it on my TV.

Overall though, for general use, I'm happy enough for now and after the time we have to wait, with abysmal support from SOC and board manufacturers, it almost seems like a quantum leao from where we have been and seemed to have to expect.

All eyes on Collabora and LibreELEC for th next likely progress for Kodi.

AlexD81 commented 1 week ago

@Bluesmanuk however most significant disadvantage of libeelec will be missing hdr tonemapping. I found some mentions that mpv can be external player in libreelec though. But what is interesting, is upcoming s905x5 chip, with its ai-sr (ai upscale) feature, also it seems also included in recent ugoos s928 firmwares, didnt see test yet, and how good it is, also there's some mentions about ai-mems. that's long expected in tv boxes feature, afr would be not necessary anymore

Bluesmanuk commented 1 week ago

@AlexD81

Indeed LibreELEC will likely not have tone mapping to the same degree. Personally I can still live without it.

But whilst the next iteration of SOC and board may well improve things, he very last thing that I will do is shell out more money to compensate.

Coming from AMLogic might mean it getting fuller functionality much sooner than Rockchip but going forward with ARM products I will waut until they are proven before spending my money.

Twice bitten and all that jazz.