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

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:
https://elixir.bootlin.com/linux/latest/source/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#L136

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.

1 Like

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

Does it run on Gt King Pro without kernel panic or not?
Kernel version in the package list is linux-vim 5.9.0-2, where and how did you get linux-5.9.12-3 kernel.

It will work but fail with kernel panic.

This package is linux-vim which is build from balbes kernel branch.

This is upstream linux kernel with patches for supported boards

You can install it using sudo pacman -S linux linux-headers
Incase headers are needed.
Source for the same can be found on our git.

Hi Darkstar,

Kernel Panic still persist even Beelink latest firmware update 914P0 on mainline kernel. As far as I know, the linux-5.9.13-1 (sound working on GT King Pro on this kernel) is available to Manjaro Stable Branch Update (2020-12-16). In my case if I want to change kernel in the same Manjaro branch I use “pacman gui” to install the kernel.

Hi Darkstar,

I might have accidentally found a solution for GT King Pro kernel panic on mainline kernel. I am now on Manjaro_ARM-VIM3-XFCE release 20.12 but with linux-vim 5.10.1-1 and a new u-boot.ext from LibreElec for_linux-vim-5101.tar — Yandex.Disk . With this new u-boot.ext the kernel panic on GT King Pro with Mainline Kernel 5.10.1-1 seems to be resolved at least so far I have tested where with the old u-boot.ext it always causes kernel panic on GT King Pro. Please do Manjaro arm on Tv box?.

Since you have GT King Pro, if you can confirm with this new u-boot.ext from LibreElec also resolved kernel panic on your device and also to try it out on Debian/Ubuntu especially with kernel 5.10 built to see whether it is a universal solution. Look forward to input and new mainline kernel built.