Archlinux on Rock5b

I would suggest use -bin package by default because it is what officially radxa has, if someone needs an updated version, then he needs to compile.

Since there is no official binary distribution of packages, no-one else will compile those packages for them. Same goes for the rest of the packages as well.

1 Like

I just added two more scripts install-kernel.sh and post-install.sh. They will be automatically stored in /home/YOUR_USER/tools after running firstbootsetup.sh.

The install kernel script will help you on installing/re-installing the kernel (you can choose from rkbsp5-bin rkbsp5-git and midstream)

The post install script is still WIP.

Both script has not yet been tested.

1 Like

Installed midstream and pancsf

But gpu doesnt seems to be working, gnome shows software rendering and it is laggy.

Ethernet is working but the network setting tab is empty, and WiFi doesnt seems to have a driver. (no Wifi and Bluetooth)

i remember i made it work, but dont really remember how, may be it needs the firmware in /usr/lib, when you remove rkbsp kernels the firmware s also go away with them.

When you make it work, make sure you set the governor of gpu to performance, otherwise you will see glitches in the screen.

I guess there’s nothing to do with /usr/lib/firmware/mali_csffw.bin. I tried both having it and removing it. dmesg shows the same.

pancsf fb000000.gpu: Direct firmware load for mali_csffw.bin failed with error -2
pancsf fb000000.gpu: Failed to load firmware image ‘mali_csffw.bin’

From this forum, it looks like we need a dtb.

@boogiepop did you actually copied a dtb from the rkbsp?

this firmware seems to load:
https://github.com/JeffyCN/mirrors/raw/488f49467f5b4adb8ae944221698e9a4f9acb0ed/firmware/g610/mali_csffw.bin

however vop2_mmu shits its pants

[    5.725407] rk_iommu fdd97e00.iommu: Page fault at 0x0000000000800000 of type read
[    5.725427] rk_iommu fdd97e00.iommu: iova = 0x0000000000800000: dte_index: 0x2 pte_index: 0x0 page_offset: 0x0
[    5.725436] rk_iommu fdd97e00.iommu: mmu_dte_addr: 0x0000000006131000 dte@0x0000000006131008: 0x138d6001 valid: 1 pte@0x00000000138d6000: 0x14072007 valid: 1 page@0x0000000014072000 flags: 0x6

it is most likely this new commit, if you revert this one it should work.

or simply set this to “disabled”

you can even do this with dtc binary, by first decompiling the active dtb to dts, changing vop2mmu to disabled, and compile back to dtb…

@kwankiu

here is a compiled dtb for you to test, if still does not work, try adding cma=256M to the kernel command line extlinux

rock5b_dtb_novop2mmu.zip (34.7 KB)

Using your dtb, I need to add cma=256M to get display output, but it still shows the same error, and it is still using Software Rendering. Without cma=256M, it doesnt have display output.

(I am using a 4K monitor, idk whether it works on 1080P or not, but I dont have a 1080P or lower monitor with me)

I have tried the armbian midstream image from monka before, and i remember it worked. Maybe I will look into it

I looked up the armbian image. I tried replacing the dtb, replacing mali_csffw.bin, replacing the pancsf.ko, I also tried reinstalling the mesa-pancsf-git, but I am out of luck. rk_iommu doesn’t logs an error so I assume it works.

One bonus is that using monka’s armbian image’s dtb enables pwm fan support.

[rock@alarm ~]$ dmesg | grep pancsf
[    2.433507] pancsf fb000000.gpu: clock rate = 198000000
[    2.433518] pancsf fb000000.gpu: bus_clock rate = 200000000
[    2.433527] pancsf fb000000.gpu: [drm:pancsf_devfreq_init [pancsf]] More than 1 supply is not supported yet
[    2.445455] pancsf fb000000.gpu: [drm:pancsf_devfreq_init [pancsf]] Failed to register cooling device
[    2.445494] pancsf fb000000.gpu: mali-g610 id 0xa867 major 0x0 minor 0x0 status 0x5
[    2.445497] pancsf fb000000.gpu: Features: L2:0x07120306 Tiler:0x00000809 Mem:0x301 MMU:0x00002830 AS:0xff
[    2.445500] pancsf fb000000.gpu: shader_present=0x50005 l2_present=0x1 tiler_present=0x1
[    2.448921] pancsf fb000000.gpu: Direct firmware load for mali_csffw.bin failed with error -2
[    2.448934] pancsf fb000000.gpu: Failed to load firmware image 'mali_csffw.bin'
[    2.449091] pancsf fb000000.gpu: Fatal error during GPU init
[    2.449184] pancsf: probe of fb000000.gpu failed with error -2
[rock@alarm ~]$ dmesg | grep iommu 
[    0.130685] iommu: Default domain type: Translated 
[    0.130688] iommu: DMA domain TLB invalidation policy: strict mode 
[    2.445002] rockchip-vop2 fdd90000.vop: Adding to iommu group 0

Update :
I hooked up the Armbian image.

Would you be able to upload an image that has pancsf working so I can test and sees what happens?

Also, when i compile ffmpeg-mpp from AUR, it saids missing librist and onevpl, but the librist package on AUR saids it is not available for the ‘aarch64’ architecture.

Hello, i dont have access to sbc now and my rootfs is around 200gb at the moment. It will take quite some time to clean it.

Dont mind about ‘not available for aarch64’ warnings because they are source pkgs, it does not matter for which architecture they are

Unfortunately it is not a warning, it does not compile.

Update :
Ok, for librist, so basically the PKGBUILD has arch=(‘x86_64’), you have to replace it with arch=(‘aarch64’). Then makepkg -si will work

Any idea how to fix this?

Looks like mpp isnt working.

Video is not playing on both firefox and chromium.

Kodi and gnome video player dont play too.

Package installed : mpp-git, librga-multi, ffmpeg4.4-mpp, librist, ffmpeg-mpp, kodi-nexus-mpp-gi

[vp9_rkmpp_decoder @ 0x7fa667c400] Failed to initialize MPP context (code = -1).
[vp9_rkmpp_decoder @ 0x7fa667c400] Failed to initialize RKMPP Codec.

Which aur manager are you using?
Did you add your user to the video group?

None, by git clone and then cd and then makepkg -si

I copied your command on first post but it looks like usermod doesn’t like -A -g. I just run that command again with -aG, the error line is gone, but it still acts the same. Chromium and Gnome Video Player does not play. Firefox’s log looks like it loaded one frame, that’s all, then the video goes spinning forever.

Btw, should we install both ffmpeg4.4-mpp and ffmpeg-mpp or only one should be installed?

Mainly ffmpeg-mpp, this one used by the archlinux system, ffmpeg4.4 is used rarely for some specific apps like vlc player. Try to verify if it works with ffplay, and make sure you disable rdd sandbox of ff.

You can ignore architecture deps by providing -A to the makepkg

1 Like

Has anyone had any luck getting Sway to run on the Rock5B?

I think I tried it on Reborn OS few months ago. It should works.

ffplay works. Chromium, Firefox, Gnome Video, Kodi all doesnt loads.

mpp_debug=1 in firefox, journalctl -f outputs :

Aug 14 13:09:28 alarm mpp[7020]: hal_bufs: hal_bufs_deinit invalid NULL input
Aug 14 13:09:28 alarm mpp[7020]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.
Aug 14 13:09:28 alarm mpp[7020]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.
Aug 14 13:09:28 alarm mpp[7020]: hal_bufs: hal_bufs_deinit invalid NULL input
Aug 14 13:09:28 alarm mpp[7020]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.
Aug 14 13:09:28 alarm mpp[7020]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.

and Epiphany is not launching on wayland, and sometimes even freezed the system, any solution?

Btw, to reduce installation time significantly, I pre-compiled all the pkgs on my Apple M1 and packed all the pkg.tar.xz. I have created a dev branch for testing.

Update (2023-08-16) : dev branch is now merged to main branch.

Just use the script to install arch linux to the disk, then login as root and run arch-rock-installer to install all packages (kernel, mesa, mpp, ffmpeg, etc) and Desktop Environment.

and Bluetooth on 8852BE doesnt seems to work even after the blacklist fix. And I haven’t got a way to get pwm fan working except replacing the dtb with armbian’s dtb

Ok ill check it out when i access my setup, probably next week or so…

Blindly guessing, have you always tried with wayland? I know wayland is being problematic time to time due to libglx, have you tried with x?

1 Like