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 :
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.
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 :
Logs :
[rock@alarm ~]$ /usr/lib/bluetooth/bluetoothd -n -d
bluetoothd[2343]: Bluetooth daemon 5.68
bluetoothd[2343]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
D-Bus setup failed: Connection ":1.86" is not allowed to own the service "org.bluez" due to security policies in the configuration file
bluetoothd[2343]: src/main.c:main() Unable to get on D-Bus
[rock@alarm ~]$ lsmod | grep blue
bluetooth 471040 14 btqca,btintel,hci_uart,btbcm,bnep,rtk_btusb
ecdh_generic 16384 1 bluetooth
[rock@alarm ~]$ dmesg | grep blue
[ 7.734516] hci_uart_bcm serial0-0: Looking up vddio-supply property in node /serial@feb90000/bluetooth failed
[ 12.324658] Modules linked in: bnep hci_uart btqca btbcm btintel 8852be rtkm r8125 rtk_btusb bluetooth ecdh_generic ecc apple_mfi_fastcharge sch_fq_codel dm_multipath fuse dm_mod ip_tables x_tables ipv6
[rock@alarm ~]$ systemctl status bluetooth
* bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: disabled)
Active: active (running) since Thu 2023-08-17 16:42:45 UTC; 9min ago
Docs: man:bluetoothd(8)
Main PID: 483 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 8906)
Memory: 3.0M
CPU: 50ms
CGroup: /system.slice/bluetooth.service
`-483 /usr/lib/bluetooth/bluetoothd
Aug 17 16:42:45 alarm systemd[1]: Starting Bluetooth service...
Aug 17 16:42:45 alarm bluetoothd[483]: Bluetooth daemon 5.68
Aug 17 16:42:45 alarm systemd[1]: Started Bluetooth service.
Aug 17 16:42:45 alarm bluetoothd[483]: Starting SDP server
Aug 17 16:42:45 alarm bluetoothd[483]: src/plugin.c:plugin_init() System does not support csip plugin
Aug 17 16:42:45 alarm bluetoothd[483]: src/plugin.c:plugin_init() System does not support vcp plugin
Aug 17 16:42:45 alarm bluetoothd[483]: src/plugin.c:plugin_init() System does not support mcp plugin
Aug 17 16:42:45 alarm bluetoothd[483]: src/plugin.c:plugin_init() System does not support bass plugin
Aug 17 16:42:45 alarm bluetoothd[483]: src/plugin.c:plugin_init() System does not support bap plugin
Aug 17 16:42:45 alarm bluetoothd[483]: Bluetooth management interface 1.18 initialized
I have just released a new update for the installation script.
The installation script should now works on WSL (Ubuntu/Debian) with the ability to mount a disk (Tips: start WSL as admin).
I have created a tool called arch-rock-config
(Arch Rock Configuration Utility) with the following features available :
Tips : You can also install arch-rock-config
even if you do not use my installation script, you can do so by running :
bash <(curl -fsSL https://raw.githubusercontent.com/kwankiu/archlinux-installer-rock5/main/tools/arch-rock-config)
I am also trying to add malior-droid, steam, wine, etc.
However,
for malior-droid, it seems binder is missing in kernel.
for steam, wine, etc, box86 is required but it is only available on armhf, not on alarm aarch64.Appreciate if anybody could help with this, feedback and PR are also welcomed.
TL;DR for features below: The fan-control is currently using the package method (not dtb). It works great. You can also change SoC performance mode, check temps, clock speed, etc. You can change kernel, bootloader, etc. You can easily downgrade any pacman available packages, and I also added some common packages for ease of installation (browser, office, discord, teams, vscode, box64, and many more.), arch-rock-config install
can also be used to install any packages from pacman and AUR.
Features | Description |
---|---|
upgrade |
Check & Perform Selective / Full System Upgrade. |
install-kernel |
Re-install / Replace Linux Kernel. kernel options: rkbsp, rkbsp-git, midstream. |
flash-bootloader |
Flash Latest SPI Bootloader. bootloader options: radxa, radxa-debug, edk2-rock5a, edk2-rock5b, armbian. |
Features | Description |
---|---|
install |
Package Manager (Install only), Includes RK3588 Specified and Customized Packages. You can use it like: arch-rock-config install chromium neofetch git
|
downgrade |
Install / Downgrade any Arch Linux ARM Packages from Archive (alaa). You can use it like: arch-rock-config downgrade chromium . By default only 15 archives shown, you may optionally add <index> to show more/less. |
Features | Description |
---|---|
soc |
Manage SoC Settings. options: performance , ondemand , powersave (and status for SoC Monitor). |
fan |
Configure PWM Fan-control. options: install , enable , disable and status . |
Features | Description |
---|---|
user |
Add, Remove and Change User Account Settings. |
locale |
Generate Locale Settings. |
font |
Install Fonts, TTF, Non-English Characters, Special Characters / Emoji. |
time |
Change Time Zone, Current Date and Time. |
keyboard |
Change Keyboard Layout. |
wifi |
Change WiFi Country Settings. |
I have also compiled and provided a Custom Chromium. However, I am not sure how it works and how to verify if chrome is using the v4l2-mpp or not.
I would suggest to have a look at https://github.com/7Ji/archrepo which is a binary repo of mostly available AUR libs for rockchip. It was meant for opi5 but works for rock 5 as well. There they have chromium-mpp with necessasry patches as well.
Hey boogie woogie
Can you please add this to your guide first post?
git clone https://github.com/XZhouQD/Rock5B_Naive_Pwm_Fan
cd Rock5B_Naive_Pwm_Fan/
cp fan_pwm /usr/local/bin/.
chmod +x /usr/local/bin/fan_pwm
cp fan_pwm.service /etc/systemd/system/.
systemctl daemon-reload
systemctl start fan_pwm
systemctl enable fan_pwm
There is always people asking.
Sorry, but I need a little hand holding. Computer A is the 5b, computer B is an x86 Arch install. I put a sd card via usb adapter into B and run the script installing on sd card. As the script runs I get messages about fstab but the script completes. I put the card into the 5b but it does not boot. Blue light does not change to green. If I check the install back on B there is nothing in fstab file. Any ideas? Thanks
No clue I didnt even tried that app yet.
Hi, I’ve been trying to get this to work. I run the instal script and I end up with a bootable system, but I cannot seem to log-in using the default credentials (alarm/alarm or root/root). I’ve tried over ssh and connected to a keyboard/mouse + monitor, none work. Am I missing something obvious?
SD Card, didn’t explicitly do anything with regards to the boot loader, so presumably u-boot? BSP Kernel.
I mean 1. Booted with display but can’t login.
I think i know what the problem is with kernel fan control. Simply the current config of debian of Radxa does not have CONFIG_SENSORS_PWM_FAN
in config which enables the pwm-fan module in the kernel. The dts changes are already there.
I have compiled the git kernel with such config changes applied in the link could you please verify if this works, i dont have a fan to test.
make sure the soc_thermal policy is at step_wise, if not set it.
cat /sys/class/thermal/thermal_zone0/policy
echo "step_wise" > /sys/class/thermal/thermal_zone0/policy
stress test with s-tui or streess-ng
if you set your policy to user_space, then those funky fan control software tools would still work, but for the rest of policies, kernel is taking over the control of the pwm. With an overlay you can also customize the fan curve of the kernel controller as well.
see:
Please note that about post is for armbian, radxa kernel have 5 stages curve unlike armbians 9 stages.
test kernel:
ps: i think, i think i can force default policy to step_wise by as well with CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
so people wont have to deal with it …
ps2: the change request to radxa kernel https://github.com/radxa/kernel/pull/197