[Guide] Best option for Armbian - Afterburner Image by MonkaBlyat

MonkaBlyat very best version of Armbian with drivers ready and Optimised for Action

This is my armbian experience dedicated for gaming and as I love the webapps this is the system I prefer to use as it is always updated so here it goes I am using MonkaBlyat’s Afterburner Armbian Image which is modded to work well with the Mali GPU and takes the best advantages on most Khadas Edge 2 resources:


Armbian for Khadas Edge 2 with AmazingFate Drivers RPardini Kernel by MonkaBlyat
https://monka.systemonachip.net/nicod-armbian-gaming/Armbian_23.05.70-rpardini_Kedge2_jammy_legacy_5.10.110_gnome-amazingfated_desktop.img.xz


user: rock , password : armbian - Other sources or user: root , password : 1234


Pre-Requirements:

To flash this image you will need or either the .img.xz on a flash pendrive booting the board into oowow locating the file and selecting “write this image to emmc” in the oowow option or you can download the latest RkdevTools for Windows:

1 - You need this RKDevTool 2.96 it’s driver it’s emmc config file and its spi loader file

2 - Maskrom Mode - Cable into the type C next to the Edge 2 fan (top side) and usb to the PC - then press 3 times function button with RkDevTools open

3 - In ‘Download Image’ tab - right click Load config to emmc, select the rk3588_spl_loader_v1.08.111.bin on the first option select exfat_usb_image.img.xz on the second option, select ‘Write by Address’ then press RUN and wait until its completed. #yes it takes time# and obviously step 2 needs to be in place.



Max out the Edge 2 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"

OBS for Streaming / Recording

sudo nala install obs-studio obs-gstreamer obs-plugins xdg-desktop-portal pipewire qtwayland5 librga2 gstreamer1.0-plugins-bad gstreamer1.0-rockchip1 -y
#RESTART here and then run OBS with:
MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330 obs

Try some benchmarks - on Ubuntu Wayland to guarantee you are all set.

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.

Try chromium with malirun chromium-browser on terminal for some extra performance (malirun works with other apps too).


Play Geforce Now via Chromium Browser well optimised on this little Khadas Edge 2!


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
#Script will go like this and you just select what you want.
#1. Install/Update Box64.
#2. Install/update box86.
#3. Install wine 64 files.
#4. Install wine x86 files.
#5. Install winetricks.
#6. Install steam.
#7. Build and install PPSSPP.
#8. Install Malior-droid Android emulator.
#9. Build Duckstation PS1 emulator.
#10. Download Aethersx2 PS2 emulator.
#11. Build Xonotic.
#12. Exit


Install Malior-Droid for the Android fun with Scrypy Container

sudo nala install docker docker.io adb -y
sudo mkdir /dev/binderfs
sudo mount -t binder binder /dev/binderfs
wget -O - https://github.com/ChisBread/malior/raw/main/install.sh > /tmp/malior-install.sh && bash /tmp/malior-install.sh  && rm /tmp/malior-install.sh 
#it takes long to fetch for the doBox file be patient
malior update
malior install malior-droid
malior-droid update

Install scrpy version 2.0 that is needed for audio forwarding from the android docker container

sudo nala install ffmpeg libsdl2-2.0-0 adb wget gcc git pkg-config meson ninja-build libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswresample-dev libusb-1.0-0 libusb-1.0-0-dev -y
--
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
./install_release.sh


Change it to english this way. Just drag and drop your .apk file into the android window it will auto install it.

Start the Android Emulator on Terminal:

malior-droid
adb connect localhost:5555
scrcpy -s localhost:5555

App to map the gamepad controller sudo apt install antimicro

To become certified with access to the play store you have to:
1 - Install a device ID apk to get this Device ID and register it on your google account.
2 - Register it here: https://www.google.com/android/uncertified/
3 - Give it a day till google approval happens. (Hours minutes or maybe 1 day not in our control).

Credits to @bread and @monka for this.
Sources: GitHub - ChisBread/malior: malior is the game container of arm


More useful stuff on Linux:

#--OBS--
sudo nala install obs-studio obs-gstreamer obs-plugins xdg-desktop-portal pipewire qtwayland5 librga2 gstreamer1.0-plugins-bad gstreamer1.0-rockchip1 -y
#RESTART here and then run OBS with:
MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330 obs
#--this is the way it works on armbian not sure if needs changed for FydeOS

#for a better desktop experience dont use nala on ubuntu-desktop
sudo apt install ubuntu-desktop

sudo nala install htop -y
sudo nala install neofetch -y
sudo nala install bpytop -y
sudo nala install snapd -y
sudo nala install emojione -y
sudo nala install kodi -y
sudo nala install inkscape -y
sudo nala install flatpak gnome-software-plugin-flatpak squashfs-tools && sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo nala install gnome-software gnome-packagekit -y

# or all at once and correctly
sudo nala update && sudo nala install htop bpytop neofetch snapd flatpak xcb obs-studio obs-gstreamer obs-plugins xdg-desktop-portal pipewire qtwayland5 librga2 gstreamer1.0-plugins-bad gstreamer1.0-rockchip1 gnome-software-plugin-flatpak squashfs-tools gnome-software gnome-packagekit kodi inkscape -y && sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && sudo nala upgrade -y && sudo nala autoremove
sudo reboot
exit

Im not an linux expert… compiling kernels makes me a lot of confusion so I have a lot to learn yet… but I like to share my experience hoping it helps you the same way it helped me.


This post is made possible thanks to a few members who helped me a lot on Discord so I want to thank them and off course many others did help too (but I can’t find all their names here). Discord for a more direct approach: Khadas Discord

Credits goes to MonkaBlyat who is an Armbian user mostly active on Discord channels and made all this possible and also a group of talented users: @GinKage @bread @igorp @rippanda12 @amazingfate @monka @student @NicoD


Im open to suggestions and improvements and more additional stuff we can add to this system and improve our experience.


4 Likes