Installing Manjaro Arm on X96 Air P3 TV Box

It might be worth checking g12_sound.sh to see whether it is the Amlogic NEW CONF is being used instead of the OLD CONF file being used. If this is the case then just comment out the Amlogic NEW CONF and un-comment OLD CONF.

just did it, but the basic problem is still in the u-boot-kernel:
dmesg | grep sound
[ 5.473491] No soundcards found.

FYI.
sometimes it is necessary to flash the firmware once again :shushing_face:

for me that worked with ‘Amlogic USB Burning Tool’
s.a. [How To] Install run Manjaro ARM on Amlogic TV Boxes with S922X - S905X3 SOC - #81 by spikerguy

You can find the last available firmware for the X96 Air P3 (4GB) box:
X96 Air Amlogic S905x3 8K Video Decode Android 9.0 TV Box Firmware 20201125 - (geekbuying.com)

http://geekbuying.mediafire.com/file/0az4eguf3k0pnif/X96Air_P3_20200831-1753.img/file

may it help if necessary

1 Like

https://github.com/manjaro-arm/vim3-images/releases/download/20210510/Manjaro-ARM-xfce-vim3-20210510.img.xz
is now stable with new kernel ‘linux-vim 5.12.1’

The no-sound-problem still exist

inxi -F
System:
  Host: X96AIRP3 Kernel: 5.12.1-1-MANJARO-ARM aarch64 bits: 64 
  Desktop: Xfce 4.16.0 Distro: Manjaro ARM 
Machine:
  Type: ARM Device System: Shenzhen Amediatech Technology Co., Ltd X96 Air 
  details: N/A 
CPU:
  Info: Quad Core model: N/A variant: cortex-a55 bits: 64 type: MCP 
  Speed: 1908 MHz min/max: 1000/1908 MHz Core speeds (MHz): 1: 1908 2: 1908 
  3: 1908 4: 1908 
Graphics:
  Device-1: meson-g12a-vpu driver: meson_drm v: N/A 
  Device-2: meson-g12a-mali driver: panfrost v: kernel 
  Device-3: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: N/A 
  Display: x11 server: X.org 1.20.11 driver: loaded: modesetting 
  resolution: <missing: xdpyinfo> 
  OpenGL: renderer: llvmpipe (LLVM 11.1.0 128 bits) v: 4.5 Mesa 21.1.0 
Audio:
  Device-1: meson-g12a-dw-hdmi driver: meson_dw_hdmi 
  Device-2: axg-sound-card driver: axg_sound_card 
  Sound Server-1: ALSA v: k5.12.1-1-MANJARO-ARM running: yes 
  Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:
  Device-1: meson-g12a-dwmac driver: meson8b_dwmac 
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: ce:46:8c:89:f9:41 
  Device-2: pwm-clock driver: pwm_clock 
  IF-ID-1: ip6tnl0 state: down 
  mac: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 
Sensors:
  System Temperatures: cpu: 69.6 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 204 Uptime: 2m Memory: 3.72 GiB used: 769.7 MiB (20.2%) 
  Shell: Bash inxi: 3.3.04

Short review:
+branch : unstable but stable with new kernel LINUX-VIM 5.12.1 :grinning:
+Boot from USB3-port with the mentioned process s.above
=ETH: 100 MBit work but seems to be a little bit too slow
-NO Soundcard detection
-NO Wifi
-NO BlueTooth
-slow graphic performance with movies (CPU runs to 99%) even though Mesa GLX install
-U-BOOT.ext not for X96AIR/MAX+

1 Like

FYI

runs stable with new kernel ‘linux-aml 5.12.0.1’ and meson-sm1-x96-air-1000.dtb.

dmesg | grep Amlogic
[ 3.331943] soc soc0: Amlogic Meson SM1 (S905X3) Revision 2b:c (10:2) Detected

but still
No-soundcard, no-wifi, no-bluetooth

I still guess, that the used uboot is not the right for the box. LibreElec 10 starts w/o an uboot-file. Perhaps the Kernel includes an uboot, I don’t know.
Perhaps this is an approach @spikerguy ?

EDIT:
I can’t stop thinking about the no-soundcard-problem and for testing purposes I installed successfull ubuntu on my X96AIR with:

dl.khadas.com - Index of /Firmware/VIM3/Ubuntu/SD_USB/

https://dl.khadas.com/Firmware/VIM3/Ubuntu/SD_USB/VIM3_Ubuntu-gnome-focal_Linux-5.12_arm64_SD-USB_V1.0.6-210520.img.xz

Same Kernel as Manjaro ARM , so I used ‘meson-sm1-x96-air-1000.dtb’ from manjaro installation.

**-Ubuntu don’t use extlinux.conf and no u-boot.ext.
Simply rename the meson-sm1-x96-air-1000.dtb to dtb.img.
and the box boot with ubuntu 20.04LTS only on Wayland !

Kernel Linux 5.12.0 (aarch64)
Version #1.0.6 SMP Thu May 20 18:44:42 CST 2021
C Library GNU C Library / (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
Distribution Ubuntu 20.04.2 LTS

The board is also detected as ‘Amlogic Meson SM1 (S905X3) Revision 2b:c (10:2) Detected’

BUT HERE, TOO: NO-SOUNDCARD, NO-WIFI, NO-BLUETOOTH.

Conclusion: I would say, the problem is not the u-boot.ext , the problem is the meson-sm1-x96-air-1000.dtb

EDIT2: UPDATE my box has working HDMI-Sound thanks @TheMojoMan
‘meson-sm1-x96maxplus-100M-vim.dtb’, s.a.

Plz keep in mind that you have to rename the .dtb to meson-sm1-x96-max-plus-100-vim2.dtb to keep the starting system in working order

Both kernels are working

  • linux-vim 5.12.1-1
  • linux-aml 5.12.0-1

still no-wifi , no-BT but I can live w/o it.

Next optimization should be the video graphic system. Both FF or CHROMIUM create a high cpuload. OpenGL 3.1 Mesa 21.1.1. is installed.
Are there some advices to use the hardware acceleration?

I’ve installed mesa-git as described here:
Panfrost for Bifrost GPUs - Big improvements - ARM / General ARM Discussion - Manjaro Linux Forum

glxinfo -B
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa/X.org (0xffffffff)
Device: llvmpipe (LLVM 11.1.0, 128 bits) (0xffffffff)
Version: 21.2.0
Accelerated: no
Video memory: 3773MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 11.1.0, 128 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.0-devel (git-17d7b0bb8f)
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.2.0-devel (git-17d7b0bb8f)
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.0-devel (git-17d7b0bb8f)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

@themojoman how can I enable or set the Acceleration to YES?

1 Like

I have tried this on Beelink GT King Pro, it runs smoothly on Ubuntu-Wayland only. Changing the dtb alone doesn’t work on GT King Pro. Need to replace the “boot.ini”, “s905_autoscript” and add chainloader “u-boot.ext” and uEnv.ini to get it to boot (basically converting it to use the chainloader u-boot.ext). Thanks to @darkstar for the conversion guide and build.

But it khadas-vim3 Focal 5.12.0 does have one main issue, at times it will kernel panic during booting process (not as frequent as with linux-vim 5.11.y or linux-vim 5.12.1-1), power cycle will usually get it to boot. But once boot up it runs smoothly.

By the way, I was informed by @spikerguy that the khadas-vim linux-image-amlogic-mainline 5.12.0 kernel is not the same as linux-aml 5.12.0-1.

Linux-vim 5.12.1-1 causes frequent kernel panic during boot up process and sometimes while using it and worse case during system update that will corrupt the SD Card rendering it not bootable my device.

Somehow I cannot get linux-aml 5.12.0-1 to work (cannot boot up. I/O error, etc. Tried a few times) on my device. This is start with linux-5.12.y (which very stable on my device but does not shutdown cleanly or reboot) then install linux-aml 5.12.0-1. The installation is successful but will not boot.

I suppose you have not enabled Panfrost. To enable Panfrost you need to edit:

/etc/X11/xorg.conf.d/01-panfrost.conf
Option      "AccelMethod"    "glamor"     ### "glamor" to enable 3D acceleration, "none" to disable.

Change “none” to “glamor”.

The mainline linux 5.11.y, 5.12.y all very stable on GT King Pro, no kernel panic at all somehow the only kernel in Manjaro to work reliably on my device. Just that it does not shutdown cleanly or reboot (just shutdown) and at once a while system hesitancy for a few seconds.

Thanks to Manjaro team for the great work and support.

1 Like

Hi @JFL great that is simple and done , but FF and CHROMIUM go still to 100% cpuload

Just tested with both kernels linux-vim & linux-aml: no improvement still 100% cpuload
I will stay now on linux-aml 5.12.0-1

FYI: I never had have any kernel panic, the releases are very stable . I’ve started with 21.04.
The only stumbling block was to get a starting system with the crazy .dtb and/or uboot’s :smirk:

EDIT: Acceleration is working:

$ glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G31 (Panfrost)
    GL_VERSION:    3.1 Mesa 21.2.0-devel (git-17d7b0bb8f)
=======================================================
[build] use-vbo=false: FPS: 91 FrameTime: 10.989 ms
[build] use-vbo=true: FPS: 92 FrameTime: 10.870 ms
[texture] texture-filter=nearest: FPS: 122 FrameTime: 8.197 ms
[texture] texture-filter=linear: FPS: 131 FrameTime: 7.634 ms
=======================================================
                                  glmark2 Score: 109 
=======================================================

My advice and experience: don’t use a SD, my box has an USB3-port and I use a portable SSD 120GB on it. USB3-Sticks are getting to hot and slow, while PSSD boots and runs faster at normal temperature.
Don"t buy these :smirk:

I use Platinum Portable SSD:

Did you try several u-boots for the g12a-board?
e.g.
https://github.com/hexdump0815/u-boot-misc/releases/download/200926-01/g12a-u-boot.bin.gz

Release 200926-01 - some amlogic (and other) u-boot experiments (all wip) · hexdump0815/u-boot-misc · GitHub

More about the chainloading:
Chainloaded uboot images for amlogic - Amlogic CPU Boxes - Armbian forum

In terms of dtb, GT King Pro seems to be well supported on the mainline so far, Ethernet, Wifi, Sound, Bluetooth all works in Armbian, Khadas-Vim3 and Manjaro so far and I have tried a number of Chainloader u-boots from LibreElec, and those build by Neil Armstrong (via @spikerguy).

By the way, are you still having Android Pie on your TV Box emmc? Somehow, GT King Pro internal BSP u-boot does not work with Mainline Kernel (kernel panic). To resolve this, have to use chainloader u-boot.ext. This is one of the reason, I cannot just change the dtb.img on Khadas-Vim3-Focal-5.12.0 to boot but I can just change the dtb.img on Khadas-Vim3-Focal-4.9 legacy kernel and it will boot.

of course: Android Pie 9, but I don’t use the emmc for alternative OS.
Only USB3 as I mentioned before.
And only CE from SD is the only one which runs perfect on my box with the own sm1-s905x3_4g_1gbit.dtb
That is why I’m wondering with the mess around manjaro or armbian to get it booting. What do these guys doing better with all these .dtb etc.?

My /boot partition contains these files:

Hi @Tiber,
Try setting xfwm to xpresent mode it might speed up your glmark2 score. Logout and re-login or reboot.

xfconf-query -c xfwm4 -p /general/vblank_mode -s xpresent

For the moment I use SD Card and USB 3.0 Flash Drives. My device is a quite unique, where the with the chainloader u-boot.ext the best option to boot up is SD Card or : Manjaro arm on Amlogic Tv box? - #748 by JFL

Just to give a complete picture of the “for_linux-vim-5101.tar u-boot.ext” ability to boot up on Beelink GT King Pro.

  1. Boot image on SD Card, it can boot up successfully with USB Flash or USB HDD connected to other USB 3.0 port.
  2. Boot image on USB Flash drive, it can only boot up successfully if USB Flash Boot image inserted on USB OTG port but without any other USB drive connected to any of the USB 3.0 ports.
  3. Boot image on USB Flash inserted on a USB 3.0 Hub and the USB 3.0 Hub connected to any of the USB 3.0 ports but No other USB drive connected any of the other USB ports. With this method, the USB Flash image drive will heat up fast on the USB 3.0 Hub.
  4. Boot image on USB Flash drive, it will NOT boot up if it is inserted into any of the USB 3.0 directly.
  5. Boot image on USB Flash drive, it will not boot up even if inserted on USB 3.0 Hub and USB 3.0 Hub connected to USB OTG port. Infinite Boot Loop.

So far the SD Card and USB 3.0 Flash Drive is reasoanbly fast but I suppose is not as fast as on emmc or SSD.

Similar but I have “boot.ini”. Interesting your device can boot up without “boot.ini”? We are using the same chainloader u-boot.ext.

The boot.ini is for odriod-n2 … so I deleted it … :grinning:
ODROIDN2-UBOOT-CONFIG
#ODROIDC2-UBOOT-CONFIG
if test “${devtype}” = “”; then setenv devtype “mmc”; fi
if fatload ${devtype} ${devnum} 0x1000000 u-boot.ext; then go 0x1000000; fi;

My box start from USB3-port with in this order:

  1. boot.ext
  2. aml_autoscript
    (2. aml_autoscript.zip) empty file
  3. s905_autoscript
  4. extlinux.conf
    4.1 initramfs-linux.img
    4.2 Image
    4.3 meson-sm1-x96-max-plus-100-vim2.dtb
  5. starting kernel
1 Like

@JFL wow, I would say not bad :grinning: :grinning: :grinning:

<pre>[tiber@X96AIRP3 ~]$ glmark2
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G31 (Panfrost)
    GL_VERSION:    3.1 Mesa 21.2.0-devel (git-17d7b0bb8f)
=======================================================
[build] use-vbo=false: FPS: 159 FrameTime: 6.289 ms
[build] use-vbo=true: FPS: 157 FrameTime: 6.369 ms
[texture] texture-filter=nearest: FPS: 283 FrameTime: 3.534 ms
[texture] texture-filter=linear: FPS: 291 FrameTime: 3.436 ms
[texture] texture-filter=mipmap: FPS: 293 FrameTime: 3.413 ms
[shading] shading=gouraud: FPS: 125 FrameTime: 8.000 ms
[shading] shading=blinn-phong-inf: FPS: 115 FrameTime: 8.696 ms
[shading] shading=phong: FPS: 101 FrameTime: 9.901 ms
[shading] shading=cel: FPS: 88 FrameTime: 11.364 ms
[bump] bump-render=high-poly: FPS: 47 FrameTime: 21.277 ms
[bump] bump-render=normals: FPS: 265 FrameTime: 3.774 ms
[bump] bump-render=height: FPS: 256 FrameTime: 3.906 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 176 FrameTime: 5.682 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 104 FrameTime: 9.615 ms</pre>

Thanks for the info.

Next step in optimization:
whatever the acceleration, FF and CHROMIUM are going to 100% cpuload.
FF:


CHROMIUM is doing better:

for comparition SMPlayer with recorded HD-file:

Both browsers with use hardware acceleration if available, but obviously they don’t use it. Any advices are warmly welcome :smiley:

FYI. Just installed the khadas ubuntu 20.04 lts with kernel 4.9 and sm1_s905x3_4g_1gbit.dtb (renamed to dtb.img) from last CE.
Burn my PSSD + first boot + first login to ubuntu in 15 min…

ubuntu with kernel 5.12 and meson-sm1-x96-air-1000 or something like that boots but with the well-known problems.

By the way, have you set in Firefox “about:config” and in Chromium “chrome://flags” settings for hardware acceleration? My experience at times it helps in Firefox and Chromium hardware acceleration helps a bit but not much so far. At times without hardware acceleration on Firefox or Chromium the video performance is better not necessarily in terms of CPU load but on dropped frame rates.

But if you use MPV to play the same video up to 1080p/30 hwdec=v4l2m2m-copy helps in my devices a fair bit. Example “mpv --hwdec=v4l2m2m-copy videofile”. With mpv vo=gpu alone help significantly on my device in terms of CPU usage.

FYI. Just installed the khadas ubuntu 20.04 lts with kernel 4.9 and sm1_s905x3_4g_1gbit.dtb (renamed to dtb.img) from last CE.
Burn my PSSD + first boot + first login to ubuntu in 15 min…

Try this khadas-Vim3 XFCE-4.9.24` image by @darkstar Beelink Forum. Yes, you should use the legacy dtb from CE for your device.

ubuntu with kernel 5.12 and meson-sm1-x96-air-1000 or something like that boots but with the well-known problems.

On my device LAN, Wifi, Bluetooth & Sound all working with Khadas-Vim3-5.12.0 just as I mentioned before at times kernel panic during boot up but overall runs well on Ubuntu-Wayland except Synaptic Package Manager which hog the one CPU core up 100% for awhile. So far the only Ubuntu-Wayland session that Synaptic Package Manager launch and works.