Bluetooth controller input not recognized

  • Hello all Libreelec user and Libreelec team !

    First of all thank you for all the work accomplished :)

    I encounter some problem with my Xbox One controller paired in bluetooth : input are not recognized under LibreElec.

    The controller is well paired and input are detected under btmon but not with Kodi (under Input devices menu when trying to map controller)., except the "Home" button.

    There's no error in log and using the xpadneo driver instead of xpad doesnt help.

    I cant figure out where the problem is comingfrom (my knowledge is not sufficient).

    This seems to be only related to LibreElec since when installing Kodi on raspbian or using it with other distributions (recalbox), there's no such problem.

    Any clue ?

    My hardware and software setup :

    > Raspberrypi 3B+

    > Xbox One controller (v1708) connected via onboard bluetooth

    > Libreelec 9.2 (fresh install, no addons and all settings set to default)

    > ERTM bluetooth mode is disabled to allow pairing of the Xbox One controller (/sys/module/bluetooth/parameters/disable_ertm set to 1)

    Other threads related :

    [LE 9.0] Xbox One S Gamepad - no inputs are recognized

    Xbox One Controller - Bluetooth

  • Hmmm - I've used a Logitech F710 (Similar to Xbox controller) without issues on earlier releases.

    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.

    Full logs only. No modified logs.

    Do not post your logs directly into the forum, use and post the link.
  • Indeed, strange that a similar bluetooth controller works and not this xbox one pad ...

    My Kodi log :

    External Content
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    On a fresh install (after adding "options bluetooth disable_ertm=1'" in /storage/.config/modprobe.d/bluetooth-disable-ertm.conf) Xbox one controller was paired and connected in bluetooth.
    For the tests I went to the gamepad settings menu for and tried to assign the A , Up then Guide keys to the bluethoot gamedpad.

  • I might have the same problem, I can no longer get any input to Kodi from my 8BitDo SN30 bluetooth controller.

    It's connected and the input shows up with btmon.

    And I think this used to work with a 9.2 alpha, but not with the current 9.2 + kodi 18.5.

    Maybe some of the input/controller plugins are involved also...

  • Hi,

    did you solve the problem? I had a similar problem with a Xiaomi BT Gamepad and the problem are these lines in the log:

    2019-12-19 08:44:05.639 T:1790935936   ERROR: AddOnLog: Joystick Support: Feature "guide": <feature> tag is not a valid primitive
    2019-12-19 08:44:05.673 T:1790935936   DEBUG: AddOnLog: Joystick Support: Loaded device "Keyboard" with 1 controller profiles and 139 total features
    2019-12-19 08:44:05.712 T:1790935936   DEBUG: AddOnLog: Joystick Support: Loaded device "Mouse" with 1 controller profiles and 10 total features
    2019-12-19 08:44:05.713 T:1790935936   DEBUG: AddOnLog: Joystick Support: game.controller.mouse: Removing pointer from button map
    2019-12-19 08:44:05.742 T:1790935936   DEBUG: game.controller.default: Waiting for input for feature "a"
    2019-12-19 08:44:06.869 T:1927279488   DEBUG: libinput: event3  - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_OTHERBUTTON → DEBOUNCE_STATE_IS_UP
    2019-12-19 08:44:06.870 T:1927279488   DEBUG: libinput: event3  - debounce state: DEBOUNCE_STATE_IS_UP → DEBOUNCE_EVENT_PRESS → DEBOUNCE_STATE_DOWN_WAITING
    2019-12-19 08:44:06.894 T:1927279488   DEBUG: libinput: event3  - debounce state: DEBOUNCE_STATE_DOWN_WAITING → DEBOUNCE_EVENT_TIMEOUT → DEBOUNCE_STATE_IS_DOWN
    2019-12-19 08:44:06.982 T:1927279488   DEBUG: libinput: event3  - debounce state: DEBOUNCE_STATE_IS_DOWN → DEBOUNCE_EVENT_RELEASE → DEBOUNCE_STATE_RELEASE_WAITING
    2019-12-19 08:44:06.994 T:1927279488   DEBUG: libinput: event3  - debounce state: DEBOUNCE_STATE_RELEASE_WAITING → DEBOUNCE_EVENT_TIMEOUT_SHORT → DEBOUNCE_STATE_RELEASED

    As you can see the gamepad is registered as mouse and as keyboard (for me it was joystick and keyboard) and thus a mouse event and a keyboard event are emitted at the same time. libinput apparently can't handle this and thinks the button bounced and tries to debounce, which does not work. In my case I wrote a udev rule to disable the libinput registration of the keyboard:

    ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{DEVPATH}=="*2717:3144*",  ENV{LIBINPUT_IGNORE_DEVICE}="1"

    After that only the joystick was regognized and it works just fine. See Xiaomi bluetooth gamepad not working for further information.