Manjaro arm on Amlogic Tv box?

BTW, I have updated to 5.13.0-1-MANJARO-ARM (linux-aml kernel) and everything seems to be functional as before. My X96Max+ boots without problems and sound and wifi are still working.

Hi
Yes I did try your 2 dtb files - not sure if itā€™s correct one though , both shown error for Ethernet at boot up but lan was working fine ā€¦
WLAN as usual not detected :frowning:
Maybe can refer me the mega link again for me to verify if the dtb was right one
Thanks :pray:t3:

Hi @spikerguy,

Good news, with mainline linux 5.13.0-2 (Unstable Branch), Reboot and Shutdown finally function correctly! Tested on Manjaro KDE but KDE Plasma 5.22.2 still cannot login to Plasma (Wayland).

Update: Well so far the mainline linux 5.13.0-2 can reboot an shutdown cleanly on SD Card.
Somehow on USB flash drive the mainline linux 5.13.0-2, can only shutdown cleanly (i.e. does not need power cycle to restart/boot) but will Reboot into Android thus far (tried 6 times). And after reboot into Android, need a Linux on SD Card to regain the capability to boot again from USB Flash. Interesting.

1 Like

Hi @danboid, is this firmware 32bit or 64bit Android? It could be a good replacement for the original firmware if it was 64bit. The original firmware was 32bit Android.

I plan to switch to SlimBox if it was 64bit alongside with Manjaro on SD Card. That would be a good combination IMHO.

Hi rna

I didnā€™t end up using that rom because it didnā€™t support my X96 Max Plusā€™ wifi or BT. Turns out I have a X96 Max Plus 2 T. The only way to identify it as such was to open it and look at the wifi chip used, then use the forum post linked on the Amlogic TV boxes wiki to identify it. I found a ā€˜stockā€™ rom with working wifi and BT linked in the 4pda forum post on the same wiki. I tried Slimbox but that didnā€™t support my Max Plus wifi or BT.

I have no idea if its 64 bit or not and Iā€™m not really bothered as I only use it as a bootloader and for the occasional test. I donā€™t really like Android as an OS. Normal Linux (eg Manjaro, Arch, Debian etc) isnā€™t perfect either but itā€™s less annoying to me than Android (or Windows/Mac/BSD etc) so Iā€™ve only bought a few TV boxes to run real Linux on, Android is an afterthought for me.

This is not a forum about Android roms but I had to cover them on the wiki in as far as reflashing them as a bootloader as its essential to booting Manjaro.

Hi @spikerguy,

I would like to ask if you could please update the dkms-rtl8822cs driver package with the following PKGBUILD which includes a patch for kernels >= 5.12.
(The files dkms.conf and dkms-rtl8822cs.install do not change.)

PKGBUILD:

_gitname=rtl8822cs
pkgname=dkms-rtl8822cs
pkgver=2020.11.20
pkgrel=2
pkgdesc="DKMS driver for the Realtek RTL8822CS wifi chip"
arch=('any')
url="https://github.com/chewitt/$_gitname"
license=(ā€˜GPLā€™)
install=dkms-rtl8822cs.install
#depends=('dkms' 'linux>=4.14' 'linux-headers>=4.14')
depends=('dkms')
makedepends=('git' 'bc')
options=(!strip)
source=("git+${url}.git" "dkms.conf")

md5sums=('SKIP' 'SKIP')

prepare() {
echo "Please be sure to install the kernel header files that match your kernel (e.g. linux-headers / linux-vim-headers / linux-aml-headers) before trying to install this driver!)"
_MAJOR_VERSION=$(uname -r | awk -F '.' '{print $1}')
_MINOR_VERSION=$(uname -r | awk -F '.' '{print $2}')
if [ $_MAJOR_VERSION -eq 5 ] && [ $_MINOR_VERSION -ge 12 ] || [ $_MAJOR_VERSION -ge 6 ] ; then
    echo "Patching source for kernel >= 5.12 ..."
    sed -i s/GRO_DROP/GRO_MERGED_FREE/ $(pwd)/rtl8822cs/os_dep/linux/recv_linux.c
    echo "Done patching!"
fi
}

pkgver() {
cd "$srcdir/$_gitname"
git log -1 --format="%cd" --date=short | sed 's|-|.|g'
}

package() {
cp dkms.conf "$srcdir/$_gitname/"
cd "$srcdir/$_gitname"
mkdir -p "$pkgdir/usr/src/rtl8822cs-$pkgver"
cp -r . "$pkgdir/usr/src/rtl8822cs-$pkgver"
}

Thanks!

P.S.: Do you know if it is possible to set ā€˜depends=ā€¦ā€™ in such a way that the proper kernel header file is set depending on the kernel that is used? I mean if the mainline kernel is used the driver needs linux-headers. But if linux-vim or linux-aml is used the driver needs linux-vim-headers or linux-aml-headers, respectively.

1 Like

Yes, I can understand how you feel. Thanks for the info.

Last time I also desperately want to run linux on my TV Box. I found a very cheap H96 Max RK3399 on sale because it was the last item from the seller. Because this box was quite old, finding support for this box was really difficult. Especially the firmware that support the wifi and bluetooth. However, after installing the u-boot and modifying the dtb finally this box can boot linux almost perfectly, except the AV jack doesnā€™t work.
Hereā€™s the details:

Maybe the process could help you somehow making your device wifi and bluetooth working.

many thanks,
rna

How I can turn on full kernel log while the device is booting?

No its difficult to find the installed kernel. Its the same in x86_64, no way to find out.

Some tips her: https://unix.stackexchange.com/questions/306017/kernel-parameter-quiet-versus-loglevel-4-and-debug-versus-loglevel-7

sudo nano /boot/extlinux/extlinux.conf
REMOVE quiet splash add debug at end of APPEND line

I tried booting and installing 21.07 on my x96 air using the xfce vim3 image (and my custom dtb) earlier but it failed to boot so I had to revert to using the 21.04 images.

Anyone else had this problem? I just get a volt regulator error.

You mean this error:

`panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19`

As far as I can remember it has always been there.

For amlogic desktop users, how well is the GPU supported ?

Iā€™m running vim2 21.08 minimal release on a gxbb s905 Tv box (GPU: Mali 450) ,which is fast with low system load .I also tried XFCE release but the graphic lagged a lot and got freezed after I opened firefox.

Check if you have lima with glxinfo - B or something else. I think that Mali proprietary driver is your best option. Your cpu is a bit slow for Xcfe and Openbox is a better option.

As far as I know Amlogic G52 and G31 GPUs are supported quite well with the current mesa. Manjaro-Arm Gnome and XFCE editions works well on Amlogic S922X.

Have you enabled HW Acceleration?

I donā€™t think Mail proprietary driver would work with current mainline kernel . The vendorā€™s patched 3.14 kernel is a bit acient today :wink: Even coreelec have dropped support from 19.0 Matrix.

As for the heavy CPU load under XFCE , it is unlikely that the HW Acceleration is enabled .

I digged a bit in forum and read something like ā€œmesa-demosā€ ā€œmesa-arm-gitā€ ā€œpanfrostā€ , could I expect a single line of ā€œpacman -Sā€ would do the trick ? :smiley:

Edit:From Lima ā€” The Mesa 3D Graphics Library latest documentation , lima seems promising for Mali 450 (Utgard) . I would replace xf86-video-fbturbo with lima and do some test.

As @SickOS suggested check with glxinfo -B see whether HW Acceleration is enabled.

Also check in /etc/X11/xorg.conf.d/01-panfrost.conf to set for HW Acceleration.


Section "Device"
    Identifier  "Default Device"
    Driver      "modesetting"
    Option      "AccelMethod"    "glamor"     ### "glamor" to enable 3D acceleration, "none" to disable.
EndSection

Section "ServerFlags"
        Option  "AutoAddGPU" "off"
        Option "Debug" "dmabuf_capable"
EndSection

Section "OutputClass"
        Identifier "Lima"
        MatchDriver "meson"
        Driver "modesetting"
        Option "PrimaryGPU" "true"
EndSection

Usually that should be sufficient to enable HW Accel if not mistaken.

2 Likes

I just flashed Vim2 Sway 21.08 and is replying from my Tv box . The graphic is quite smooth now :smiley:

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: lima (0x13b5)
    Device: Mali450 (0xffffffff)
    Version: 21.1.6
    Accelerated: yes
    Video memory: 0MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: lima
OpenGL renderer string: Mali450
OpenGL version string: 2.1 Mesa 21.1.6
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 21.1.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
$ cat /etc/X11/xorg.conf.d/01-panfrost.conf

Section "Device"
    Identifier  "Default Device"
    Driver      "modesetting"
    Option      "AccelMethod"    "glamor"     ### "glamor" to enable 3D acceleration, "none" to disable.
EndSection

Section "ServerFlags"
        Option  "AutoAddGPU" "off"
        Option "Debug" "dmabuf_capable"
EndSection

Section "OutputClass"
        Identifier "Panfrost"
        MatchDriver "meson"
        Driver "modesetting"
        Option "PrimaryGPU" "true"
EndSection

Manjaro Gnome Wayland might also runs well on your device.

1 Like