Archlinux on Rock5b

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

Epiphany do plays youtube on X, but it is laggy even on 240P. Most likely software rendering.

Kodi is working.

Firefox and Gnome Video player remains the same (not working).

Dev branch is now merged to main branch.

Known issues :

I have compiled packages for Midstream, but I noticed that it boot and runs kinda slow on my NVMe SSD. And Pancsf Mesa is not yet working, as mentioned :

I remember once i had a very similar problem, just checking if below quote rom the first post is relevant…

if your Browser plays few frames and then suddently stops, it is because the audio output is routed to no existent audio device. Just go to sound settings and select a proper output. This may sound silly, but actually wasted 4 days to figure this out.

Yeah, chromium and firefox both works now. Chromium works better, while Firefox have noticable frame drops and is limited to 1080P.

What’s remaining would be bluetooth and pwm fan not working and the issue with pancsf for midstream

Youtube lately forces maximum output to 1080p when the firefox uses a non vaapi decoder thinking that it is software. There are some addons to force youtube quality. If you use them you can do 4k with ok speeds. The delay that firefox experiencing is because when it is converting the ffmpeg frames to gpu textures it is using a non optimal path thinking that it is a software decoder. So this has nothing to do with the decoder performance mostly.

In recent versions of firefox they have introduced v4l2m2m accelareted ffmpeg support may be i can use this implementation to leverage fast gpu import. I had tried little bit but could not succeed but i think there is a potential in that approach

Chrome on the other hand does not use ffmpeg neither for av1 nor vp9. So what you see as a better performance on chrome is actually a software decoder, libvpx. I know this is confusing but this is the current state with browsers.

1 Like

For the fan, you can compile this dts and use it as overlay in extlinux.conf.

The dts does not compile on Arch Linux, neither on Radxa kernel nor Midstream.

As the error below :

These errors are from midstream because mainline has slightly different node structure. Rockchip kernel should work, if not you can refer to the dts at armbian and adopt the overlay. What i think is that, this overlay actually needs to be pred to https://github.com/radxa/overlays repo so everyone can make use of it.

[rock@alarm ~]$ dtc -@ -I dts -O dtb -o pwm-fan.dtbo /home/rock/Downloads/pwm-fan.dts 
/home/rock/Downloads/pwm-fan.dts:21.25-25.7: Warning (unit_address_vs_reg): /fragment@1/__overlay__/trips/trip-point@0: node has a unit name, but no reg or ranges property
/home/rock/Downloads/pwm-fan.dts:26.25-30.7: Warning (unit_address_vs_reg): /fragment@1/__overlay__/trips/trip-point@1: node has a unit name, but no reg or ranges property
/home/rock/Downloads/pwm-fan.dts:31.25-35.7: Warning (unit_address_vs_reg): /fragment@1/__overlay__/trips/trip-point@2: node has a unit name, but no reg or ranges property
/home/rock/Downloads/pwm-fan.dts:36.29-40.7: Warning (unit_address_vs_reg): /fragment@1/__overlay__/trips/trip-point@3: node has a unit name, but no reg or ranges property
[rock@alarm ~]$ uname -a
Linux alarm 5.10.160-1080649-7a4a688431bc-e662b9c-radxa-rkbsp #1 SMP Mon Aug 14 00:35:05 PDT 2023 aarch64 GNU/Linux

Radxa Kernel’s rk3588s.dtsi looks the same as armbian’s on that line.

And on rk3588-rock-5b.dts, I have noticed this commit.

Interestingly, I have decompiled the dtb on my system, i see that it looks more like midstream’s one.

Rename this from .zip to .dts tmp-5b.zip (305.6 KB)

	pwm-fan {
	compatible = "pwm-fan";
	#cooling-cells = <0x02>;
	cooling-levels = <0x00 0x40 0x80 0xc0 0xff>;
	pwms = <0x1aa 0x00 0x2710 0x00>;
	phandle = <0x4c>;
};

thermal-zones {
	phandle = <0x208>;

	soc-thermal {
		polling-delay-passive = <0x14>;
		polling-delay = <0x3e8>;
		sustainable-power = <0x1388>;
		thermal-sensors = <0x4a 0x00>;
		phandle = <0x209>;

		trips {

			trip-point-0 {
				temperature = <0xea60>;
				hysteresis = <0x7d0>;
				type = "passive";
				phandle = <0x4d>;
			};

			trip-point-1 {
				temperature = <0x14c08>;
				hysteresis = <0x7d0>;
				type = "passive";
				phandle = <0x4b>;
			};

			soc-crit {
				temperature = <0x1c138>;
				hysteresis = <0x7d0>;
				type = "critical";
				phandle = <0x20a>;
			};
		};

		cooling-maps {

			map0 {
				trip = <0x4b>;
				cooling-device = <0x06 0xffffffff 0xffffffff>;
				contribution = <0x400>;
			};

			map1 {
				trip = <0x4b>;
				cooling-device = <0x0a 0xffffffff 0xffffffff>;
				contribution = <0x400>;
			};

			map2 {
				trip = <0x4b>;
				cooling-device = <0x0c 0xffffffff 0xffffffff>;
				contribution = <0x400>;
			};

			map3 {
				trip = <0x4b>;
				cooling-device = <0x4c 0xffffffff 0xffffffff>;
				contribution = <0x2000>;
			};

			map4 {
				trip = <0x4d>;
				cooling-device = <0x4c 0xffffffff 0xffffffff>;
				contribution = <0x2000>;
			};
		};
	};

I tried to modify the dts like this

/plugin/;
/ {
        fragment@0 {
                target-path = "/";
                __overlay__ {
			fan0: pwm-fan {
				compatible = "pwm-fan";
				#cooling-cells = <2>;
				cooling-levels = <0 130 150 200 255>;
				pwms = <&pwm1 0 10000 0>;
			};
		};
	};
        fragment@1 {
                target = <&soc_thermal>;
                __overlay__ {
			polling-delay = <1000>;
			polling-delay-passive = <2000>;
			trips {
				trip-point-0 {
					temperature = <55000>;
					hysteresis = <5000>;
					type = "active";
				};
				trip-point-1 {
					temperature = <60000>;
					hysteresis = <5000>;
					type = "active";
				};
				trip-point-2 {
					temperature = <65000>;
					hysteresis = <5000>;
					type = "active";
				};
				trip-point-3 {
					temperature = <80000>;
					hysteresis = <1000>;
					type = "active";
				};
			};
			cooling-maps {
				map0 {
					trip = <&trip0>;
					cooling-device = <&fan0 0 1>;
					contribution = <1024>;
				};
				map1 {
					trip = <&trip1>;
					cooling-device = <&fan0 1 2>;
					contribution = <1024>;
				};
				map2 {
					trip = <&trip2>;
					cooling-device = <&fan0 2 3>;
					contribution = <1024>;
				};
				map3 {
					trip = <&pcritical>;
					cooling-device = <&fan0 3 4>;
					contribution = <1024>;
				};

			};
		};
	};
};

It compiles, but it doesnt work.

You are almost there.

When you reference a trip point in cooling maps, you are using &trip0 node,
trip = <&trip0>
but this node is not aliased in trips list
trip-point-0 {…
It should be trip0 : trip-point-0 {

You can refer to rk3588s.dtsi, where armbian folks are directly using target and threshold trop points which are 75c and 85c

Ps: im writing with mobile phone, may contain typos…

So modifying the original dts’s trip-point@0 1 2 3 to trip-point-0 1 2 3.

That way it compiles, but the pwm fan still doesnt work.

I also tried again using the dts without modifications by ignoring those warnings. The fan is not spinning, and it seems broke sth in the system as when I echo to performance mode, it gives me file not found and does not trigger to performance, and the glmark score are terribly slow.

I am now using this package instead :