Installing Manjaro Arm on X96 Air P3 TV Box

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.

I did it and I would say FF is useless due dropped frames, but CHROMIUM with a little bit better performance:

Is the video file 60fps or 30fps? For 60 fps video sometimes without hardware acceleration plays better in terms of dropped frames.

I did it with both ubuntu & debian.
Conclusion: I will stay at Manjaro, it’s the best of all tested releases for my box! :wink: :grinning:

1 Like

Next step of optimization:
The X96AIRP3 is w/o fan cooling, so I’wd like to set the cpupower governor at persist start.
For me the governor conservative fits at best
Screenshot_2021-06-08_09-36-54

$ sudo cpupower frequency-info
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0 1 2 3
  maximum transition latency: 50.0 us
  hardware limits: 100.0 MHz - 1.91 GHz
  available frequency steps:  100.0 MHz, 250 MHz, 500 MHz, 667 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz, 1.50 GHz, 1.61 GHz, 1.70 GHz, 1.80 GHz, 1.91 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 100.0 MHz and 1.91 GHz.
                  The governor "conservative" may decide which speed to use
                  within this range.
  current CPU frequency: 667 MHz (asserted by call to hardware)

There was discussion in an other topic @tripole and I did the

sudo systemctl enable cpupower --now

but after reboot the governor was set to performance.
I guess there must be create a service to do it on start, but how?

You can try edit the config file /etc/default/cpupower and set governor=‘conservative’ if this option is available.

1 Like

@JFL many thanks: this was it and so simple :wink:
Screenshot_2021-06-08_11-53-44

I changed a wrong .conf before…

@strit or @spikerguy
FYI. I just installed a fresh Manjaro installation:
https://github.com/manjaro-arm/vim3-images/releases/tag/20210607
and it seems that a user don"t get root-rights:
e.g.:

$ sudo cpupower frequency-info

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Also with package manager, the authenfication window failed and closed.
User root works and I tried to set the user again as admin. Didn’t work.