LE8 alpha - screensaver + bluetooth "enable standby" issue

  • Hi!
    In the couple last alpha releases I noticed some issues with screensaver activation... Finally I discovered that if I plug in my USB bluetooth device into my RPi2, the system does not enter in screensaver state, it is active everytime. I see the dongle's red led blinking everytime eventhough I disable bluetooth service from libreelec config tool...

    If I unplug the usb dongle, then the screensaver works great.

  • I have found how the issue is happening:
    - I pair a bluetooth gamepad, Sony Dualshock 3
    - If paired gamepad is on, everything is working ok and screensaver activates after time I set
    - If paired gampad is off (because I didn't use it that day or after auto deactivation with LibreELEC settings) bluetooth dongle is blinking (I supouse looking for paired device) and screensaver does not work. Also if I go to settings> Interface> screensaver> preview it does not work.

    Please, can anybody check if it is happening only to me?

  • I don't know if this is something that is only happening to me, but I think it is important...

    I have dig into the problem and I discovered something else: The problem is the "Enable Standby" setting for paired device in LibreELEC config.

    - After pairing a device (my DS3) if I activate "Enable Standby" when screensaver starts (and the gamepad is suppoused to deactivate) the system blocks the screensaver and never starts, also the gamepad never deactivates.
    - If I reboot, even I don't switch on the gamepad, the issue happens.
    - If "Enable Standby" feature is off, the screensaver works ok, but the gamepad still on, comsuming battery.
    - If "Enable Standby" feature is off, the screensaver works ok, also when the gamepad has been not connected.

    I dont know if I explain myself clear, but the issue is with that feature...

  • I am having a similar issue with regards to bluetooth and the screensaver. RPi3. Using 8bitdo SNES30 BT controller on escalade's community build. However, the issue does not appear to be due to his packages.

    At any rate. I get the following error in my log file when the screensaver activates if I have bluetooth enabled in LibreELEC (whether or not anything is connected). If I disable bluetooth then the screensaver activates as it should. That is my current work around.

    Hopefully this will aid in tracking down the root cause.

    Log:

  • OK, so I was able to resolve my issue. I had some devices listed to standby in
    /storage/.kodi/userdata/addon_data/service.libreelec.settings/oe_settings.xml due to copying over my .kodi/userdata file from an earlier installation. As shown in the code below, I removed the devices and no longer have any setup for standby. After making this change, I was able to have bluetooth enabled and have my screensaver working. I was able to activate the screensaver with the controller powered on (leaving the controller connected) or off. I was even able to enable standby from the menu and have the screensaver activate and disconnect the controller at activation. Just for additional testing, I then disabled standby again through the menus and everything continued to function properly.

    Code
    <bluetooth>
    <standby></standby>
    </bluetooth>

    So...the solution to this issue...appears to be one of validation before disconnecting. I see two options and a combination of the two might be the best way to handle.
    1) Clear bluetooth standby settings on a new installation...since the data is in the kodi userdata folder, it would not be unexpected for a lot of people to copy over old settings to a new installation. I do not know how this could be handled logically, but maybe something as simple as having a menu option to clear bluetooth settings.
    2) Enable validation in service.libreelec.settings/src/resources/lib/modules/bluetooth.py standby_devices. Currently, the function checks that a bluetooth adapter is present and also checks for devices to be listed in the standby settings but doesn't check to see that those devices are actually connected. So it attempts to disconnect something that isn't even connected and thus throws errors.

    Edited once, last by jaykass (September 30, 2016 at 6:16 AM).


  • OK, so I was able to resolve my issue. I had some devices listed to standby in
    /storage/.kodi/userdata/addon_data/service.libreelec.settings/oe_settings.xml due to copying over my .kodi/userdata file from an earlier installation. As shown in the code below, I removed the devices and no longer have any setup for standby. After making this change, I was able to have bluetooth enabled and have my screensaver working. I was able to activate the screensaver with the controller powered on (leaving the controller connected) or off. I was even able to enable standby from the menu and have the screensaver activate and disconnect the controller at activation. Just for additional testing, I then disabled standby again through the menus and everything continued to function properly.

    Code
    <bluetooth>
    <standby></standby>
    </bluetooth>

    So...the solution to this issue...appears to be one of validation before disconnecting. I see two options and a combination of the two might be the best way to handle.
    1) Clear bluetooth standby settings on a new installation...since the data is in the kodi userdata folder, it would not be unexpected for a lot of people to copy over old settings to a new installation. I do not know how this could be handled logically, but maybe something as simple as having a menu option to clear bluetooth settings.
    2) Enable validation in service.libreelec.settings/src/resources/lib/modules/bluetooth.py standby_devices. Currently, the function checks that a bluetooth adapter is present and also checks for devices to be listed in the standby settings but doesn't check to see that those devices are actually connected. So it attempts to disconnect something that isn't even connected and thus throws errors.

    Now, in LE 8 alpha 6 is even worse... If I have connected to bluetooth my dualshock, no matter if enable standby is activated or not, the screensaver does not run... I need to manually swith of the device from LE settings>Bluetooth.
    I tried what you said and it does not change anything...

    Are you using a Pi2 with an USB BT dongle? I wonder if this happend also with RPi3 and built in BT...


  • I am using a pi3 with built-in BT

    I thought if I get a Pi3 the problem will solve but I see it will not...


    What's in your oe_settings.xml?

    I don't know why no one cares about thisi ssue...


  • what is the error in your kodi.log file when the screensaver activates or when you try to preview the screensaver?


  • It just does nothing.

    if "enable standby" is activated, then it switches off the dualshock fades a bit and then screen activates again. Then if I try to preview the screensaver again, it also does nothing.

  • I guess it is something related with DS3 motion sensors... Screensaver activates but then the DS3 is sending some kind of motion/sixais data and kodi reactivates so screensaver disables...

    I haven't another bluetooth gamepad to test this theory...

    I imagine in OE/LE 7 this does not happen because its kodi has no gamepad support.

  • Not sure if this is the same issue but:
    When "Enable Standby" is active in Libreelec/bluetooth settings then the screensaver behaves wrong: screensaver turns on (which disables the TV in my case through CEC-settings) and then immediately screensaver turns off (which turns the TV on again).
    This only happens if "Enable Standby" is ON, else screensaver works fine but obviously the remote control never turns off.

    TL;DR:
    screensaver doesnt work properly with standby enabled in libreelec/bluetooth settings.

    Tested with LE v7.90.008 ALPHA on odroid-c2

    Edited once, last by Dambedei (November 2, 2016 at 10:58 AM).


  • Not sure if this is the same issue but:
    When "Enable Standby" is active in Libreelec/bluetooth settings then the screensaver behaves wrong: screensaver turns on (which disables the TV in my case through CEC-settings) and then immediately screensaver turns off (which turns the TV on again).
    This only happens if "Enable Standby" is ON, else screensaver works fine but obviously the remote control never turns off.

    TL;DR:
    screensaver doesnt work properly with standby enabled in libreelec/bluetooth settings.

    Tested with LE v7.90.008 ALPHA on odroid-c2

    It is exactly the same issue. Are you using a PS3 dualshock or another bluetooth gamepad?