Boblight not working on 12.0 anymore

  • Hi everybody,
    long time LibreElec user, first time forum poster :)

    This morning I upgraded my setup to LibreElec 12.0.0 Legacy Generic.

    When starting up LibreElec I get a message from Bob, Boblight that is, telling me that it could not start and that I should read the readme.

    I have done some investigation and it looks like Bob requires libboblight.so to be loaded via /usr/lib

    But in that location there is no libboblight.so. There is one in /storage/.kodi/addons/service.multimedia.boblightd/lib.private/libboblight.so


    So I thought that as that .so file is not part of the image anymore I make a link to it, but that is not possible as /usr/lib is on a read-only squashfs

    Does anybody here have a clue / hint on how to solve this and get Boblight working again?

    Thanks in advance!

    Regards,

    Ruud

  • It looks like it doesn’t link to the shared library.


    nuc12:~ # ldd .kodi/addons/service.multimedia.boblightd/bin/boblightd
           linux-vdso.so.1 (0x00007fff1bbfd000)
           libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x00007ffb71a43000)
           libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ffb717de000)
           libm.so.6 => /usr/lib/libm.so.6 (0x00007ffb71702000)
           libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007ffb716d5000)
           libc.so.6 => /usr/lib/libc.so.6 (0x00007ffb71508000)
           libudev.so.1 => /usr/lib/libudev.so.1 (0x00007ffb714c8000)
           /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ffb71a5a000)

    I have run the boblightd process and “it seems to run”

  • Hi heitbaum

    Thanks for confirming: you output is exactly the same as what I am getting when running these commands.

    Is there something I can do to fix this? On my setup or maybe create an issue for this?

  • I’m definitely not a bob light expert. I’m assuming that the default /dev/ttyACM0 is the serial port - if that is the same error - then would suggest checking what serial port is on your LE install.

  • Hi, so on LE 11 (and all previous versions) boblight was working correct, this was a 'simple' upgrade.
    The issue here is that libboblight.so should be loaded. This is normally loaded via /usr/lib but in LE there is no fysical or symlinked libboblight.so in that directory, so it fails.

    Is there a way to create that symlink in /usr/lib to the actual location: /storage/.kodi/addons/service.multimedia.boblightd/lib.private/libboblight.so

  • I don’t understand the conversation around the shared library. There has never been a link to /usr/lib for the shared library in LE. The other binaries are correctly linked to the shared library as can be shown by using ldd. I have tried running boblightd via trace and can’t see the library being imported dynamically. Can you please share where you think the dynamic library is being used.

    I can see the process running as below (which wouldn’t run if a library is missing.) I can’t run it myself as I don’t have the serial interface that boblightd communicates too.


    nuc12:~ # systemctl status service.multimedia.boblightd | cat
    ● service.multimedia.boblightd.service - boblightd
    Loaded: loaded (/storage/.config/system.d/service.multimedia.boblightd.service; enabled; preset: disabled)
    Active: active (running) since Mon 2024-05-06 13:37:48 UTC; 22s ago
    Main PID: 1958390 (boblightd)
    Tasks: 2 (limit: 36590)
    Memory: 856.0K (peak: 1.5M)
    CPU: 32ms
    CGroup: /system.slice/service.multimedia.boblightd.service
    └─1958390 boblightd -c /storage/.kodi/userdata/addon_data/service.multimedia.boblightd/boblight.conf

    May 06 13:37:48 nuc12 systemd[1]: Started service.multimedia.boblightd.service.
    May 06 13:37:48 nuc12 sh[1958414]: cp: can't stat '/storage/.kodi/addons/service.multimedia.boblightd/config/*.sample': No such file or directory

  • Hello there,

    I can confirm same behavior at my freshly upgraded Libreelec. Boblight was previously working at the former version of Kodi "Nexus". After upgrading to "Omega" it is asking for an binary library. There was no change made to the boblight configs.

    Obviously its regarding to the missing libboblight.so at the squashfs. I also checked if its possible to add / copy the libboblight.so to the correct location. But as it is RO there seem to be no possibility doing so.

    Would be there a script or such to inject the needed libboblight.so into the squashfs?

    Or maybe patch / edit the boblight Python code to look at this location (/storage/.kodi/addons/service.multimedia.boblightd/lib.private/) instead?

    best regards
    Markus

  • Okay, so was able to solve it following the hint of Markus.

    The issue is not in the LibreElec bolighth service as ( heitbaum pointed out) that is working correct,

    so the issue is in the Kodi Boblight addon.

    do a ssh into your LE system

    do

    Code
    nano ./.kodi/addons/script.xbmc.boblight/resources/lib/tools.py

    Then change line 118 from:

    Code
    return get_libname(platformstr)

    to:

    Code
    return "/storage/.kodi/addons/service.multimedia.boblightd/lib.private/%s" % (get_libname(platformstr),)

    Important: as this is python watch the correct number of spaces / indentation


    Leaving this here for if somebody else has the same issue.

    Note that this is not a real solution but a work-around.

    I do not think that the kodi boblight package (https://github.com/bobo1on1/script.xbmc.boblight) is maintained any more, last change in that repository dates back to 2017

  • Hello Ruud,

    thanks for your effort spent into editing the Python file. I just tested the altered file like in your post and it instantly worked again.

    Knowing that this not a real fix of the cause, but its a workaround I can live with.

    THanks

    Markus