Armbian - Rock 5B - the best option 🐧




Startup:
Go to https://www.armbian.com/rock-5b/
Download the latest version of @igorp operative system flash it into your emmc or microsd, boot rock 5B with it and then… look here for some options if you feel the need off course.

For this tutorial I opted by using nala as a main option for this board:

sudo apt install nala -y #do your operations with nala instead of apt
(It’s faster - It’s modern - It’s graphically easier - Has better debug)

In hope this helps everyone like it does to me here goes some tips.

Things to consider:
Sometimes reboot will not work and if in due update it will brick so I suggest that you opt by doing shutdown and then start the system again for safety.
Users do set to automatic login, system runs perfect on Ubuntu Wayland, Cloud Gaming is amazing on GFN, then you have Wine and @Ptitseb masteries on box64/box86 which makes it perfect.

For the fan heatsink to work:
(Armbian)

git clone https://github.com/lukaszsobala/fan-control-rock5b
cd fan-control-rock5b
make package
sudo dpkg -i fan-control*.deb
sudo systemctl enable fan-control
systemctl start fan-control

Or Non-GPIO 4012 Fan Fix (Archlinux) (not for armbian).

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

A8 Module Bluetooth:
sudo su
nano /etc/modprobe.d/blacklist.conf
then add these lines somewhere (at the bottom of the file is fine):

blacklist pgdrv
blacklist btusb
blacklist btrtl
blacklist btbcm
#blacklist btintel

Then press Ctrl+X, then Y.
sudo nala install bluez -y or bluetooth – not needed to install since latest armbian version
systemctl status bluetooth CTRL+ C
systemctl start bluetooth
Then reboot .

For AX210 Wifi and BT to Work - Not sure if we can activate this without internet at all.

#wifi
sudo wget -P /lib/firmware https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-ty-a0-gf-a0-59.ucode
sudo mv /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm.bak

#bt
sudo wget -P /lib/firmware/intel https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/intel/ibt-0041-0041.sfi
sudo wget -P /lib/firmware/intel https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/intel/ibt-0041-0041.ddc

Audio Tutorial for Bluetooth devices: – (not required since armbian latest versions)


sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo nala install pipewire pipewire-audio-client-libraries gstreamer1.0-pipewire libpipewire-0.3-{0,dev,modules} libspa-0.2-{bluetooth,dev,jack,modules} pipewire{,-{audio-client-libraries,pulse,media-session,bin,locales,tests}} -y

systemctl --user daemon-reload
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user --now enable pipewire pipewire-pulse
pactl info
reboot


(Short guide) SPI flashing on the board itself would be:

wget https://dl.radxa.com/rock5/sw/images/others/zero.img.gz
gzip -d zero.img.gz
sudo dd if=zero.img of=/dev/mtdblock0

Wait ~5 minutes for the command to complete, check that sudo md5sum /dev/mtdblock0 returns 2c7ab85a893283e98c931e9511add182. Then:

wget https://dl.radxa.com/rock5/sw/images/loader/rock-5b/release/rock-5b-spi-image-g49da44e116d.img
sudo dd if=rock-5b-spi-image-g49da44e116d.img of=/dev/mtdblock0

Wait ~5 minutes for the command to complete, check that this time sudo md5sum /dev/mtdblock0 returns 46de85de37b8e670883e6f6a8bb95776. Then:

sync
reboot

For more info: https://wiki.radxa.com/Rock5/install/spi


More info (Spi to NVME boot from SD Card):
http://www.fieldday.io/armbian-rock5b/


Issues with Google Apps Device Isn’t Play Protect Certified? (On Android OS)
Install an android id apk and register the id on this website https://www.google.com/android/uncertified/
Wait 5 minutes,reboot and google playstore will work.

Use this apk ,install it and open it then use the number in the top left corner to register
Also: https://forum.radxa.com/t/solve-google-play-device-is-not-play-protect-certified-issue/229


Apps:

#optional nala and ubuntu-desktop
sudo apt install nala -y #do your operations with nala instead of apt
sudo nala install ubuntu-desktop -y #that is if you want desktop changed
--
sudo nala install fonts-emojione -y
sudo nala install btop -y
sudo nala install synaptic -y
#--OBS--
sudo nala install xcb obs-studio obs-gstreamer obs-plugins xdg-desktop-portal pipewire qtwayland5 -y
#RESTART here and then run OBS with:
export QT_QPA_PLATFORM="xcb"
MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330 obs
#or all at once:
sudo nala install nala fonts-emojione btop synaptic xcb obs-studio obs-gstreamer obs-plugins xdg-desktop-portal pipewire qtwayland5 -y && sudo nala upgrade -y

Rock 5B Graphics Panfrost/fork on Wayland

sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa
sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
sudo nala update && sudo nala install glmark2 glmark2-es2 glmark2-es2-wayland mesa-utils malirun -y && sudo nala upgrade -y
---
sudo shutdown -h now (better shutdown to avoid boot hangings)
glxinfo|grep OpenGL -- check actual status of things
#More optional stuff
#sudo nala install mali-g610-firmware libegl-mesa0 libegl1-mesa-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libglx-mesa0 mesa-common-dev mesa-vulkan-drivers

Max out the 5B performance (Optional) - That’s if you want some real performance at the cost of being hot and power-hungry.

echo performance | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor /sys/class/devfreq/dmc/governor /sys/class/devfreq/fb000000.gpu/governor

Once you’re done with your benchmarks, you may want to go back:

echo ondemand | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor
echo dmc_ondemand | sudo tee /sys/class/devfreq/dmc/governor
echo simple_ondemand | sudo tee /sys/class/devfreq/fb000000.gpu/governor

Or if you want a shortcut for performance / ondemand and powersave do nano .bash_aliases and add these instructions - save it Ctrl X, Yes, restart and after just type the governor you desire Terminal: performance to trigger it.

alias performance="echo performance | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor /sys/class/devfreq/dmc/governor /sys/class/devfreq/fb000000.gpu/governor"
alias ondemand="echo ondemand | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor && echo dmc_ondemand | sudo tee /sys/class/devfreq/dmc/governor && echo simple_ondemand | sudo tee /sys/class/devfreq/fb000000.gpu/governor"
alias powersave="echo powersave | sudo tee /sys/bus/cpu/devices/cpu[046]/cpufreq/scaling_governor /sys/class/devfreq/dmc/governor /sys/class/devfreq/fb000000.gpu/governor"

Try some benchmarks - Ubuntu Wayland

PAN_MESA_DEBUG=gofaster glmark2 
Expected results: 1st Line - 1669fps - Score: 1249fps - you are good.

PAN_MESA_DEBUG=gofaster glmark2-es2-wayland 
Expected results: 1st Line - 3527fps - Score: 4067fps - you are sorted.

LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/mali glmark2-es2-wayland 
Expected results: 1st Line - 4229fps - Score: 3933fps - what a legend.

For Mali to Work on Armbian on Wayland
Do GPU acceleration in Wayland with malirun as trigger !

malirun chromium-browser

Switching Between Mali Blobs and Panfrost - for experts to run X11 like a Pro
https://gist.github.com/stvhay/5654368e73f93349c3ffae395eccd892#switch-between-mali-and-panfrost

This https://github.com/jiangcuo/Proxmox-Arm64
Allows you to Run Windows 7 on Rock 5B Virtualized


Steam Installation Tutorial

You can avoid nala by replacing it with apt. I prefer nala so first open the terminal type:

sudo apt install nala -y && sudo nala update && sudo nala upgrade -y

Installing Dependencies

First we need to install some dependencies that are required by Steam. Use the following lines:

sudo dpkg --add-architecture armhf
sudo nala update && sudo nala install build-essential git cmake gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libappindicator1 libnm0 libtcmalloc-minimal4 binfmt-support liblttng-ust-dev libcairo2:armhf libgmp10:armhf libvulkan1:armhf libudev-dev:armhf -y

Next we’re going to install Box64. Paste the following lines in your terminal:

git clone --depth 1 https://github.com/ptitSeb/box64
mkdir -p box64/build; cd box64/build
# build for rk3588 
cmake .. -DRK3588=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
sudo make install

We also need Box86:

cd ~
git clone --depth 1 https://github.com/ptitSeb/box86
mkdir -p box86/build; cd box86/build
# build for rk3588
cmake .. -DRK3588=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
sudo make install

Fixing missing packages:

sudo nala install libsdl2-dev libpng-dev:armhf libncurses6:armhf libncurses6 libcups2:armhf libcups2 -y
cd /usr/lib/arm-linux-gnueabihf/
sudo ln -s  libpng16.so libpng12.so.0

That’s it for the dependencies! Before you continue you should reboot the device with:

sudo reboot

Starting Steam

First we need to configure the environment for Steam. Use the following lines to add two environment variables to your Linux environment:

echo 'export STEAMOS=1
export STEAM_RUNTIME=1
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1' | sudo tee /etc/profile.d/steam.sh

#if you have a high resolution screen use this instead
#echo 'export GDK_SCALE=2' | sudo tee -a /etc/profile.d/steam.sh
source /etc/profile.d/steam.sh

Next we’re going to use Box86’s install_steam.sh script like this:

cd ~/box86
./install_steam.sh
steam #just wait.

Installation is now finished EnJoy!


@nicod Has also a gaming script that works for all rockchip single boards:

git clone https://github.com/NicoD-SBC/armbian-gaming.git
cd armbian-gaming
/bin/bash ./armbian-gaming.sh
# Install from 1 to 3 will be steam
# Install from 4 to 6 will be wine / wine desktop and all its 'wine'-tricks
# Install other options too if you want.

image


The credits are not mine this soup was given by the most talented members of this community so thanks to everyone that help me as I am new to all this.
@GinKage @incognito @rauxon @Googulator @amazingfate @student @stvhay


Another amazing guide for Steam installation: https://jamesachambers.com/radxa-rock-5b-steam-installation-guide-for-armbian/

17 Likes

Great review post. Thank you!

2 Likes

Great post, thanks. Appreciate the details and it being linked to the official page.

Had rock 5b brick also recently. Just wanted to confirm, it happens during reboot only? mine did after an update (and possibly a reboot).

yeah pretty much it… don’t do restarts… just shutdown and cut power and power on. That’s how I have been playing around.

Thanks for this post (and the afterburner image post). It really is the fastest way to get the rock5b up and running with acceptable performance and stability.
I have been running this setup now with nvme and the A8 for over a month as a daily work desktop and is very impressed by how capable it is even in this early stage of development.
The only problem I have encountered is some random dns/resolv problem which there migth be a fix for here:

1 Like

Where to find more details about this please?

In the link you just quoted.

The link has no information about Windows 7. The link is to an (unofficial) ARM64 port of Proxmox VE, which, by itself, is a purpose built Linux distribution with web enabled access to LXC and KVM. LXC only supports Linux guests and KVM supports virtualization of underlying hardware, ARM64, in this case. Hence, in theory Windows 7, which has no ARM port, should not work as guest; at least not virtualized (QEMU emulated should work, albeit with poor performance)


Thats all the information I have. Sorry Dan I dont use Proxmox.

Edit: https://discord.com/channels/855634073376260096/921238019019796560/1077315533361385623

While from the screen grab the KVM tunable flag seems turned on, the flag is probably getting ignored. While KVM can filter some CPU features, architecture of host and guest must be the same for virtualization to work. This is (non-KVM) emulation, instead


Steam installation guide for Armbian step by step.
Props to @jtremblant !

2 Likes

Is it possible to flash direkt to NVMe. openFyde is booting correct after flashing zu NVMe via balenaEtcher. When flashing Armbian_23.8.1_Rock-5b_jammy_legacy_5.10.160.img the Rock 5b doesn’t boot.

It is but requires you to flash the spi first for that to work. So I best suggest u not to and to flash your emmc then yes move files to nvme.

1 Like

I flashed the SPI with maskrom mode and an external computer already to boot fydeOS from it. But armbian doesn’t boot. Can you explain what you mean exactly?

edit: I missed that I need another SPI image (armbian version). Thanks for the advice @DarkevilPT

Likely its not bricked its the PD power loop and its never booting root, I have fallen foul of it so many times I don’t use PD and just have a 12v usb-c barrel connector.

1 Like

Yeah no to cpu emulation also :slight_smile:

https://github.com/edk2-porting/edk2-rk3588 is coming along slowly but likely will never run windows so that is all I know.

Also to anyone as does anyone know what the time base is of /sys/class/pwm/pwmchip2/pwm0/period is?

I am presuming milisecs… just checking as usually fans are 20-25Khz just above hearing range

I did a bash script but been wondering what the time base really is for period?
Anyway much prefer the GPIO fans as you can PWM a brushless 2 pin fan but they are not really wired up that way.

20mm 3pin gpio fan https://www.raspberrypi.com/products/raspberry-pi-4-case-fan/
30mm 3pin gpio fan https://thepihut.com/products/software-controllable-5v-30mm-fan-for-raspberry-pi
40mm 3pin gpio fan https://www.aliexpress.us/item/1005002518918026.html

I am not that keen on armbian as its always seems to come preinstalled with user side scripts.
I prefer vanilla apart from tweaks needed under the hood so why I prefer.

As sticks to rk3588 for a large nunber of boards and also has mainline and are closer to the original distro of Ubuntu but no Debian.

zgrep -i panfrost /proc/config.gz