Jump to content

Kernel 6.1 for Orange Pi 5+


Joel
Go to solution Solved by royk,

Recommended Posts

Are there any plans to make a version with the new Rockchip 6.1 kernel available for Orange Pi 5/5+? Joshua Riek seems to have had some success, he even got the Panfork drivers running.

 

I run a headless server though so even without graphics it would be interesting but I use Debian.

Link to comment
Share on other sites

I've been doing some work on the 6.1 kernel and would be happy to help adapt it to the build framework. I do think the Edge 2 will need some work as I had to drop some patches related to the board during my rebase. But I'd like to sort out mpp, ffmpeg, and chrome first as they all need changes to work properly. These packages should be patched in Amazingfate's PPA before upgrading the kernel to prevent breaking HW accel on jammy systems currently using the 5.10 kernel.

So far, I have patched packages for everything except chromium. For some reason when using chrome to play 4k 60fps videos on YouTube, the video will stutter.

Link to comment
Share on other sites

Quote

So far, I have patched packages for everything except chromium. For some reason when using chrome to play 4k 60fps videos on YouTube, the video will stutter.

I was missing a patch for libv4l-rkmpp, now chrome is working with 4k 60fps playback on youtube again.

Link to comment
Share on other sites


Hi @amazingfate! Can you take a look at some of the changes I made to ffmpeg, librga, librist, libv4l-rkmpp, mpp, mpv, and v4l-utils? I would love to update these packages in your PPA for compatibility with the 6.1 kernel. 

I have my changes available here on launchpad: https://launchpad.net/~jjriek/+archive/ubuntu/rockchip-multimedia?field.series_filter=jammy

 

Link to comment
Share on other sites

@Spooky Many thanks to your work. My company is pushing me hard these days and I don't have time to test 6.1 kernel. If these packages is working for you I can just copy it to my ppa.

I can see ffmpeg, librga, libv4l-rkmpp, mpp is updated to latest upstream version. What are the changes you make to librist, mpv and v4l-util?

Link to comment
Share on other sites

Hey @amazingfate, the above-mentioned av1 decoder issue was fixed, turned out that the Rock 5A and a few other boards did not have the av1d node enabled in the device tree. I did update ffmpeg and added some patches to mpv last night, after testing everything it looks good to go. 

The packages ffmpeg, librga, libv4l-rkmpp, mpp, and mpv are ready to be copied to your PPA. 

https://launchpad.net/~jjriek/+archive/ubuntu/rockchip-multimedia/+packages?field.name_filter=&field.status_filter=published&field.series_filter=jammy

Edited by Spooky
Link to comment
Share on other sites

@amazingfate The old hbiyik/FFmpeg is deprecated in favor of ffmpeg-rockchip. The latter one have different default behavior to enable the best performance and 10-bit/P010 support.

 

Also the hbiyik/FFmpeg doesn't support the 6.1 bsp because the 6.1 kernel lacks of rk-dma-heap allocator. You can only use the drm gem allocator.

Not only that, the decoder, filter and encoder components are bundled together in hbiyik/FFmpeg/libavcodec, makeing the code difficult to read and maintain. So we decided to move.

https://github.com/7Ji-PKGBUILDs/.report/issues/15#issuecomment-1909770887

https://github.com/7Ji-PKGBUILDs/.report/issues/17#issuecomment-1913746159

 

To adapt MPV to ffmpeg-rockchip, except for the included nv16/p010/p210 format patches, there are two additional MPV configs need to be set in `/etc/mpv/mpv.conf`.

To adapt Kodi to ffmpeg-rockchip, see this Wiki page. You will get 8k 60fps HEVC 10-bit playback this time.

 

poga2.webp

Link to comment
Share on other sites

Hi!

 

i've tested Kodi in the Armbian_24.2.2_Orangepi5_jammy_vendor_6.1.43_minimal, and i've a black screen under GBM

 

Pressing  the key "o" i can see that is HW decoded, and the audio come out

 

then, following the guide https://github.com/hbiyik/ffmpeg-rockchip/wiki/Rendering, i've stopped the desktop environment with sudo service gdm stop and started kodi with FFMPEG_RKMPP_DEC_OPT="afbc=on" kodi --windowing=gbm --audio-backend=alsa, but nothing changed

 

I've tried with direct to plane and EGL

 

 

thanks

 

 

 

Link to comment
Share on other sites

https://github.com/amazingfate/linux-rockchip/commits/rk-6.1-rkr1/ lacks of a VOP2 patch, which resulted the black screen in kodi.

 

Quote

0002-vop2_rbga2101010_capability_fix.patch : When using Kodi in GBM Mode, you will get a black screen if this patch is not applied. This is a bug in rockchip kernel.

https://github.com/hbiyik/ffmpeg-rockchip/wiki/Rendering#required-patches-and-fixes-in-the-toolchain

Link to comment
Share on other sites

I have been running the Armbian_24.2.3_Orangepi5_jammy_vendor_6.1.43_kde-plasma_desktop.img.xz image on my OPi5 16g alongside amazing fated's panfork drivers for a couple of hours and it is working great so far. 

 

6.x kernel a huge step forward  - Many thanks to all involved !

Link to comment
Share on other sites

I've been running with the new kernel for two days now and almost everything works great. I built my own version with the build tool since I use a headless server and could only find the minimal version of Debian Bookworm available for download. So I made a standard server version, everything else set to defaults.

 

Open Media Vault 7 works great, and Jellyfin with Rockchip support mostly works. The only problem is that I can't get transcoding of HDR movies working with Jellyfin, transcoding of SDR and direct streaming works perfectly.

 

That's basically what I've tested so far since that's what I use my server for, if I can only get transcoding working I'll switch permanently.

 

Thank you all so much for making the new kernel available!

Link to comment
Share on other sites

I just remembered, one thing that doesn't work is rebooting. It seems to get stuck somewhere so I have to pull the power. It did that sometimes with the old 5.10 kernel too but now it seems to happen every time.

Link to comment
Share on other sites

Posted (edited)

I got transcoding working with HDR movies too, after some help on Github. The latest libmali driver doesn't work with kernel 6.1 so I needed an older version. Apparently the most up to date driver uses the latest DDK and that's broken with 6.1.

 

The libmali driver v1.9-1-2d267b0 from November seems to work with 6.1 though. I've only done a few quick tests so I don't know how stable it is but if I don't notice any trouble in a day or so I'll probably move this installation from the SD card to the NVME and use it for real.

Edited by Joel
Link to comment
Share on other sites

I went ahead and tried to install to NVME by using armbian-config but it doesn't boot. When I try to boot without a SD card the red light just stays on, nothing happens. I have also connected the Orange Pi to a screen with HDMI but when the SD card is out there's no output at all. Unfortunately I don't have a USB to serial adapter so I can't see if there's any output there. 

 

I updated the MTD at the same time so I thought that might be the problem, but I got the rkspi_loader.img from Armbian 24.02.1 and wrote it to MTD but that didn't change anything.

 

Have you gotten it working from NVME, @jordanius?

 

To end on a positive note, rebooting started working again. I really don't know if I did anything to make it work again but I've rebooted several times now during testing and it starts up again every time.

Link to comment
Share on other sites

Might need to clear the SPI flash first them re-image that before copying to NVME.  I had an issue with my OPi5 + not booting of EMMC, wiping SPI and imaging that first, sorted it.

 

With all the newer kernel versions coming out and Spooky getting close to 6.1 too, I'm not clear if I will need to do the wiping for SPi first as the uboot is different...?  Any advice appreciated.

Link to comment
Share on other sites

Posted (edited)

Good idea but I tried it now and it didn't help. I erased the flash with "flash_erase /dev/mtd0 0 0" and wrote the bootloader to MTD again using armbian-config but it still doesn't boot without the SD card inserted. I even tried to erase the flash a second time and write rkspi_loader.img from Armbian 24.2 but it made no difference.

Edited by Joel
Link to comment
Share on other sites

@Joel- Yes am running from NVME...Just did a DD of the live system and fscked the partition.

 

The only thing I noticed is that my board was somewhat fussy about which NVME drive it would work with and would do the same thing with the red light. Does it show up in fdisk/lsblk? Maybe try another NVME if you've got one lying around. 

Link to comment
Share on other sites

I've been running with the same NVME for months with Armbian installed so it can't be the board. I can also mount and access the NVME from the new install with kernel 6.1 on the SD card, its only booting from the NVME that doesn't work.

Link to comment
Share on other sites

  • Solution

@Joel @amazingfate Just tried the 6.1 image (Armbian_24.2.4_Orangepi5-plus_jammy_vendor_6.1.43_kde-neon-amazingfated_desktop.img.xz) and installed to the NVME (with only 1 ext4 partition) with armbian-install. Initially it didn't boot, there are no files in /boot. After copying the files from the boot partition of the SD-card to the /boot folder of the NVME and changing the UUID in armbianEnv.txt to the UUID of the NVME it boots.

Link to comment
Share on other sites

On 3/2/2024 at 11:47 AM, nyanmisaka said:

To adapt MPV to ffmpeg-rockchip, except for the included nv16/p010/p210 format patches, there are two additional MPV configs need to be set in `/etc/mpv/mpv.conf`.

To adapt Kodi to ffmpeg-rockchip, see this Wiki page. You will get 8k 60fps HEVC 10-bit playback this time.

This is amazing!!!! Is Wayland supported yet?

 

I'll give this a shot once all these updates make it to the official pre-release images.

Link to comment
Share on other sites

Hi, sorry for sounding like a total noob here(which I am). I wanted to try out Jellyfin Hardware Acceleration tried out with Jellyfin Unstable (10.9) and also with Nyan-Mikasa's latest 'jellyfin-rockchip' docker image.
Nothing seems to work for me. Is is because I'm using the Debian Image from Orange Pi's official site with kernel 6.1??
Will I able to make Jellyfin work in it with some patches or will have to install new OS all together?

Also, @Joel can you share all the steps you took to make Hardware Acceleration work in Jellyfin like the OS you are using and all the steps that you took to make it work.

Thanks to all of you <3

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