Manjaro arm on Amlogic Tv box?

Great!
I think I will switch back from linux to linux-vim then and try out how Panfrost performs on my X96Max+ with the new kernel.

Not so stable yet.
It works well but causes the system to freeze frequently.

You are right:
I have tried linux-vim again (now with kernel 5.9.8) and when using Panfrost it has the same instability I had with linux-vim 5.9.0-1 kernel (as you wrote above).

Therefore …

… I don’t think so.

As I wrote before: After I changed to the linux package the crashes were gone (to be precise: it is not crash free but almost). Even with kernel 5.9.1-3. So there are 5.9 kernels which work stable with Panfrost.

In my opinion it might help to have a closer look at what the differences between the linux kernel and the linux-vim kernel are.

In that way it might be possible to find out why system is unstable with linux-vim kernel and stable with linux kernel when using Panfrost. On the other hand, it might be possible to find the reason why linux-vim kernel does recognize sound cards while linux kernel does not.

if does freeze when we try to do a little heavier graphical task but I am talking about G52 gpu and you have G31 and both have difference in code so maybe.

Yes there are some extra patches

Yes I need to find this and will do this in coming days

I have been trying to find this since long time and it is very hard to find even after doing a whole diff of the two branches.

I have also asked for help from Chewitt from libreelec he tried to help but looks like even he is out of options as why sound on upstream kernel doesn’t work for us.

Thanks for the follow-up.

I just notice in the stable branch now, Linux kernel 5.9.6-1 is available (per the Manjaro Package Manager). I just upgrade from linux-vim kernel 5.9.0-1 to kernel 5.9.0-2. I wonder whether there is any benefit to install linux kernel 5.9.6-1 over linux-vim 5.9.0-2 especially for Beelink GT King Pro as linux-vim kernel 5.9.8 is at Unstable Branch.

Strit reports that mesa 21.0.0 is working well on his Odroid N2 which has Mali G52.

Did you find differences in the source code regarding the power controller?

I am asking because I found out something which might only be related to my TV box but maybe it is also related to the system hanging after a short while when using panfrost with linux-vim kernel. (I mean: the box does not crash and reboots or turns off but rather it still displays an image and is completely unresponsive/frozen.)

I try to keep it short: After changing from linux-vim to linux my box did not boot with ‘meson-sm1-sei610.dtb’ anymore. Fortunately, it did with ‘meson-g12a-sei510.dtb’. So I had a closer look at the differences in the respective .dts files and after quite some testing I found out that I have to change the following in ‘meson-sm1-sei610.dts’ to make my box boot again:

  1. power-controller {
    compatible = “amlogic,meson-sm1-pwrc”;
    -> CHANGE TO: compatible = “amlogic,meson-g12a-pwrc”;

    }
  2. bus@60000 { -> CHANGE TO: bus@42000

    reg = <0x00 0x60000 0x00 0x1000>;
    -> CHANGE TO: reg = <0x00 0x42000 0x00 0x2000>;

    ranges = <0x00 0x00 0x00 0x60000 0x00 0x1000>;
    -> CHANGE TO: ranges = <0x00 0x00 0x00 0x42000 0x00 0x2000>;

    }

[I also had to add some stuff to make ethernet work again, had to delete ‘power-domains’ in ‘usb@ffe09000’ for usb to work correctly and had to delete ‘pinctrl-0’ in ‘audio-controller@61000’ because there were interactions with ‘ethernet’.]

As said: Maybe only a problem with my box … but maybe more. I am just trying to help (with the very limited knowledge I have).

1 Like

Tried to install linux kernel 5.9.6-1 had the following error:

jfl@GTKPro ~]$ sudo pacman -S linux
[sudo] password for jfl:
resolving dependencies…
looking for conflicting packages…
:: linux and linux-vim are in conflict (kernel26). Remove linux-vim? [y/N] y

Packages (3) linux-firmware-20201023.dae4b4c-1 linux-vim-5.9.0-2 [removal]
linux-5.9.6-1

Total Download Size: 188.26 MiB
Total Installed Size: 712.48 MiB
Net Upgrade Size: 636.84 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages…
linux-firmware-2… 128.6 MiB 683 KiB/s 03:13 [######################] 100%
linux-5.9.6-1-aa… 59.6 MiB 629 KiB/s 01:37 [######################] 100%(2/2) checking keys in keyring [######################] 100%(2/2) checking package integrity [######################] 100%
(2/2) loading package files [######################] 100%
(2/2) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
linux-firmware: /usr/lib/firmware/brcm/brcmfmac4356-sdio.bin exists in filesystem
Errors occurred, no packages were upgraded.
[jfl@GTKPro ~]$

Do I have to delete “/usr/lib/firmware/brcm/brcmfmac4356-sdio.bin” first? If I delete it I might not have wifi to start with?

Hi JFL,
Just rename the old version of the file to e.g. brcmfmac4356-sdio.bin.myversion and let the installer proceed and install the new version. Most likely the new version will work just fine and you will have WiFi (unless something else has been screwed up; dmesg will be your friend).

Hi Tripole,

Did just that and installed linux kernel 5.9.6-1 successfully. Have not reboot yet. uname -a still return “inux GTKPro 5.9.0-2-MANJARO-ARM #1 SMP PREEMPT Sat Nov 14”

Will reboot and find out what works and what does not soon.

[jfl@GTKPro ~]$ sudo pacman -S linux
[sudo] password for jfl:
resolving dependencies…
looking for conflicting packages…
:: linux and linux-vim are in conflict (kernel26). Remove linux-vim? [y/N] y

Packages (3) linux-firmware-20201023.dae4b4c-1 linux-vim-5.9.0-2 [removal]
linux-5.9.6-1

Total Installed Size: 712.48 MiB
Net Upgrade Size: 636.84 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring [######################] 100%
(2/2) checking package integrity [######################] 100%
(2/2) loading package files [######################] 100%
(2/2) checking for file conflicts [######################] 100%
(3/3) checking available disk space [######################] 100%
:: Processing package changes…
(1/1) removing linux-vim [######################] 100%
(1/2) installing linux-firmware [######################] 100%
(2/2) installing linux [######################] 100%
Optional dependencies for linux
crda: to set the correct wireless channels of your country
:: Running post-transaction hooks…
(1/6) Creating temporary files…
(2/6) Arming ConditionNeedsUpdate…
(3/6) Updating module dependencies…
(4/6) Updating linux module dependencies…
(5/6) Updating linux initcpios…
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: ‘default’
-> -k 5.9.6-1-MANJARO-ARM -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.9.6-1-MANJARO-ARM
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
(6/6) Updating uInitrd…
Image Name: uInitrd Image
Created: Mon Nov 16 19:04:02 2020
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 8447682 Bytes = 8249.69 KiB = 8.06 MiB
Load Address: 00000000
Entry Point: 00000000
[jfl@GTKPro ~]$

Evidently this was put there manually in some manjaro-arm install script (since it did not specify what package owned it) because it did not exist yet in that location and the linux-firmware package has now added it to their package.

I am not involved with GTKPro but I believe @spikerguy is and it probably needs to be chased down on how that firmware got placed there since linux-firmware is now putting it there.

TV Box: Beelink GT King Pro

Just an update after installing linux kernel 5.9.6-1 over linux-vim kernel 5.9.0-2.

  1. Ethernet works after reboot with linux kernel 5.9.6-1

  2. Wifi does not work after reboot eventhough the wifi driver “brcmfmac4356-sdio.bin” is available in /usr/lib/firmware/brcm/. Did a comparison with the “brcmfmac4356-sdio.bin” (copied from Armbian) driver that works on Manjaro linux-vim kernel 5.9.0-1 and 5.9.0-2 with the copy of "“brcmfmac4356-sdio.bin” from linux kernel 5.9.6-1. The file size is different!

So I used the “brcmfmac4356-sdio.bin” from Armbian that had work before and it work with linux kernel 5.9.6-1. This is surprising, the “brcmfmac4356-sdio.bin” that came with linux kernel 5.9.6-1 does not work.

  1. No Sound.
    [jfl@GTKPro ~]$ sudo chmod a+x /usr/bin/g12_sound.sh
    [sudo] password for jfl:
    [jfl@GTKPro ~]$ systemctl enable sound --now
    [jfl@GTKPro ~]$
    CLI: chmod a+x /usr/bin/g12_sound.sh does not enable sound.

  2. Tried also /usr/bin/sound.sh from Armbian
    jfl@GTKPro ~]$ /usr/bin/sound.sh
    aplay: device_list:274: no soundcards found…

Other than that, linux kernel 5.9.6-1 work so far on GT King Pro just NO Sound.

Hi Darksky,

Fyi, brcmfmac4356-sdio.bin does not exist on the Manjaro VIM3 image, I copied it from an Armbian build to get wifi to work in Manjaro VIM3.

The brcmfmac4356-sdio.bin driver from linux kernel 5.9.6-1 package does not work with Beelink GT King Pro. I have to re-use the brcmfmac4356-sdio.bin from Armbian build to get wifi to work do know why. I am using meson-g12b-gtking-pro.dtb from linux kernel 5.9.6-1 package.

How do I test whether Panfrost working or whether video acceleration is available in linux kernel 5.9.6.-1 for GT King Pro.

Hi JFL,
I think you can get WiFi working with the .bin file that was just installed from Manjaro. Look what you get with “dmesg | grep brcm” and see if it is is not missing some other firmware file (which may already exist, but under another name than what the kernel module expects). Essentially, you can go through the same procedure as the first time you got WiFi working, I guess.

That is how it got there.lol

Or try this:

This is going to be an issue every time the linux-firmware package updates if only brcmfmac4356-sdio.bin is the problem.

Put your new firmware in the /usr/lib/firmware/ directory so it can get picked up first then reboot and see if you have wifi. If not chase down what script is loading the firmware and change the path to /usr/lib/firmware/brcmfmac4356-sdio.bin and reboot.

Hi Tripole,

This time around I am aware of wifi will not work without the driver brcmfmac4356-sdio.bin in usr/lib/firmware/brcm. But surprisingly as I noted the brcmfmac4356-sdio.bin is available but seems to be incorrect version so I used the brcmfmac4356-sdio.bin from Armbian just like it did earlier before the upgrade to linux kernel.

Edit: The downside of linux kernel versus linux-vim kernel is No Sound in linux kernel so far. How to enable Panfrost?

Hi JFL,
It may very well work with either of these .bin files; the problem may (now) lie elsewhere. Try checking what “dmesg | grep brcm” gives (in terms of error messages).

Initial Error message is still there but it finally works.

Dmesg output

[ 7.752038] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 7.752046] cfg80211: failed to load regulatory.db
[ 7.785992] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2
[ 7.791622] usbcore: registered new interface driver brcmfmac
[ 7.797375] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac4356-sdio.azw,gtking.txt failed with error -2
[ 7.813247] Console: switching to colour frame buffer device 240x67
[ 7.834741] Bluetooth: hci0: BCM: chip id 101
[ 7.834994] Bluetooth: hci0: BCM: features 0x2f
[ 7.836471] Bluetooth: hci0: BCM4354A2
[ 7.836481] Bluetooth: hci0: BCM4356A2 (001.003.015) build 0000
[ 7.838478] Bluetooth: hci0: BCM4356A2 ‘brcm/BCM4356A2.hcd’ Patch
[ 7.846660] meson-drm ff900000.vpu: [drm] fb0: mesondrmfb frame buffer device
[ 7.848052] random: crng init done
[ 7.848060] random: 7 urandom warning(s) missed due to ratelimiting
[ 7.875744] audit: type=1130 audit(8.050:7): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg=‘unit=systemd-random-seed comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
[ 7.902826] audit: type=1130 audit(8.070:8): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg=‘unit=systemd-rfkill comm=“systemd” exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success’
[ 7.980311] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2
[ 8.024189] Registered IR keymap rc-cec
[ 8.024311] rc rc1: dw_hdmi as /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx/rc/rc1
[ 8.024469] input: dw_hdmi as /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx/rc/rc1/input7
[ 8.184567] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4356/2 wl0: Mar 4 2020 22:06:08 version 7.35.349.87 (r724447 CY) FWID 01-c68a2890
[ 8.686213] Bluetooth: hci0: BCM4356 37.4MHz AMPAK AP6356-0055
[ 8.686230] Bluetooth: hci0: BCM4356A2 (001.003.015) build 0266

[ 7.276488] cpu cpu2: Failed to set regulator for cpu2: -517
[ 7.276677] cpu cpu3: Failed to set regulator for cpu3: -517
[ 7.276793] cpu cpu4: Failed to set regulator for cpu4: -517
[ 7.278388] cpu cpu5: Failed to set regulator for cpu5: -517
[ 7.280311] libphy: mdio_mux: probed
[ 7.284220] meson-drm ff900000.vpu: Queued 3 outputs on vpu
[ 7.315230] Registered IR keymap rc-empty
[ 7.315316] rc rc0: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0
[ 7.315837] rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter
[ 7.315989] input: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/input6
[ 7.320772] meson-vrtc ff8000a8.rtc: registered as rtc0
[ 7.320812] meson-vrtc ff8000a8.rtc: setting system clock to 1970-01-01T00:00:07 UTC (7)
[ 7.326437] meson-ir ff808000.ir: receiver initialized
[ 7.346801] panfrost ffe40000.gpu: clock rate = 24000000
[ 7.346843] panfrost ffe40000.gpu: supply mali not found, using dummy regulator
[ 7.358887] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[ 7.358899] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[ 7.358905] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[ 7.358910] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[ 7.404986] meson-dw-hdmi ff600000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[ 7.406299] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 0
[ 7.410417] meson-dw-hdmi ff600000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[ 7.411031] meson-drm ff900000.vpu: bound ff600000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])
[ 7.411466] [drm] Initialized meson 1.0.0 20161109 for ff900000.vpu on minor 1

This is the error, I think (I seem to recall that -2 means “file not found” here). Make a copy of your brcmfmac4356-sdio.bin file and call it brcmfmac4356-sdio.azw,gtking.txt (I think this was the procedure; the method is in the thread above. Perhaps it was that nvram_something file that was supposed to be copied to the .txt name, I don’t recall, but it is in the thread above).

I get similar with my pi4 but my wifi works. I believe it is just checking to see if the file exists and goes another way.

[ray@pi4 ~]$ dmesg | grep "brcmfmac"
[    4.457345] brcmfmac: F1 signature read @0x18000000=0x15264345
[    4.472123] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    4.473392] usbcore: registered new interface driver brcmfmac
[    4.485847] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[    4.698052] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    4.708501] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 23 2020 02:19:54 version 7.45.206 (r725000 CY) FWID 01-88ee44ea