Bluetoothctl Seg Fault

  • Hi

    I just recently setup a ASUS Chromebox CN62 I7 as a HTPC using Libreelec 12.0, I've got everything working fine until I tried to connect my Bluetooth soundbar in Kodi. Kodi sees the soundbar and will connect to it but the connection isn't stable and it keeps dropping and reconnecting to it. After doing some research I decided to try and connect it through SSH using Bluetoothctl but when I type in Bluetoothctl I get "Segmentation Fault (core dumped)".

    Can someone tell me how to fix this pls?

    BTW I am a noob at Linux so please keep it simple.


    P.S. I have tested other bluetooth devices and the ones Kodi sees all work fine except the soundbar.

  • After the core dump (assuming the box is still accessible/responsive) run "journalctl | paste" and share the URL generated so we can see what was printed to the system log (usually there is something). Also tell the make/model of the soundbar.

  • Yea

    My look through it all I could find was a brief error message. I may not know much about the Linux Kernel but I do know enough about computer OSs to know a useless error message when I see one.

    Is there anything I can do about it or is this a coding fault only the programmer can fix (if he/she can work out what caused it)?

  • The segafult is in bluetoothctl which comes from the BlueZ package, so perhaps update to an LE13 nightly. At the moment these are still using the same kernel as LE12 (we will bump to Linux 6.10 in a week or so when it releases) and same Kodi version as LE12 (the bump to Kodi Piers will also happen soon) but the BlueZ version and some background compiler dependencies are already newer.

  • I updated to the latest nightly build but no luck Bluetoothctl still Seg Faults ...

    Interesting

    I just worked out I can use it by typing in "bluetoothctl <command>" and it appears to work.

    Even pairing using bluetoothctl pair <device> still hasn't fixed my connection problem, I may try buying a Bluetooth dongle and see if that fixes my problem.

  • 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
  • Thanks. It's a problem with the initialization of the internal Bluetooth adapter.

    Code
    Jul 12 17:54:41.968605 HTPC (uetoothd)[932]: bluetooth.service: Referenced but unset environment variable evaluates to an empty string: BLUEZ_ARGS, BLUEZ_DEBUG

    So it's a Linux kernel issue (driver/firmware). Buying a Bluetooth dongle seems to be the easiest/quickest solution. Do some research first, and make sure the dongle is Linux compatible.

  • Jul 12 17:54:41.968605 HTPC (uetoothd)[932]: bluetooth.service: Referenced but unset environment variable evaluates to an empty string: BLUEZ_ARGS, BLUEZ_DEBUG

    ^ This just means bluetooth.service https://github.com/LibreELEC/Libr…service#L10-L12 did not find either variable defined in the respective .conf files. It is harmless and if you check your own devices you will see the same boot time message.

    If possible please test with another distro that uses a recent BlueZ version, and with a different BT dongle device.

    If the issue occurs on another distro it's nothing specific to how LE has compiled BlueZ or a problem interaction between BlueZ and core OS functions in libc. If the issue remains with another BT device on LE it's either compile or something in the comms between the Soundbar and BlueZ. If the issue doesn't occur on other BT hardware, it suggests kernel driver or firmware. /shrug