[Guide] Best option for Ubuntu Desktop

Khadas Ubuntu Image is Fire :smiley:

This is my experience more for a more gaming experience and as I love the web apps this is the system I can recommend yous. Here’s to take the best Khadas resources:

ooWoW Install Khadas Stock Ubuntu image.
Download Joshuas-Riek latest Ubuntu-RockChip Image


  • if downloading with wget use condition –no-check-certificate to avoid the download to fail or use an app like jdownloader.

  • After starting the system you most likely have to open your disk storage and perform a disk resize

  • Some systems start in x11 so you will notice that the system fails to deliver its brilliant performance at launch so make sure you switch gnome to wayland.

Pre-Requirements if flashing image via RK Dev tools:

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.

For this guide I took the liberty of using nala as a main option for this board:
Do your operations with nala instead of apt:
(It’s faster - It’s modern - It’s graphically easier - Has better debug)
sudo apt update && sudo apt install nala -y && sudo nala upgrade -y

Chrome optimizations flags

sudo gedit /etc/chromium-browser/default

malirun chromium-browser (terminal boster for an extra kick - optional)

#Set Chromium ozone to Wayland only if you intend to use Gnome Wayland
#Set user agents specifically so it works on Netflix with widevine
--user-agent="Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36" --accept-lang=en-US
#Fixes Chromium browser pixelation bug on wayland

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:

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

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

Start the Android Emulator on Terminal:

#malior-droid start / stop / restart
malior-droid start
adb connect localhost:5555
scrcpy -s localhost:5555
malior-droid resize 720x1280

#malior-droid resize 1920x1080

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

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 for this.
Sources: GitHub - ChisBread/malior: malior is the game container of arm

@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 box64/box86 and steam and malior-droid.

More useful stuff on Linux:

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:
#--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

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 all who 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.



I downloaded the following image:
Armbian for Khadas Edge 2 with AmazingFate Drivers RPardini Kernel by MonkaBlyat

I copied it on an exFAT formatted USB Stick, and booted OOWOW trying to install it but it doesn’t even see the files.
I also unpacked it and got an .img file, copied that one also but doesn’t see it either.
Here’s the steps I did:

  1. Downloaded and copied the .img.xz file to a USB Stick (tries different sticks as well thinking it may be faulty but it’s not the case).
    2, I inserted the USB stick containing the image and I booted the Kedge2 into OOWOW
  2. In the OOWOW menu I went to “Write image to eMMC” > “…/” > “USB-sda1-MyUSB” , and the directory/stick is empty, nothing to select.

Am I missing something? Could you please let me know how to properly flash this Armbian image to my Kedge2 ?

Thanks in advance!

What you explained is entirely correct and worked for me:
Wiped the USB to exfat.
Copy Pasted the image as downloaded.
Booted up into OoWoW “write image to emmc” back to USB and my file was there.

Since it didn’t worked for you I suggest you to try the RkDevTools method.

Its just a matter of selecting files plugging cable and Run the program.

1 Like

Thank you! I was about to give up then tried a 32GB KINGSTON usb and was somehow able to see the image.
This version is a bit slow and buggy but it works.
One more thing I wanted to ask, do you know how to make use of the entire 64GB eMMC ?
Seems that It’s only using half of it:

rock@khadas-edge2:~$ lsblk
mmcblk0 179:0 0 58.2G 0 disk
└─mmcblk0p1 179:1 0 58.2G 0 part /var/log.hdd
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
zram0 254:0 0 7.7G 0 disk [SWAP]
zram1 254:1 0 50M 0 disk /var/log
rock@khadas-edge2:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 13M 1.6G 1% /run
/dev/mmcblk0p1 15G 14G 917M 94% /
tmpfs 7.7G 305M 7.4G 4% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.7G 19M 7.7G 1% /tmp
/dev/zram1 47M 3.6M 40M 9% /var/log
tmpfs 1.6G 136K 1.6G 1% /run/user/1000

Thanks in advance!

Screencast from 08-07-2023 05_52_56 PM

Nevermind, I managed to resize the filesystem and make it utilize the whole disk by performing the following steps:

  1. Open terminal.
  2. Switch to the root user.
  3. Run the following command : sudo resize2fs /dev/mmcblk0p1
    Output would look like this:

root@khadas-edge2:~# /etc/init.d/resize2fs start
-bash: /etc/init.d/resize2fs: No such file or directory
root@khadas-edge2:~# sudo resize2fs start
resize2fs 1.46.5 (30-Dec-2021)
open: No such file or directory while opening start
root@khadas-edge2:~# sudo resize2fs /dev/mmcblk0p1
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
The filesystem on /dev/mmcblk0p1 is now 15263739 (4k) blocks long.

  1. Check the space afterwards using the following command: df -h
    Output would look like this:

root@khadas-edge2:~# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 13M 1.6G 1% /run
/dev/mmcblk0p1 58G 13G 44G 23% /
tmpfs 7.7G 223M 7.5G 3% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.7G 11M 7.7G 1% /tmp
/dev/zram1 47M 3.7M 40M 9% /var/log
tmpfs 1.6G 152K 1.6G 1% /run/user/1000
root@khadas-edge2:~# sudo resize2fs /dev/mmcblk0p1

That version is not slow and buggish you have to switch gnome to wayland. X11 on any rk3588 is always poor.
Wayland on that image is fire. Try it log out and switch and login.

For some reason monkablyet is obsessed with x11 using blobs to have hw acceleration but I personally dont fancy that.

Edit: yeah he often forgets to fix the storage size resize having us to do it manually. But its an easy trick.

Also: The image to go is the first one I posted with the legacy 5.10. The others are not yet ‘really’ mainline.

1 Like

Just did a sudo apt update && sudo apt get upgrade and it broke Chromium Browser on this image :slight_smile: : https://monka.systemonachip.net/edge2/Armbian_23.09.420-rkr5.1_Khadas-edge2_jammy_legacy_5.10.160-rk3588-multimedia-gaming.img.xz

Yeah… issues of the ‘community’ images… and the modified chromium browser… he will eventually fix that.

Download Joshuas-Riek latest Ubuntu-RockChip Image

Its also an good alternative. (but not yet available for khadas edge 2).