veldenb / plugin.program.moonlight-qt

A launcher and updater for running Moonlight-qt on LibreELEC.
GNU General Public License v3.0
86 stars 11 forks source link

Xbox controller working in Kodi, but not in Moonlight #55

Closed guix77 closed 5 months ago

guix77 commented 5 months ago

Hi,

On LibreELEC 10.4 on an Rpi4, I installed the xpadneo driver, which was not easy. My Xbox Series X controller is recognized on Kodi, I get the rumble and I can navigate in Kodi with the controller. On Moonlight however, the controller is unresponsive. In Moonlight / desktop, I also tried to launch the Xbox accessories util and it reports no controller.

The controller stays on when I'm on Moonlight and as soon as I quit and get back to Kodi, it's working again in Kodi.

I have same results with turning the gamepad on before launching Moonlight, and after.

Moonlight works fine with a wireless keyboard with touchpad and USB dongle.

I've a linux box with Debian, xpadneo and moonlight-qt and my controller works with it.

I didn't find any useful things in the Kodi log: https://paste.libreelec.tv/fancy-shark.log

Any idea here?

guix77 commented 5 months ago

This could be because xpadneo has automapping since SDL2 2.28 only? https://github.com/atar-axis/xpadneo?tab=readme-ov-file#sdl2-228-compatibility

Edit: no, I have SDL 2.29: SDL Info (0): Compiled with SDL 2.29.0

veldenb commented 5 months ago

Have you tried running moonlight-qt with the controller on Raspbian? It could be an issue that LibreELEC is too bare bones and misses some libraries to make it work with SDL / moonlight-qt.

guix77 commented 5 months ago

Great suggestion! I installed a new Raspberry Pi OS, has to go with the 64 bits because on 32 xpadneo wasn't building, and I installed moonlight-qt as on https://github.com/moonlight-stream/moonlight-docs/wiki/Installing-Moonlight-Qt-on-Raspberry-Pi-4

Turns out it worked the 1st time during a few minutes, then I heard a Windows unplug sound, the controller main button was blinking, then I heard the Windows plug sound and the blink stopped, had the rumble, but no more controls. This schema was the same with your plugin.

And before using xpadneo, I had - among other problems with drivers different than xpadneo - a very similar problem with stability in Kodi, but disconnect/reconnects as soon as streaming was started.

There are many moving parts here but it seems the problem is not in your plugin but somewhere in SDL / moonlight-qt / others. I'm closing that issue for now.

Could be a problem with ViGEmBus on my Sunshine Windows host, although it's working (almost) flawlessly with an AMD64 linux client. Still have controller disconnection issues from time to time there, but very rare.

veldenb commented 5 months ago

Good luck!