Kodi+Moonlight+Bluetooth controller=Impossible?

I have been trying for the past several days to get any combination of these things working on a RPi4 8GB. I am past my wit’s end.

All I want is for my Pi to run Kodi, and be able to launch moonlight. I want to control this with a normal xbox bluetooth controller. This is all normal stuff that’s achievable individually.

OSMC will accept bluetooth input, but will not allow Moonlight to run in any way shape or form (black screen on any attempt). Once OSMC has failed/refused to show Moonlight, it refuses to show -anything at all- until rebooted. I cannot find any information on Moonlight+OSMC other than some now-irrelevant launcher called “Luna” that was thoroughly abandoned over half a decade ago & does not work with any current implementation of Kodi.
The Moonlight devs are as unhelpful as ever, simply pointing back to their instructions for OSMC, which themselves are incorrect and result in compilation errors.

LibreELEC has had completely broken bluetooth input for years now, as do Open/Core. Additionally, while Moonlight does run, the implementation chosen here does not function correctly & drops connection or delays for seconds at a time.

In Raspbian, I can get Kodi & Moonlight-qt working, but as Kodi’s input recognition & the RPi’s driver assignment have conflicts, Kodi ignores any & all bluetooth input from any Xbox controllers.
None will auto-reconnect to the paired & switched-on controller after a power cycle, which means all have underlying issues with bluetooth.

I know the hardware can do this, but sadly everywhere I turn for software has been nothing but bugs, failure & middle fingers. Is this outright impossible without reworking large parts of this software? I could have made this work in Android TV in a matter of minutes.

Thanks to anyone with info.

I suspect that Moonlight may still depend on the old GLES + OMX stack, which won’t work as expected on Pi anymore due to the move to V4L2/GBM. Unfortunately I don’t know enough about the project to advise.

Wont help you with Moonlight. but I recommend using (userland) xow driver for the wireless adapter with xbox controllers.
Or maybe even better, the new xone (kernel driver).
That way you don’t have to mess with bluetooth. The adapter will pair with the controller just like a real xbox.