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

I tested “HK1Box” S905x3 4GB RAM, 32GB emmc.

With “meson-sm1-sei610.dtb” & “meson-g12a-sei510.dtb” it runs, but no Ethernet, Wifi or Bluetooth.

With “meson-g12a-x96-max.dtb” No Sound, Wifi or Bluetooth, but Ethernet works (and it seems to do around 200mbit as well). Edit: build in eMMC also doesn’t seem to work :frowning:

Edit: With “meson-sm1-khadas-vim3l.dtb” Ethernet and eMMC seems to work. Didn’t yet test other stuff as I am mainly interested in headless server use. But there seem to be less error messages when booting. Edit: hmm installing the system on the emmc seems to fail though. Edit: also the USB2 port seems broken with this.

Apparently there used to be some hacked together dtb files combining these two, but all the links on the Armbian forums are dead. Anyone got an idea?

I also unsucessfully tried this box: “H96Max (Model X3)” S905x3 4GB RAM, 32GB emmc.

“meson-sm1-sei610.dtb”, “meson-g12a-sei510.dtb”, “meson-sm1-khadas-vim3l.dtb” & “meson-g12a-x96-max.dtb” result in a boot-loop with the initial uboot showing but then swtching back to the H96Max logo.

Suggestions apprechiated.

What about meson-sm1-khadas-vim3l.dtb?

I was searching a bit on dtb files for generic S905x3 Tvboxes and that one never came up. It is not for a S922 SoC? Edit: ah S905D3 chipset. Might work indeed. Edit2: same boot-loop on the H96Max.

Edit3: With the HK1box the “meson-sm1-khadas-vim3l.dtb” seems to work better, at least Ethernet and eMMC works (Edit: sort of, booting from emmc apparently not). I switched to the minimal image for server use, so not sure what else works, but there are less errors in the console related to bluetooth/wifi, so it might work as well.

So the problem with the install to emmc script seems to be that it copies the ROOT partition fine on the p2 second partition, but there seems to be no p1 first partition for the BOOT partition.

Any idea what could be causing this?

No that is not the only problem coz we have moved to partuid method for extconfig but the core issue is with the new chainloader not being able to support boot from emmc.

Ah, so booting from emmc does not work in general right now? Maybe worth mentioning in the tutorial above so that people like me don’t get confused :wink:

2 Likes

agree, i ve bricked my box twice trying to get the system booting from EMMC

1 Like

So after some further tries, it seems like a “h96max-x2-test-bus80-gpu-volt.dtb” that I found on the Armbian forum works best with the HK1box and should in theory also work with the H96Max, but I can’t get the latter to stop boot-looping.

Hello to everybody
I could really use some help here…
At first I have a X96 Max Plus with 4Gb/64GB and Manjaro ARM was simply the ONLY ONE distro that managed to load on this TV box… (sry till a couple days I was completely unaware)
Well I used the “meson-sm1-sei610.dtb” for anyone interested.
But not everything is “perfect”.
The main issue is that the screen is hoping constantly left and right…(i don’t know if I am describing it correctly but is strange)
And 2nd for now only Wifi is working the LAN (Gigabit) won’t work
Any help appreciated

Hi spikerguy and all Manjaro TV box users!

I received my T95 MAX Plus and installed Manjaro after quickly testing the hardware under Android. I tried the latest Manjaro vim3 images first using the meson-sm1-sei610.dtb but I failed to get any of them to boot. I’d get as far as seeing the manjaro logo and an infinitely spinning disc icon but that was as far as it went so I had to revert to using the 20.12 images instead, specifically Manjaro-ARM-mate-vim3-20.12.img because I prefer MATE. After installing from a 20.12 vim3 image I was able to update to the latest packages.

I’ve not tested BT but otherwise everything is working (ethernet, USB 2 and 3, eMMC is detected) on my T95 MAX Plus except analogue audio out and wifi. HDMI audio works but not the AV socket. I tested that both wifi and the headphone jack work OK under Android. I have run sudo systemctl enable sound --now and experimented with a few other dtb files as well as messed with the various ALSA mixer settings but I’ve not been able to get analogue audio nor wifi to work. If anyone knows of a better dtb for this box then please let me know but I’ve not seen anyone else mention the T95 MAX Plus on here yet so I might have to cook up my own dtb to get everything working.

I have tried running /boot/install-aml-emmc.sh but I was not able to boot Manjaro from my eMMC afterwards. Maybe this only works with specific TV boxes currently or is the script broke? lsblk was showing my emmc and the script seemed to run OK, it took a sane amount of time to complete. I’ll prob just have to flash another Android ROM back on if the script is broken. I was going to save its output but I accidentally closed its window before I got the chance to copy its output. Its not a big deal as I can still boot Manjaro off the (very slow) sd card.

My sd card isn’t slow tho, its a 64 GB class 10 so I get ~90 MB/s speeds using it on my PC. I presume that the SD card reader in my box is crap or could a better DTB or tweaked kernel settings fix this too?

I’m going to try to build the ffmpeg-m2m PKGBUILD next to see if I can get hardware video decoding working with mpv. I have read reports on this forum of at least a couple of people who have supposedly got it working so that’s encouraging! I’m disappointed with the video decoding ability of the RPi 4 so I’m hoping this TV box will be able to play 4K vids better, eventually.

EDIT

I’ve just finished reading this thread in full and it seems that emmc boot isn’t currently an option so please could you edit the first post to note this please spikerguy?

I may have found the solution to my dtb issues, if they are caused by dtb. After I’ve reflashed Android (presuming I can find the stock image) I’ll have to try ripping the dtb with:

Although with the wifi I could be unlucky and have an unsupported chipset. Prob have to bust it open to know for sure.

I have now replaced the ffmpeg included with manjaro with ffmpeg -m2m and then I had to rebuild mpv which I did by using the Arch PKGBUILD but unfortunately hw video decoding doesn’t work:

$ mpv --hwdec=auto --hwdec-codecs=all VID_20210511_140223.mp4
 (+) Video --vid=1 (*) (h264 3840x2160 30.009fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
Cannot load libcuda.so.1
[vaapi] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Failed to open VDPAU backend libvdpau_meson.so: cannot open shared object file: No such file or directory
AO: [pulse] 48000Hz stereo 2ch float
[ffmpeg/video] h264_v4l2m2m: capture VIDIOC_REQBUFS failed: Cannot allocate memory
[ffmpeg/video] h264_v4l2m2m: can't request capture buffers
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_v4l2m2m: capture VIDIOC_REQBUFS failed: Cannot allocate memory
[ffmpeg/video] h264_v4l2m2m: can't request capture buffers
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_v4l2m2m: capture VIDIOC_REQBUFS failed: Cannot allocate memory
[ffmpeg/video] h264_v4l2m2m: can't request capture buffers
Error while decoding frame (hardware decoding)!
[ffmpeg/video] h264_v4l2m2m: VIDIOC_STREAMON capture error: -22
VO: [gpu] 3840x2160 yuv420p
AV: 00:00:00 / 00:00:30 (1%) A-V:  0.443 Dropped: 5

Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).

AV: 00:00:11 / 00:00:30 (39%) A-V:  0.000 Dropped: 204

Exiting... (Quit)

I don’t think there is any support for audio jack for such tv boxes.
Check if you can find it in the dts file.

For Wi-Fi you need to check which chip is used and check in the forum if anyone else have exact same box

This is broken with the new chainloader. So don’t try this.

Ah thank you for informing. Ive forgotten it.

1 Like

Hi spikerguy

As I said, my audio jack works under Android and linux-meson kernel page says the kernel supports the S905X3 audio subsystem (not HDMI audio) so we shall see what happens if I can re-install the stock Android and extract the dtb.

It sounds like the new chainloader is a downgrade if the older version could boot from eMMC but its replacement can’t. What advantages does the new chainloader bring? Is it not u-boot that does this?

I’m going to report the mpv decoding prob after trying it with the latest git version to see if we can get some feedback or help from the mpv devs.

Thanks for updating the instructions!

1 Like

I have wifi working under Manjaro on my T95 Max plus!

When I say working, I can connect to my wireless network but its slooooow despite network manager saying I have a 75+% strength signal. I’ve not tried removing the case or attaching an external antenna yet which could well improve it. I’m not too bothered as I mainly use ethernet anyway.

Manjaro runs muuuuch better on this box than the Android it comes pre-installed with, which is pretty horrible and gave me a bad first impression of the hardware.

I’m still using the same meson-sm1-sei610.dtb but I have copied the wifi firmware config txt file from the Android partion, after I restored the stock firmware using aml-flash-tool under Ubuntu.

To fix wifi, I installed the Linux terminal emulator app under Android, opened it and ran:

dmesg | grep txt

Which showed me the path to the nvram.txt file. I copied this file onto an external disk by copying the file to /sdcard . Running the same dmesg | grep txt command under Manjaro told me where it was expecting the config file:

sudo cp nvram.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt

I haven’t got the analogue audio output working yet and X is a bit flickerly but I think this is running well enough to add to the supported devices list. Next I’ll be upgrading mesa to the git version to see if I can improve X. I am running it at 4K so its got its work cut out.

Coreelec create an image for the T95 Max plus and they say it uses sm1_s905x3_4g.dtb. I have tried booting using the coreelec dtb but it didn’t boot. I expect it has to be for the exact same version kernel to get away with that. Could you include sm1_s905x3_4g in the next kernel build spikerman, or is it someone else who packages the vim3 kernels?

Thanks!

You are using a wifi configuration for other Linux firmware so behaves slowly. Your chipset is well supported in linux. I think you must know your exact chipset with dmesg in Android and then install a good driver.

Your lucky the chip is activated and with a little more work you will get there.

1 Like

I have X96Max+ 4GB/32GB. I have tested Manjaro-ARM-kde-plasma-vim3-21.04.img with meson-sm1-sei610.dtb with a 16GB micro sd card.

Working
Most of the things work, it has opengl 3.1 and opengl es 3.1.
Sound through HDMI and WiFi works out of the box.
Shutdown

Almost working
Firefox doesn’t have gpu accelaration.
Chromium has gpu accelaration if you forced enable it with a chromium.conf file.
Web browsing ia as slow as the android tv 9 version.

Doesn’t work
V4L2 m2m hardware video decoding doesn’t work.
vainfo failed to initialize libva-v4l2-request.
v4l2-ctl -a shows hardware accelaration only for vp9.
Bluetooth doesn’t work.
Access to embeded emmc doesn’t work, it has unknown filesystem type.
Vulkan
Front screen, which shows the time.

Unknown
I haven’t test the ethernet.
IR

1 Like

Seems to work on GT King Pro but not sure how to actually confirm. CPU usage is reasonably low for most of the CPU cores.

[jfl@MNJROGTKPro ~]$ mpv --hwdec=v4l2m2m-copy https://www.youtube.com/watch?v=CwzjlmBLfrQ
 (+) Video --vid=1 (*) (h264 1920x1080 25.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (v4l2m2m-copy).
VO: [gpu] 1920x1080 nv12
AV: 00:05:36 / 00:05:36 (100%) A-V:  0.000 Dropped: 2 Cache: 0.0s

This how to is great, I am using x96-max dtb, my device is hiplay 8K HD, my problems are :

  1. the default resolution is 4K so it’s not working with my desktop LCD which only 1K
  2. the manjaro could not detect the WiFI device while the original Android can detect it

any help with those problems ?

Add to extlinux.conf video=HDMI-A-1:1280x720@60 in the APPEND line. You can also use the analog video to boot and modify your LCD from there.

Your wifi device maybe supported in the old linux android kernel but not in 5.X kernel, who knows? You have first to know which is your chipset with a web search.

These tasks are not easy. I dont have wifi support for my box, and this is normal because many hardware manufacturers dont care about linux. I use a cheap usb wifi adapter with a free comunnity driver .