[How To] Install run Manjaro ARM on Amlogic TV Boxes with S922X - S905X3 SOC

[How To] Install run Manjaro ARM on Amlogic TV Boxes with S922X - S905X3 SOC

This tutorial is aimed for users who own an Amlogic SOC based TV Box and would like to try running Manjaro ARM OS over sd card.

How to run over sd card:

  • Download the Manjaro-ARM-kde-plasma-vim3-21.02 file from the link. Verify that the download completed successfully.
  • Install Etcher (sudo pacman -S etcher if on Manjaro) and burn the to an SD card (8 GB or larger).
  • Open extlinux.conf from Boot partitons extlinux directory. Verify or change the dtb name according to the device you own and save the changes. (To know the right dtb name you will have to ask or look online)
  • Now insert the sd card which you have flashed Manjaro-ARM-kde-plasma-vim3-22-11-2020 image on.
  • Enable Multii-Boot mode most devices can do this by just pressing and holding reset button while powering the device on with sd card inserted. (This have to be done only 1 time.)
  • This it should recognize the SD card as a bootable device and boot from it.
  • You will see the Kernel loading and it will take you to the First Time OEM Setup screen

First Time setup
This release sports the First Time setup for all images, also via SSH. This means that at first boot, you will be asked about the following:

  • keyboard layout
  • username
  • additional user groups (optional)
  • full name
  • password for that username
  • password for root
  • timezone
  • locale
  • hostname

Then the setup script will set these settings and reboot to the login screen. If it fails to restart then just power off and power on the device.

On first boot during the login screen please switch the KDE Session from Plasma Wayland to just Plasma.

Also run the sound service to enable sound and reboot.

Pass this command in konsole(terminal):
sudo systemctl enable sound --now

How to install Manjaro on eMMC; - **Does not work anymore since using the new chainloader method. **

  • Start Manjaro over SD Card.
  • Test if everything is working fine as needed.
  • Make sure there is not addition storage device connected.
  • Make sure to backup data of emmc.
  • Run command sudo /boot/install-aml-emmc.sh
  • Once it shows Flasing Manjaro to eMMC then reboot with sd card inserted and boot into sd card os again.
  • Reboot and remove the sd card, OS should boot over eMMC.

Netflix/Amazon/Spotify can be viewed using chromium-docker. Using the below command.
sudo pacman -S chromium-docker

Try installing Manjaro on eMMC at your own risk as we have not tested this on your device. I or Manjaro ARM Project will not be responsible if you brick your device.

Flashing Android back to AMlogic boards after trying Manjaro ARM on eMMC

Good Luck.

Donate!

Please consider supporting Manjaro ARM directly via Patreon, Ko-Fior Open Collective.
You can also donate to our upstream, which is Arch Linux ARM.

7 Likes

Reserved for DTB List

Device Name DTB SOC Tested by
Khadas Vim3 meson-g12b-a311d-khadas-vim3.dtb S922X(A311D) Manjaro
Beelink GT King meson-g12b-gtking.dtb S922X N/T
Beelink GT King Pro meson-g12b-gtking-pro.dtb S922X-H @JFL
Beelink GS King X meson-g12b-gsking-x.dtb S922X-H Manjaro
Ugoos Am6 plus meson-g12b-ugoos-am6.dtb S922X-J @tripole
X96 Air P3 meson-g12a-sei510.dtb S905X3 @dante6913
Tanix TX3 meson-g12a-sei510.dtb S905X3 @jbolanosg
X96Max+ meson-sm1-sei610.dtb S905X3 @TheMojoMan
A95x F2 meson-g12a-u200.dtb S905X2 @SickOS

Thank you for all the testers mentioned here.

3 Likes

Reserved for Issue List

If any user have issue with getting it to run on their device which is not mentioned in the list then a new thread have to be started with the Device name in the title.

Thank You.

I’m using meson-g12a-u200. dtb on A95X F2

1 Like

It is also possible to startup the manjaro using the image for vim2 on the Nexbox A95X (S905X - meson-gxl-s905x-nexbox-a95x.dtb). But the sound does not work (without dt bindings), wifi and maybe something else.

Summary

Did you check if sound service is running?

Yep. A95X dts file doesn’t contain sound nodes. But lepotato contain:

And with meson-gxl-s905x-libretech-cc.dtb hdmi sound works on nexbox A95X.

Ok just checked this device spec it is S905X so its not from g12 or sm1 series. It is gxl and gxm.

I will prepare another similar tutorial and thread of S905(X,W) and S912 so users can follow up on that thread.

1 Like

For x96Air P3 I just want to say that after the first boot using meson-g12a-sei510.dtb we need to change the dtb to TinyUpload.com - best file hosting solution, with no limits, totaly free (this is custom made by @TheMojoMan) to be able to use Ethernet and sound

@spikerguy micro-add-howto for Ugoos Am6 plus:

After installation, following the official How To, the Ugoos will have a working desktop, ethernet connection and sound (via HDMI). Moreover, Bluetooth may be able to detect devices but might not work properly and there will be no WiFi. (Screen glitches might also be present.) In order to fix these issues, the following (five) steps can be taken:

Note; reboots must often be done on this box as cold reboots, in order to get reliable results.

  1. Fix1 (SDIO clock): Decompile, edit and recompile the dtb as follows (a ready-made dtb is linked below). In the decompiled dts file, locate the section sd@ffe03000 { …}. There, edit the line
    max-frequency = < 0x5f5e100 >;
    to read
    max-frequency = < 0x2b594d1>;
    (This will lower the SDIO clock from 100MHz to 45.454545MHz.) Recompile and install the dtb (and edit accordingly in extlinux.conf).
  2. Fix2 (name of firmware file):
    cp /lib/firmware/brcm/nvram_ap6398s.txt /lib/firmware/brcm/brcmfmac4359-sdio.ugoos,am6.txt
  3. Fix3 (Bluetooth): The device number for the Bluetooth chip must be adapted to the Ugoos. The device will appear (after the SDIO fix above) as /sys/bus/mmc/devices/mmc0\:0001/mmc0\:0001\:1/device. This must be edited in the file /usr/bin/bluetooth-khadas.sh, along with the edits marked by ### (triple hashtag), like so:
Summary
#!/bin/bash

linux_ver=`uname -a | awk '{print $3}'`

###if linux-version compare $linux_ver ge 4.12; then
        ## Mainline kernel
        model=`cat /sys/bus/mmc/devices/mmc0\:0001/mmc0\:0001\:1/device`
        bt_tty="ttyAML1"

        exit 0
###else
###     ## Legacy kernel
###     model=`cat /sys/bus/mmc/devices/sdio:0001/sdio:0001:1/device`
###     bt_tty="ttyS1"
###fi

/usr/sbin/rfkill block 0
/bin/sleep 2
/usr/sbin/rfkill unblock 0

FIXME Delay

/bin/sleep 1

Attach HCI adapter

/usr/bin/hciattach -n -s 115200 /dev/$bt_tty bcm43xx 2000000

  1. Fix4 (CPU speed governor): The governor schedutil with explicit frequency settings can be installed and utilized as follows: (This is one way of fixing the screen glitches.) Install the cpupower package pacman -S cpupower Edit the following lines of /etc/default/cpupower like so:
Summary
# Define CPUs governor
# valid governors: ondemand, performance, powersave, conservative, userspace.
governor='schedutil'

# Limit frequency range
# Valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="1000MHz"
max_freq="1.99GHz"

Enable the associated systemd service: systemctl enable cpupower --now

  1. Reboot and check.

Notes:

  • A ready-made dtb with the edit above is here; meson-g12b-ugoos-am6-SDIO45MHz.dtb.
  • Sometimes the ethernet is unreliable when using default settings and 1GBits/s speed. (This is apparently an ongoing issue across many amlogic boards.) Setting the speed (e.g. in Network Manager) to 100MBits/s fixes this.
  • The khadas-utils service can be disabled (since it controls fans, and the Ugoos is fanless): systemctl disable khadas-utils.service --now
  • The analog output/mic does not work. The Ugoos Am6 plus has a rt5651 analog audio chip which is supported in the mainline kernel but not (yet) in the corresponding dtb.
  • For more info about these and similar tweaks, see the Manjaro ARM on TV Box thread.
  • Edit: The Alsa sound card definition shipped with the Manjaro VIM3 image is in the file /usr/share/alsa/cards/G12B-KHADAS-VIM3.conf There is a corresponding file (due to LibreElec) for the Ugoos named G12B-UGOOS-AM6.conf which will create a different set of audio devices in pulseaudio (e.g. S/PDIF outputs). It is included in some other distros.
1 Like

Thank you for the details instructions.

These won’t be needed once I receive the sample device from ugoos next week as I will create a ready to flash image for it with all the needed optimization.

Happy to have you in the community to help other users. :slight_smile:

1 Like

I’m using meson-g12a-sei510.dbt on Tanix TX3.

1 Like

I have 4GB/64GB version of X96 Max Plus, It has Gigabit Ethernet, dual band wifi and BT 4.0, I want to use it as a headless server.
I followed the instructions above and managed to boot using meson-g12a-x96-max-rmii.dtb, but ethernet (RTL8211f), wifi-BT (RTL8822CS), IR and usb 3.0 does not work.

  • Is there any dtb available for this box?
  • Is there any minimal/server image available?

Thanks

Hello and welcome to the forum.

Yes as per @TheMojoMan he got it to work with this dtb meson-sm1-sei610.dtb
As informed by him here

No but I can build one tomorrow.

Thank you for your prompt reply,
I tried that dtb, I can see in dmesg that the eth0 is detected as gigabit, it negotiates the speed with my switch, but failed at getting ip address from dhcp, setting static ip does not help, I can not ping the router, then after few seconds, it shows “connection deactivated”.

[   16.797502] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
[   16.825178] meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found
[   16.838497] meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW
[   16.853660] meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rgmii-txid link mode
[   18.161190] kauditd_printk_skb: 25 callbacks suppressed
[   18.161197] audit: type=1131 audit(1601748793.867:37): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=bluetooth-khadas comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[   60.298966]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.306272]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.312491]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.319198]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.326012]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.333387]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.341054]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.346455]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.353896]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.360919]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.367398]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.376100]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.381571]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.388381]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.395152]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.402583]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.410542]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.415680]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.423093]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.430052]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   60.436595]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   21.039877] meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   21.042723] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1051.033190] audit: type=1131 audit(1601749826.737:143): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1080.116038] meson8b-dwmac ff3f0000.ethernet eth0: Link is Down
[ 1080.252916] audit: type=1130 audit(1601749855.957:144): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1083.919488] meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 1083.951167] meson8b-dwmac ff3f0000.ethernet eth0: Link is Down
[ 1088.086934] meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

Someone posted a dtb for this board in Armbian forum, tried it with Manjaro ARM, but it caused boot loop.

Thank you, appreciate it.

There is an ongoing issue (since some time) with the boards that have the rtl 8211 (search also for PHY and dwmac) and it can sometimes help to fix the speed at 100Mbit/s (e.g. in Network Manager).

1 Like

I found this topic on Armbian, someone managed to solve the gigabit issue, but I’m not sure if it works with Manjaro.

forum .armbian .com/topic/15376-methods-to-fix-x96-max-pluss905x3-gigabit-ethernet-problem
(I can’t post links, remove the spaces from url)

Thanks for the link. If I understand it correctly, the solution discussed in that thread is based on overwriting the resident bootloader which (as pointed out there) will prevent any resident Android from booting. The problem with the ethernet initialization/speed is being worked on, by several people/groups, so at least I will wait. (I’m pretty sure it will be solved/mitigated in a not too distant future.)

Thank you for sharing the link, I see that it needs a custom uboot which is not a good idea for normal users.
the overlay for 100m lan is fine. that can be patched outside.

Yes it is better to wait until a stable fix is pushed upstream.

Beelink GT King Pro works with meson-g12b-gtking-pro.dtb. Wifi, ethernet, sound available on linux-vim kernel and linux-5.9.12-3 kernel.

Good seeing more and more TV Box users on Manjaro.

2 Likes