Manjaro arm on Amlogic Tv box?

Thanks @TheMojoMan for this valuable tutorial.

What about bluetooth, can we activate the bluetooth using the same method for X96Max+?

There is someone who did a backport for rtl8723de using dkms. See here: https://itectec.com/ubuntu/ubuntu-how-to-activate-bluetooth-device-for-rtl8723de/

So I think that in principle it should also be possible for rtl8822cs.

But I saw that there is code for rtl8822c in btrtl.c in kernel version 5.10.10 so it seems we only have to wait a bit more and bluetooth support will come to our box as well!

Screenshot from 2021-01-26 15-51-06

You can already find rtl8822cs_fw.bin and rtl8822cs_config.bin in /lib/firmware/rtl_bt when you install linux-firmware package. However kernel 5.10.5 does not seem to support rtl8822cs, yet:

[themojoman@X96MaxPlus ~]$ modinfo btrtl
filename:       /lib/modules/5.10.5-1-MANJARO-ARM/kernel/drivers/bluetooth/btrtl.ko.gz
firmware:       rtl_bt/rtl8822b_config.bin
firmware:       rtl_bt/rtl8822b_fw.bin
firmware:       rtl_bt/rtl8821a_config.bin
firmware:       rtl_bt/rtl8821a_fw.bin
firmware:       rtl_bt/rtl8761a_config.bin
firmware:       rtl_bt/rtl8761a_fw.bin
firmware:       rtl_bt/rtl8723ds_config.bin
firmware:       rtl_bt/rtl8723ds_fw.bin
firmware:       rtl_bt/rtl8723bs_config.bin
firmware:       rtl_bt/rtl8723bs_fw.bin
firmware:       rtl_bt/rtl8723b_config.bin
firmware:       rtl_bt/rtl8723b_fw.bin
firmware:       rtl_bt/rtl8723a_fw.bin
license:        GPL
version:        0.1
description:    Bluetooth support for Realtek devices ver 0.1
author:         Daniel Drake <drake@endlessm.com>
srcversion:     02896D42941196C4ADC8841
depends:        bluetooth
intree:         Y
name:           btrtl
vermagic:       5.10.5-1-MANJARO-ARM SMP preempt mod_unload aarch64

This is a great news. Thanks for the info :slight_smile:

Now what is left is the panfrost stability. Once it is stable, x96 max+ would be a perfect mini computer that works OOTB. I am also very happy that now I can run wine apps by using box86 in this box.

Actually, I am curious how did you find out that our box uses the “rtl8822c”? is there any command that you have to type to identify your wifi and bluetooth hardware? I am asking this, because my other box which is H96 Max RK3399 cannot detects the wifi and bluetooth. And I don’t know which hardware that is used?

On manjaro? Is it 64bit version or 32bit ?

How well does it work?

There is a full thread about it on armbian. No command just teardown the device and see the chip model is the easiest.

This must be rtl8723cs which ive pkged for station P1 but it’s just a guess.

Update.
I quick online search shows me wifi chip model
This link

Wifi = AP6255
You need its firmware to be present with the dtb model name as the suffix.

Update 2
Khadas vim 1 used same chip, you just need that wifi pkg and add the model name as suffix

Update 3
Install kvim1-firmware

sudo cp /usr/lib/firmware/brcm/brcmfmac43430-sdio.khadas,vim.txt /usr/lib/firmware/brcm/brcmfmac43430-sdio.{manufacturer},{model}.txt

Replace manufacturer and model as per the dtb/dts compatible model names.

Reboot.
It should work.

Yes, that is how I did it.

UPDATE

I finally found a more straight forward method to install rtl8822cs wifi driver.

Howto: Compile and activate RTL8822CS wifi driver - easier version

Open a terminal and do the following:

  • sudo pacman -S base-devel git bc dkms linux-vim-headers
  • git clone https://github.com/chewitt/RTL8822CS.git
  • cd RTL8822CS/
  • sed -i 's/$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)/$(MAKE) -j4 -C $(KSRC) M=$(shell pwd)/g' Makefile
  • sed -i 's/$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded/strip $(MODULE_NAME).ko --strip-unneeded/g' Makefile
  • make
  • … (wait about 5 min.) …
  • sudo make install
  • sudo modprobe 88x2cs
2 Likes

This is easier to package.

Great work and good that you gave sometime to this topic and finally got it to work and also simplified it for other users.

Much Appreciated.

1 Like

Yes, on Manjaro 64bit. I think I have posted the tutorial in this forum and Armbian:

the performance is quite good for LLVM Pipe driver. I managed to install sketchup 8 and make some 3D models quite easily.

I see, so that’s the trick

OK, thanks for your guide, will try this on “Armbian Reforge”. Since that is my only hope to run linux on this board. At the moment I cannot boot into Manjaro or Armbian or TwisterOS. It just a black screen.

You are awesome, Many Thanks… :slight_smile:

I’ve lost sound from last update. Downgrading to linux-vim-5.10.1 does not work and running g12a_sound.sh either. How can I recover sound? Maybe I need detailed instructions because I just do anything wrong.

Maybe g12a_sound.sh does not detect your soundcard correctly. You can then try the following:
(I am writing this from memory because I currently do not have access to my box)

  • Open terminal and then type: aplay -l
  • Copy name of your device to clipboard.
  • Now type: sudo nano /usr/bin/g12a_sound.sh
  • In the top of the script under the section where script tries to automatically detect card1 (ca. line 6-8) add: card1=“NAME_OF_YOUR_SOUNDCARD” (Ctrl+Shift+v to paste)
  • Ctrl + S to save and then Ctrl + x to exit nano editor
  • Now run /usr/bin/g12a_sound.sh again
  • Type: sudo systemctl enable sound --now
  • Reboot and pray!

@spikerguy thank you so much for the nice feedback!

Finally, it is only the typical “clone, make, sudo make install” which did not work in my first attempt because the makefile is written for cross compiling. I learned all of this with the help of your rtl8723du package. Thanks for that!

@rna in fact you are awesome! Thanks for telling us about box86 and the great step by step tutorial how to install it. I missed it before.
So I followed it and everything went well … except at the very end after starting Sketchup 7.1 and choosing the default view it stops with an error “Cannot find OpenGL” driver. What am I missing?

Glad that you make it! Welcome to Box86 World on Arm64…!!!

In case of sketchup, actually it’s super easy. The bug is in the sketchup itself, even if you installed sketchup 7.1 / 8 in Windows 7 above, you’ll get the same error.
https://askubuntu.com/questions/436592/sketchup-was-unable-to-initialize-opengl

You have to edit the wine regedit and change the display setting

  1. Open Sketchup then close
  2. Open terminal then run regedit by typing:
    schroot -c debian-armhf ~/box86/build/box86 ~/wine/bin/wine regedit
  3. Then find:
    HKEY_CURRENT_USER\Software\Google\SketchUp7\GLConfig\Display
  4. Then change the “HW_OK” from “0” to “1”
  5. Then close your regedit
  6. Then open Sketchup 7/8, you should be ok.

This fix also works for windows 7 above

Anyway, I have updated the topic in Armbian Forum including the Box86 compatibility list link. Feel free to re-read my update.

Hope that helps,
Many Thanks
rna

Followed your instructions and now Sketchup works. :grin:
Really impressive that such a low-power ARM box is capable of running such a program so smoothly! I never would have thought it to be possible …

Must have taken you many, many hours to figure out how to run box86 on ARM 64. Thanks you so much for your effort!!!

Yes, I also impressed with this low powered box to run sketchup so smoothly on LLVM pipe drivers. Have you tried to use Panfrost? I disable panfrost since it causes my box to hang everytime.

At the moment I’m struggling with making winetricks to work. I am able to use winetricks and install sketchup 2014 on Armbian Reforge. But I failed to use winetricks by using this chroot method. Still trying to figure it out. Help would be appreciated.

I already posted that in the armbian forum. Maybe somebody else could help to solve this issue, then we are almost very good to run almost every win32 apps on Arm64.

Actually the trials took me from june 2020 starting with Binfmt_misc & Qemu-user-static, which is not usable, here’s my story: How To Install Box86 on Manjaro Arm64

But luckily I found box86 which is way faster than Qemu. There you have it now

Yes, I used Panfrost. When you install mesa-git package you get mesa 21 develop version which is a lot lot better than mesa 20.3.
Supertuxkart and OpenArena are running smoothly. Also: turn off compositor in XFCE.

Is it stable now? or still sometime crashes?

What Manjaro Image do you use? which kernel?
What is the DTB that you use?

I am using linux-vim 5.10.5 kernel, unstable branch, XFCE

BTW @spikerguy I was building this image with the manjaro-arm tools yesterday and sound is working out of the box now. Great job!

It was unstable and crashing with vim kernel <= 5.9 but with 5.10 everything is rock solid!

My custom .dtb derived from meson-sm1-sei610.dtb.
@gausus just posted a version of this .dtb where ethernet speed is reduced to 100M (because he had problems with speed set to 1G). See post#640.

Hats off for being so persistent! :tophat:

1 Like

Thanks for this information. I’ll try to switch to Kernel 5.10 then.

Have you tried to open Blender 2.8+ using Panfrost? last time I tried with panfrost it failed to open, but using LLVM Pipe it opens but too laggy. It seems there’s something wrong with the OpenGL 3.2 in Panfrost Driver?

blender-2.7 is working well even when you set the renderer to Cycles.

Blender 2.8+ demands OpenGl 3.3 which is currently not supported by Panfrost. Some days ago I tried to overwrite GL_VERSION to 3.3 and start Blender 2.9 that way but it only showed a grey empty window.

I also think to remember that Mali G31 only supports OpenGl ES up to version 3.2. So the rest of the implementation would have to be software anyway. Don’t know what priority Blender 2.9 has on the Panfrost dev teams’ list. I guess they will focus their efforts on new Mali chips first to get them up and running before implementing features beyond OpenGl ES 3.1 (need to look up - I thought mesa 21 devel has support for 3.1 now and not 3.2).

Would be great to have a hybrid OpenGL driver that uses Panfrost as much as possible and falls back to LLVM for features not supported by Panfrost, yet.

Yes I also tried blender 2.7, I think it is ready for production using x96 Max+. Even on LLVM Pipe the performance is very smooth.

I also tried to install Blender 2.7 on Armbian Focal, but failed. Don’t know how to compile Blender 2.7 on Focal, whereas on AUR it’s quite easy on Manjaro side.

On Armbian Bionic it is easy to install Blender 2.7.

This can be a solution if it is possible in the future, I think LLVM Pipe is quite mature in terms of features compared to panfrost