Posts by osen

    Trying to build my own image for this board (Rock 4 SE) but unsure what the correct procedure is. There is a .dts available for the board, .dtsi for the SoC (RK3399-T, which just seems to be a downclocked RK3399) and uboot defconfig available.

    Can I just add the following to uboot_helper :

    Code
    	'rock-4se': {
           'dtb': 'rk3399-rock-4se.dtb',
           'config': 'rock-4se-rk3399_defconfig'
         },   

    And then build using the command PROJECT=Rockchip ARCH=arm DEVICE=RK3399 UBOOT_SYSTEM=rock-4se make image ? Or do I have to create a patch manually? I'm not at all familiar with that process, so would really appreciate some pointers in that case. Having a hard time finding a good step-by-step tutorial.

    Added a pr to add aac support into pipewire.

    https://github.com/LibreELEC/LibreELEC.tv/pull/8015

    This still needs to be run tested.

    osen - I’m unsure of the other “boot” error you are experiencing.

    Awesome, thank you. I'm very confused about that too. Normally resize2fs does its thing and the system reboots after a 15s countdown, but with Pipewire support enabled it's just a message that it can't due to the system already being initialized. I have not changed anything else in the build options other than:

    KODI_PIPEWIRE_SUPPORT="yes"

    PIPEWIRE_SUPPORT="yes"

    ALSA_SUPPORT="no"

    KODI_ALSA_SUPPORT="no"

    PULSEAUDIO_SUPPORT="no"

    KODI_PULSEAUDIO_SUPPORT="no"

    EDIT:

    Seems like this condition is triggered with Pipewire support enabled for some reason, but I don't know if that's what's causing the splash screen hang or not:

    LibreELEC.tv/packages/sysutils/busybox/scripts/fs-resize at aec466da8aaf5f79b8f18b8474d0a6e6fbaf5127 · LibreELEC/LibreELEC.tv
    Just enough OS for KODI. Contribute to LibreELEC/LibreELEC.tv development by creating an account on GitHub.
    github.com

    It works on Generic. However, with Pipewire I get all sorts of audio stuttering/crackling via HDMI and Bluetooth, so it is hardly usable.

    I see, still experimental I guess? I'm building for RPi 3 so maybe something fundamental is missing there still.

    Yeah KODI_PIPEWIRE_SUPPORT and PIPEWIRE_SUPPORT set to yes and the ALSA and Pulseaudio ones set to no just hangs on splash screen. Tried to clean and build from scratch again but same issue. For some reason on the first boot with Pipewire support I get a message about resizing not being permitted because of the system already being initialized, while the standard ALSA + Pulseaudio resizes and reboots. Not sure why that is?

    From searching around a bit more it seems like maybe bluez needs to be built with AAC support using the --enable-aac option and fdk-aac package? By default only SBC is supported it seems.

    Also edit those:

    ALSA_SUPPORT="no"

    KODI_ALSA_SUPPORT="no"

    PULSEAUDIO_SUPPORT="no"

    KODI_PULSEAUDIO_SUPPORT="no"

    That built successfully but does not get past the LE splash screen so I don't know how to debug further.

    For fun I tried OSMC and to my surprise AAC worked right out-of-the-box and was set by default with huge increase in audio quality:

    Code
    < AVDTP(p): Set config cmd: transaction 3 nsp 0x00
    ACP SEID 3 - INT SEID 1
    Media Transport
    Media Codec - MPEG-2,4 AAC
    MPEG-4 AAC LC
    48kHz
    2 Channels
    192000bps VBR
    Delay Reporting

    So it is definitely possible, question is if it's feasible to get it running under LE.

    It seems that LE by default still uses Pulseaudio for BT though, no? The only output I have for BT in Kodi on LE 11.0.3 is PULSEAUDIO: Default, Bluetooth Audio. Both Pipewire selections are disabled in the build options by default I can't find any documentation or even discussions around using Pipewire in LE.

    Pipewire should support AAC from what I can gather, but it may require additional non-free packages to be installed.

    Sorry, I don't understand what that means. This is way out of my comfort zone and I don't understand what's what here. Is it not possible to use Pipewire instead of Pulseaudio?

    I tried adding KODI_PIPEWIRE_SUPPORT in addition to PIPEWIRE_SUPPORT in the build options but then I got the following error:

    Code
    Traceback (most recent call last):
    File "/mnt/f/wsl/LE2/LibreELEC.tv/scripts/genbuildplan.py", line 369, in <module>
    REQUIRED_PKGS = processPackages(args, ALL_PACKAGES)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/mnt/f/wsl/LE2/LibreELEC.tv/scripts/genbuildplan.py", line 298, in processPackages
    raise Exception(msg)
    Exception: Invalid package reference: dependency kodi:host in package kodi-platform::PKG_DEPENDS_TARGET is not valid
    Parallel build failure - see log for details. Time of failure: Sat Jul 29 01:18:41 CEST 2023
    make: *** [Makefile:10: image] Error 1

    I have no idea if it would make a difference though. I still can't figure out how to enable AAC using Pipewire.


    I may be in over my head here, I thought this would a common use case but doesn't seem like it after searching for a bit. Not being able to install any additional packages I guess there would need to be some "native" support for the non-free AAC codec in LE?

    I'm seeing in the build log that the Pipewire selection adds ldacBT and libfreeaptx, but nothing AAC related from what I can see.

    Does your dongle work with AAC on a regular PC?

    It does yes, AAC works with this dongle on a PC running W11. Currently I'm testing with an image built from source (LE 11.0.3) with Pipewire support enabled, which supposedly supports AAC among others. I have no idea where to start to configure it though. Out-of-the-box SBC is being used once again and the only real documentation for configuring Pipewire seems to be using Wireplumber:

    Quote

    WirePlumber is a modular session / policy manager for PipeWire and a GObject-based high-level library that wraps PipeWire’s API, providing convenience for writing the daemon’s modules as well as external tools for managing PipeWire.

    Which isn't included with the Pipewire support in LE.

    Recently got a pair of Bose QC 45's and wanted to use them within LE. Unfortunately out-of-the-box they connect using SBC with low quality settings which results in really bad audio quality, and I'm wondering if it's possible to get AAC up and running using the following setup:

    LE 9.2.8 (old I know ... compatibility issues)

    RPi3B

    Logilink Bluetooth dongle (RTL8761B chipset)

    This is the config set automatically on connection:

    Support for AAC is reported (but not used):

    Is AAC possible with this setup? If not, would it be with newer LE version? Or building from source? Any hints are appreciated.

    Not all USB to SATA-adapters work.

    Yes, it's best to get a well known SATA adapter that has been tested and verified such as the Startech's (this page might help). Also the drive itself can be problematic; I had a Samsung 830 that wouldn't work but then a Kingston A400 worked with the same adapter (might have to do with different power draw).

    I have a RPi3B+ running very reliably with a Startech adapter and Kingston A400 120GB for years now. The first generic adapter I had didn't boot successfully every time and made the system freeze sometimes.

    I'm running into the following error from time to time on a RPi3B:

    Code
    Librespot: monitor started
    NOTICE: Librespot: ['librespot', '--backend', 'pulseaudio', '--bitrate', '320', '--cache', 'cache', '--device', 'librespot', '--device-type', 'TV', '--disable-audio-cache', '--name', 'Librespot@LibreELEC', '--notify-kodi', '--autoplay']
    ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
    Error Type: <type 'exceptions.OSError'> 
    Error Contents: [Errno 12] Cannot allocate memory

    Followed by traceback section.

    There's usually about 300MB of free memory when this occurs, so it shouldn't be due to the system being out of memory I would think but maybe that's not enough? Has anyone else experienced this issue?

    Has anyone figured out a way to limit the use to one add-on only? As there's only exclude window ID or add-on I can't figure out how to accomplish this.

    As the add-on in question is a video add-on it uses the same window ID as several others, so it's not possible to simply exclude every other window ID.

    I have had no problem using Bluetooth since I switched to LibreELEC two years ago due to BT issues of old OSMC. I have used many versions of LE and now it is 9.2.8 on my RPi3B+.

    I don't believe the 3B and 3B+ use the same BT controller though. The WiFi/BT module is upgraded on the +, I have one of those as well and BT works in LE on that board. On the non+ it's always been broken for me at least.


    EDIT: It seems the B uses a Broadcom BCM43438 while the B+ uses a Cypress CYW43455.

    As topic states, I'm wondering if there is still no solution to the onboard RPi3 BT issue (no adapter found). I'm running LE 9.2.8 on a RPi3B.

    I dabbled in this quite a while ago, quickly gave up and bought a USB BT adapter instead. Now I needed it for another board and while I can just get another one, I just wanted to check if it's possible to get the onboard working first. I've searched the forum but I just find the old threads with the recommendations of getting another adapter.

    The issue is still the same, despite enabling BT in LibreELEC settings it doesn't activate and the "No Bluetooth adapter found" message is shown. Bluetoothctl can't find an active adapter either. I know the adapter works as I can get it working in Raspberry Pi OS, so there must be some issue with LE it seems.

    Test the memory usage after adding

    Code
    MALLOC_ARENA_MAX=1

    to /storage/config/kodi.conf.

    This could help if it's a memory fragmentation issue.

    Doesn't seem to make a difference unfortunately. I added it to /run/libreelec/kodi.conf as there was no kodi.conf in that location, maybe that assumption was wrong?

    70% of our userbase has an RPi3 or RPi2 so if there was a general issue we'd know about it. From past experience .. start uninstalling add-ons until you find the one causing the problem.

    I've tried disabling everything third party (I think ... I only have Twitch, YouTube, inputstream.adaptive and a skin installed but they have some dependencies) but made no difference. Doing anything, just playing a video file from a network source for example, slowly increases RAM usage. Doing things like updating the library takes a bigger chunk in one go. Doesn't seem like RAM is ever cleared. Usage only goes up, never down. So when updating the library takes a chunk of RAM it seems that chunk is reserved until Kodi is restarted.

    Been having this issue ever since upgrading to Leia on my RPi3B IIRC, currently on LibreElec 9.2.0. The problem I'm facing is that the memory usage of kodi.bin just grows and grows until system becomes unresponsive. Starts out at about ~530MB free on a fresh boot and then increases at a rate of about 50-70MB / day (it's not perfectly linear). After a week or so memory usage is close to 100% and everything grinds to a halt. Manually rebooting once a week is not the end of the world, but I then lose sync with HomeAssistant (which has been a bug since forever) and it's just an annoyance overall.

    I don't feel like this is normal behaviour but I don't know how to troubleshoot it. Does anyone else experience this?

    You could always create a unit that unmounts the shares before suspend (use WantedBy=sleep.target).

    I'm sorry, I don't understand what that means. Is this similar to the systemd mount files? Would this automatically unmount the shares when host goes offline and remount when it comes online again? Could you point me to an example file or similar?

    Quote

    I find udevil helpful for easy mounting of shares btw. "udevil --mount smb://server/share" creates a properly named directory under /media and mounts it for you.

    Interesting, I'll look into it. Would you recommend udevil over AutoFS (which is another alternative I've seen mentioned)?

    You could write a python script, started from autostart.sh, which automatically mounts / re-mounts your CIFS.

    My knowledge of Python is minimal to non-existent I'm afraid. I'm more or less illiterate when it comes to coding in general. My batch file works as a temporary (idiot) workaround. Also adding noauto to the cifs mount options seems to be able to handle host going offline and coming back, but I'm not 100% sure yet. Also looking into using AutoFS, as it seems people claim it can handle this sort of situation better.