Raspberry Pi Zero 2 W

  • Since wifi works with the RaspiOS, then I suspect that some procedural error may be at fault. While I have supplied the screenshots to show the "actual" work for reference, I expect that some of the files, as documented, for you to obtain for conducting the steps may have been removed or changed. Unfortunately, the test LE11 packages, legacy debian add-on packages, may only stick around for a short period of time and is superseded by more recent builds, but I expect that for the needed VCOS components it should still be valid nonetheless in future daily builds.

    This would be another great reason to go with the squashfs "SYSTEM" approach, after it is done once, you can forget about ever having to do it again should your LibreELEC SD cards go bad.

  • Hello again,

    thank you again, WIFI works with LE9 and LE11. Do not know what causes it, but now running stable.

    Stable, but in LE9 the addon of all public german streams e.g."ARD mediathek" are throwing an error.

    So lets see...

    BR

    Detlef

  • Stable, but in LE9 the addon of all public german streams e.g."ARD mediathek" are throwing an error.

    It's pretty experimental now, but maybe we can fix it with a log.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • It's pretty experimental now, but maybe we can fix it with a log.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    Hi Da Flex,

    OK, sounds good, but im busy the next days so it can take a while.

    It would be great if this will be fixed because using media center in german stations is my Main use case :)

    Again thanks to all people working in this project.

    BR

    Detlef

  • Hello,

    Got LE 9.2 working on Pi Zero 2 using the method provided by @Synerworks but Kodi crashes every time I try to play a video.

    I got the following in dmesg:

    Code
    vchiq: 0: ignoring ERROR from callback to service 5004

    in kodi crash log:

    Code
    mmal: mmal_component_create_core: could not find component 'vc.ril.video_decode'

    in journalctl:

    Code
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: usrvcsm: [vcsm_malloc_cache]: [315] [mmal_vc_port buffer]: NULL size or invalid device!
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: usrvcsm: [vcsm_vc_hdl_from_hdl]: [315]: invalid device or handle!
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: usrvcsm: [vcsm_lock]: [315]: invalid device or invalid handle!
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: mmal: mmal_vc_shm_alloc: could not allocate 1048576 bytes of shared memory (handle 0)
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: mmal: mmal_vc_port_payload_alloc: vc.ril.video_decode:in:0(H264): failed to allocate 1048576 bytes of shared memory
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: mmal: mmal_pool_initialise_buffer_headers: failed to allocate payload 0/2
    Dec 19 12:28:25 LibreELEC kodi.sh[307]: usrvcsm: [vcsm_malloc_cache]: [315] [CGPUMEM]: NULL size or invalid device!

    I also noticed /dev/vcsm is missing. I guess this is why video playback fails but have no idea how to make /dev/vcsm available.

  • The classic problem of not having enough shared memory, especially for the Videocore portion. With the Pi Zero 2 capped at 512M, not all usable however, finding the right memory split between the ARM and GPU for things to work would be through trial and error. The alternative would be to drop back to LE8 since it is certainly leaner than LE9 on resource usage, but dated though. Take a look at the KODI forum at: https://forum.kodi.tv/showthread.php?tid=327150

    There is a good reason for LibreELEC in leaving the earlier Pis behind, without enough memory, you hit the ceiling and things just no longer work as expected. Just because it can, it does not mean that it is as good.

  • WIFI works with LE9 and LE11. Do not know what causes it, but now running stable.

    Don't know if it's any help, but I have been fiddling around with a Pi Zero 2 W and have had problems with both wifi and Bluetooth which are very reminiscent with those I have had on the Pi4.
    I turned off the in-built Bluetooth and then WiFi worked fine. I have added a cheap BT dongle instead which doesn't seem to interfere.

  • in kodi crash log:

    Hello,

    Got LE 9.2 working on Pi Zero 2 using the method provided by @Synerworks but Kodi crashes every time I try to play a video.

    Code
    mmal: mmal_component_create_core: could not find component 'vc.ril.video_decode'

    I also noticed /dev/vcsm is missing. I guess this is why video playback fails but have no idea how to make /dev/vcsm available.

    Well I get pretty much the same with my zero2 as well. Everything seems to work fine until I try and play a video, then kodi crashes:

    Code
    ERROR: CMMALPool::CMMALPool Failed to create component vc.ril.video_decode

    I've tried giving the GPU the same memory as my RPI3 which is running the same LE 9.2.8 build by tweaking config.txt to:

    Code
    #  gpu_mem_512=160
      gpu_mem_512=256

    but no cigar.

    I can confirm, like powiedzmi, I haven't got a /dev/vcsm (although my RPI3 does)

    I did read on https://archlinuxarm.org/forum/viewtopic.php?f=9&t=14931 that similar issues occur when there's something wrong with the firmware, so maybe there's a change in later firmwares that means this hack won't work anymore?

    My current firmware version (wifi working, no /dev/vcsm or video playback) is:

    Code
    raspberrypi-firmware soc:firmware: Attached to firmware from 2021-11-16 17:41, variant start_x
    raspberrypi-firmware soc:firmware: Firmware hash is 99c5aad7da0d1e3b2c28669a3941db77734b9f2d

    Can anyone confirm video playback working using this hack on a zero2, in which case, which versions of bcm2710-rpi-3-b.dtb, fixup.dat and start.elf did you use and what does dmesg report for your firmware version?

    Notes:

    I also tried using the the most recent LE nightly resulting in a firmware version from 1/12/2021, but the symptoms are the same.

    I don't have any of the extra codec licenses enabled on either the RPI3 or the Zero2

  • Don't know if it's any help, but I have been fiddling around with a Pi Zero 2 W and have had problems with both wifi and Bluetooth which are very reminiscent with those I have had on the Pi4.
    I turned off the in-built Bluetooth and then WiFi worked fine. I have added a cheap BT dongle instead which doesn't seem to interfere.

    I would also expect that bluetooth issues would also be encountered, the peripheral is also different than on the PI3. No verification has been done in this area since media based access to the Pi Zero 2 W tends to be over WiFi and controlled via keyboard or USB keyboard/mouse dongle of some sort. While the recommended approach would have been to secure another cut of LE9 officially, the kludge was never meant as a measure to provide a 100% solution instead of taking the correct integration approach for the Pi Zero 2. The study was meant as a measure for the bean counters on preserving investments in existing Pi0 solutions by throwing hardware at the problem of performance since $oftware approach could be problematic.

    While testing had been conducted using seven different videos, formats, encodings, playback length, unsure if sufficient media has been thrown at it to affirm viability. Nonetheless, the very fact that the Pi Zero 2 caps out at half the Pi2,3 1GB memory and Pi4 even more, it should not be surprising that the limits are reached. As surely as if you installed Windoze on a 1GB laptop and pulled half the memory sticks out of it, its behaviour would be questionable at best. No difference in this scenario. The only other option is correct tuning of the ARM/GPU memory split, or using the much leaner release of LE8 to give a bit more breathing room.

    Stability issues for WiFi will certainly be impacted by revisions to the BCM43436 firmware, so it is entirely possible that unacceptable outcomes may arise from sourcing updates that were not already verified. By the very nature that the only the radio firmware is different between the Pi3 and Pi Zero 2, LE9 should operate pretty much the same on either platform unless hitting the constraint limits.

  • Looking at the differences as attached, nothing related to vcsm is altered other than the details for gpio, spi, i2c, uart, sdio, led, wifi, and so on, you name it. As disclosed in the first post, duplication of the Pi3 DTB is sufficient to get the Pi Zero 2 W to boot and operate without WiFi, the firmware fix simply replaces the BCM43430 instance since the DTB does not specifically define the BCM43436 radio as used on the Pi Zero 2. While the alternate approach suggested was by using all the VCOS boot files from the LE11 nightly builds, which now does include the correct DTB and VCOS and fixes for booting, this is the route to take if you are planning on doing more with the Pi Zero 2 other than with a USB lan interface. Either way, the BCM43436 firmware is loaded whether the DTB defines the correct wifi device since "brcmfmac" sees the sister chip as BCM43430 anyhow.

    The only thing I can say is procedural coincidence, and unsure why LE9.2.6 is being referenced since officially the last LE9 for the Pi3 was at 9.2.8, on which this fix is for the Pi Zero 2.

  • OK I found the procedural error that caused /dev/vcsm not to appear; Step 3 in the post from Morphy above:

    I'll see if I can summarise what I did to get it working as I was a bit confused by a couple of things:


    1. Download LE9: https://releases.libreelec.tv/…LEC-RPi2.arm-9.2.8.img.gz
    2. Download LE11 Nightly: https://test.libreelec.tv/Libr…y-20211210-7f19d9f.img.gz
    3. Copy "bcm2710-rpi-3-b.dtb" from the LIBREELEC partition on the LE11 SD card to the same partition on the LE9 SD but rename to "bcm2710-rpi-zero-2.dtb"....

    If you copy brcm2710-rpi-3-b.dtb from the LE9 partition rather than from the LE11 partition, it works.

    (Stands to reason; dtb and kernel version belong together).

  • I've tried pulling the BCM43436 firmware from github and RaspiOS. Yeah, the pi now connects to a WAP but I can't do any real work with it. File xfers bomb do to connection drops. If you have a stable wifi connection please tell me what specific firmware you're using. Bluetooth radio is disabled, BTW.

  • The firmware version I used appears in my original post containing the 'dmesg' output demonstrating its operation. I would assume that subsequent revisions would function correctly, whereas the drop used was tagged "test", access to the firmware from recent nightly LE11 images may be the way to go in event that unacceptable behaviour is observed. I have applied the same changes to LE7, LE8, and LE9 with the similar results. Have not inspected whether LE10 works since an official instance for the Pi3 has not been released due to progress being focused on LE11. The 'correction' has also been evaluated on legacy RaspiOS builds, early Debian for Pi3, OpenWRT, older PiCore just to confirm the expected results.

    Has the country code setting been changed when using the "LibreELEC Configuration" tool for your region? Could explain WAP issues if it is operating in its default mode?

    Edited once, last by Synerworks: OpenWRT missing. (January 9, 2022 at 6:35 PM).