Manjaro arm on Amlogic Tv box?

there is a working meson-sm1-x96maxplus-100M-vim.dtb from @TheMojoMan

works for me with both kernes linux-vim or linux-aml 5.12.

For gpu accelleration s.also our posts in

Yes, I have one Manjaro version on mesa stable. The other is on mesa-git which is having the issue. Current Mesa-git performance wise is in regression.

When I mentioned that mesa-git slows down the system while web surfing after 90 mins or 180 mins, the CPU temp is in the range of 50C to 65C depending on activities.

As far as i can tell it is not heat related thermal issue. For testing purpose, on the stable mesa 21.1.1-1, I have ran glmark2-es2 5 consecutive times and do not encounter any noticeable system slow down or glmark2-es2 score dropping significantly.

Surprisingly, in Ubuntu-Wayland Focal using latest mesa-git (Oibaf PPA) the slow down is {Edit: not} that noticeable but in Ubuntu-XFCE Focal it has the same issue as in Manjaro-XFCE with mesa-git.

So far no thermal issue or reliability issue yet (around 10 months). Streaming high-resolution video on Android for 3 hrs, the device does get warm but not hot. Streaming 1080p/60 on Firefox or Chromium without hardware acceleration the device CPU temp will quickly shoot up to >80C. But if limit the 1080p/30 on MPV with vo=gpu and with --hwdec=v4l2m2m-copy the CPU temp is in 60C range.

Hi Tiber

I have tried both of the dtb files in mojomans zip file. Both booted as far as the login screen but caused KDE to crash after logging in but before the desktop is displayed. This happens with both KDE wayland and X11 sessions.

The linux-aml kernel includes a meson-g12a-x96-max(not plus) dtb so I thought I may as well try that because of the similar name but that didn’t boot at all. My X96 Air dtb worked better than all three.

I have tried the mpv options mentioned in that thread but had no luck. If you want all the gory details of what I’ve tried and where I’m up to with mpv and ffmpeg, see:

https://trac.ffmpeg.org/ticket/9280

and

Did you ever try XFCE? works stable on my box, no kernel panic , no crashes, fast etc.
take this one:
https://github.com/manjaro-arm/vim3-images/releases/download/20210517/Manjaro-ARM-xfce-vim3-20210517.img.xz

For what do you need KDE and all the stuff? These little China boxes are made for small OS :wink:
and to get the best performance we need the smallest OS if possible.

1 Like

On amd64 I usually use the MATE desktop but have you seen how much better the Mali GPU performs under KDE or GNOME wayland vs any X11 desktop such as XFCE? Its night and day.

Yes, KDE isn’t designed to run on these cheap ARM machines but it is doable with 4 GB RAM. I’m not a fan of GNOME although it is a bit more mature than KDE under Wayland. I’ve also tried Sway but thats like running Linux in the mid 90’s. I prefer to wait a bit longer for KDE to load and get superior GPU performance rather than save memory and get crappy graphics with X11 only XFCE or MATE.

Once you’ve tried Wayland, its hard to go back to X if you are using the Mali GPU. MATE under Wayland would be my ideal desktop but its got a way to go before it is usable with Wayland.

EDIT

Note you really have to be running manjaro unstable to get a usable Wayland-based KDE. It’s way too buggy under Manjaro stable.

I tried ubuntu with wayland / debian / armbian on my box and I’m now happy with manjaro arm XFCE. For me is cruical to get the best performance with the machine. With mesa you get hw-acceleration, s.a. the posts

1 Like

Dear @danboid I’ve tried your movie with Android Movieplayer and one other player. Seems to be good with Android, but after booting before back to Manjaro the box crashed complete. :pensive:
Only after a great deal of coaxing and a toothpick the box booted again with manjaro. :grinning:
I’m not familiar with all the drivers but the S905X3 / S922x spec shows that both are with support for OpenGL ES 3.2, Vulkan 1.0 and OpenCL 2.0.
All three are available via Package manager.

https://dn.odroid.com/S905X3/ODROID-C4/Docs/S905X3_Public_Datasheet_Hardkernel.pdf

https://dn.odroid.com/S922X/ODROID-N2/Datasheet/S922X_Public_Datasheet_V0.2.pdf

with some interesting infos

Hi @Strit & @spikerguy,

Just wondering does this commit on mainline linux 5.12.9 resolved the “unclean shutdown” on Beelink GT King Pro with mainline linux kernel thus far?

commit b4b91033a0b11fe9ade58156cd9168f89f4a8c1a
Author: Neil Armstrong <narmstrong@baylibre.com>
Date:   Fri Apr 30 10:27:44 2021 +0200

    drm/meson: fix shutdown crash when component not probed
    
    commit 7cfc4ea78fc103ea51ecbacd9236abb5b1c490d2 upstream.
    
    When main component is not probed, by example when the dw-hdmi module is
    not loaded yet or in probe defer, the following crash appears on shutdown:
    
    Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038
    ...
    pc : meson_drv_shutdown+0x24/0x50
    lr : platform_drv_shutdown+0x20/0x30
    ...
    Call trace:
    meson_drv_shutdown+0x24/0x50
    platform_drv_shutdown+0x20/0x30
    device_shutdown+0x158/0x360
    kernel_restart_prepare+0x38/0x48
    kernel_restart+0x18/0x68
    __do_sys_reboot+0x224/0x250
    __arm64_sys_reboot+0x24/0x30
    ...
    
    Simply check if the priv struct has been allocated before using it.
    
    Fixes: fa0c16caf3d7 ("drm: meson_drv add shutdown function")
    Reported-by: Stefan Agner <stefan@agner.ch>
    Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
    Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210430082744.3638743-1-narmstrong@baylibre.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thanks for the links Tiber!

I’m not sure if the Beelink is a Meson based board. If it is, it could fix that.

Hi danboid,

I do use mpv --hwdec=v4l2m2m-copy videofile to stream youtube. Example below. Based on my experience, meson vdec currently support/play video resolution up to 1080p/30 and anything higher usually poor results. And also for whatever reason some video even at 1080p/30 with --hwdec=v4l2m2m-copy doesn’t play well. MPV with vo=gpu works well all the time so far.

My device SOC S922X-H GPU: G52. I use youtube-dl to limit the video resolution to 1080p/30. Below youtube video played without any issue with --hwdec=v4l2m2m-copy. Low CPU usage.

mpv --hwdec=v4l2m2m-copy https://www.youtube.com/watch?v=SOqZlpvtHAM
 (+) Video --vid=1 (*) (h264 1920x1080 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
Using hardware decoding (v4l2m2m-copy).
VO: [gpu] 1920x1080 nv12
AV: 00:01:05 / 00:20:21 (5%) A-V:  0.000 Cache: 121s/24MB
1 Like

Yes, Beelink GT King Pro uses Amlogic S922X-H. So i hope so. I will test it out, switch from linux-5.12.8-1 to linux-5.12.9-1 and update.

Hi JFL

I have already tried a 1080p h264 file but with video accel enabled with no luck, well it didn’t play smoothly. I will try 1080p playback under mpv with no hw accel to see how well it handles it under Wayland but I’m hoping we can see the mainline meson-vdec match what is available in Android land, which clearly can handle 4K decoding and playback.

Hi @Strit,
Yes, GT King Pro uses Amlogic S922X-H. Updated to mainline linux-5.12.9-1, but unfortunately Reboot does not reboot (stuck at shutdown but not cleanly i.e. keyboard is still power up and need to power cycle to restart/boot device).

Install latest mesa 21.1.2-1 but it seems it doesn’t work on my device. nstallation proceeded without any issue but glxinfo -B give errors. Earlier tried give a different error GLX Error.

[jfl@MNJROGTKPRO ~]$ glxinfo -B
name of display: :0.0
libGL error: MESA-LOADER: failed to open meson: libLLVM-12.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
libGL error: failed to load driver: meson
libGL error: MESA-LOADER: failed to open meson: libLLVM-12.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
libGL error: failed to load driver: meson
libGL error: MESA-LOADER: failed to open swrast: libLLVM-12.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  78
  Current serial number in output stream:  79

Edit: Disabled Panfrost and found out current llvmpipe installed is LLVM 11.1.0 and not LLVM 12. If would like to try out mesa 21.1.2-1 how do I rectify the situation?

`Device: llvmpipe (LLVM 11.1.0, 128 bits) (0xffffffff)`

llvm 12 is in unstable branch. Just like the new mesa, so if you are on unstable branch you shouldn’t have those errors. If you are not on unstable branch, you seem to have installed mesa from another branch, which is not supported.

Thanks for your quick response. Noted.

I can confirm that 1920x1080 h264 videos play fine under Wayland with mpv with no hw acceleration. There are a few dropped frames if you are playing it on a 4K/UHD desktop but thats only to be expected. If I use 1920x1080 for the desktop res then it can play Full HD h264 files full screen without dropping frames, without hw accel.

enclosed some more informations about Android 9 of my X96AIR and it seems Android 9 use

  • OpenGL ES Version: 3.2
  • GPU Version: OpenGL ES 3.2 v1.r16p0-01rel0.bcc0cdabec638d4bf85475d4a5ae47a7
  • GL_ANDROID_extension_pack_es31a
  • Codecs from OMX.

https://justpaste.it/45t5q

1 Like

I am following this.

Keep me posted. I saw your issue on mpv but I am sure it have nothing to with mpv.

You need to look into ffmpeg and kernel driver for vpu to work smoothly.

1 Like

I suspect this is a kernel issue myself. I have opened tickets with both ffmpeg and mpv, ffmpeg after the mpv devs suggested I take it upstream (ie ffmpeg). The ffmpeg devs have made a few suggestions re testing but haven’t pinpointed my exact issue yet. I emailed the kernel dev who last updated the meson vpu code a couple of days ago but not had any response yet.

1 Like