[SOLVED] Setting up Xbox One S controller via Wireless

Hi there,

I am new here and first of all I would like to say thanks to SAM for this awesome OS.

After installing OSMC and configure moonlight with Luna (Kodi´s addon) everything works like a charm instead of my Xbox One S controller.

In order to set up this controller via wireless, I have followed this guide:

However, during the “raspberrypi-kernel-headers” installation, I´m getting the following error:
sudo apt-get install dkms raspberrypi-kernel-headers
Unable to locate package raspberrypi-kernel-headers

This is weird as in Raspbian (I assume OSMC uses Debian as well as Raspbian) this command works properly and I can get my Xbox One S controller working wireless.

Is there any command I am missing?

Thanks in advance guys :wink:

OSMC uses only Debian.

The headers package for a Pi2/3 will be:

rbp2-headers-`uname -r`  

Don’t install bluez or bluez-utils. Those components are already installed as part of the package armv7-bluez-osmc, and you’re likely to get clashes.

Sam also discourages the use of DKMS since it can break things. So install at your own risk.

1 Like

Hi dillthedog,

Thanks for your quick response.

So in order to get my controller working via wireless, I do need to uninstall bluez or bluez-utils and, instead of run raspberrypi-kernel-headers, run the command rbp2-headers-`uname -r
am I right?

I´m not really familiar with this configuration but I don´t know if I´ll need DKMS installed to get working this feature.

However, Is there any other way to set up a Wireless Xbox One S controller?

Thanks in advance and with regards,

They shouldn’t be installed - unless you installed them. I checked my Pi3 and I haven’t manually installed the armv7-bluez-osmc package, so I guess it’s part of the standard OSMC build.

You run:

sudo apt-get install rbp2-headers-`uname -r`  

The Xbox link you provided is to build a kernel driver. Each time the OSMC kernel changes, you’ll (probably) need to recompile the Xbox driver for the new kernel. DKMS tries to automate the process but can also break things. Alternatively, once you’ve figured out how to build the driver, which is the hard part, repeating the process manually should be relatively straightforward.

thanks again for your response

That´s exactly what I did. But I´m gonna install again OSMC and start from the beginning.

Here is where probably I´m gonna stack.
If DKMS tries to automate that process, it seems that I need to do it on my own and being honest, I don´t even know what I have to do…

Anyway, thanks for all.
If I got my controller working properly, I´ll post here the solution.


1 Like

Hi again,

After running the command, I got this error:

osmc@osmc:~$ sudo apt-get install rbp2-headers-`uname -r`
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package rbp2-headers-4.14.34-6-osmc
E: Couldn't find any package by glob 'rbp2-headers-4.14.34-6-osmc'
E: Couldn't find any package by regex 'rbp2-headers-4.14.34-6-osmc'

You know why it´s not able to find the headers?


Could you share the output of:

cat /etc/apt/sources.list

Hi Brian, this is my output

deb http://ftp.debian.org/debian stretch main contrib non-free

deb Index of /debian stretch-updates main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib non-free

deb http://apt.osmc.tv stretch main


Hi guys,

I have run the following command and I got this:

osmc@osmc:~/xpadneo$ sudo apt-get install rbp2-headers-4.14.34-6-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
Recommended packages:
libc6-dev | libc-dev
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
Need to get 8885 kB of archives.
After this operation, 63.7 MB of additional disk space will be used.
Get:1 http://ftp.fau.de/osmc/osmc/apt stretch/main armhf rbp2-headers-4.14.34-6-osmc armhf 6 [8885 kB]
Fetched 8885 kB in 1s (6778 kB/s)
Selecting previously unselected package rbp2-headers-4.14.34-6-osmc.
(Reading database … 26526 files and directories currently installed.)
Preparing to unpack …/rbp2-headers-4.14.34-6-osmc_6_armhf.deb …
Unpacking rbp2-headers-4.14.34-6-osmc (6) …
Setting up rbp2-headers-4.14.34-6-osmc (6) …
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.34-6-osmc /boot/vmlinuz-4.14.34-6-osmc
Error! echo
Your kernel headers for kernel 4.14.34-6-osmc cannot be found at
/lib/modules/4.14.34-6-osmc/build or /lib/modules/4.14.34-6-osmc/source.

So as far as I see, there is not way to install headers on OSMC???

Thanks in advance

I suspect you have a corrupt installation at this point. I’d suggest a fresh in stall, preferably on a new SD card.

DKMS. I did say it can break things…

Hi Brian,

I´ve done before and same errors.
Here I´m completely stack.

Hi Dillthedog,

I run DMKS becasue is required during the installation.
I´ve tried to see any other workaround and avoid this feature but I didn´t find anything.

Do you know how can I run the driver installation without DKMS.

Thanks in advance guys

It does seem to rely on DKMS, which is unfortunate.

The best I can suggest is that you try to replicate the expected (by DKMS) directory structure on OSMC. So, for example, where DKMS gives an error like:

Your kernel headers for kernel 4.14.34-6-osmc cannot be found at
/lib/modules/4.14.34-6-osmc/build or /lib/modules/4.14.34-6-osmc/source

you need to create a symbolic link with the expected directory (here /lib/modules/4.14.34-6-osmc/build or /lib/modules/4.14.34-6-osmc/source) to the real directory.

Ok guys problem solved BUT with a workaround that is 98% fully compatible.

What I did is install the driver xboxdrv and then disable erm.
To do so, we need to do the following:

sudo apt-get install xboxdrv

sudo nano /etc/rc.local

And I included the command (echo 1 > /sys/module/bluetooth/parameters/disable_ertm) in my rc.local before “exit 0”

(This command will permanently set up the output 1)

Then I run the command:
chmod +x /etc/rc.local

The last thing to do is just go to bluetooth settings in OSMC and pair the controller with Pair with PIN

The controller will be paired and working properly. The only thing is not working are the buttons select and menu (the button with the X light).

I´ll try to figure out how to configure these keys but I didn´t find the solution yet.
I´ve tried mapping the buttons with OSMC panel but doesn´t recognize them.

Hope it helps to more people that like me, use moonlight with this awesome OS.

Thanks @bmillham and @dillthedog for you comments :wink:


Hi fellas,

I got another workaround making FULLY compatible our XBOX ONE S controllers via Bluetooth.

With this, you will get your pad 100% working, however, keep in mind that DKMS has to be installed. So this can break things according to OSMC developers, however, I did not get any issue so far.

You need to follow this link

and as you can see, the commands have been changed accordingly due to my finding.

On OSMC you will have to run the following commands

sudo apt-get install dkms rbp2-headers-`uname -r` 
sudo ln -s "/usr/src/rbp2-headers-`uname -r`" "/lib/modules/`uname -r`/build"

Hope it helps to everyone wants to pair their XBOX one X controllers.


Moderator note: I reformatted the sudo commands since they weren’t being shown correctly.

1 Like