New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XBox one Bluetooth Controller #53
Comments
see here: #14 (comment) |
|
Brilliant. Now to get that surfaced better on a search or "How To" so it's more easily found. Thanks so much for pointing me in the right direction. |
|
Hi everyone, I'm using the xpad driver under linux (Linux Mint 18) - still no joy having the XBox One S controller supported. It connects temporarily, but the controller isn't recognised in steam or jstest. (Yes I've tried If there is anything I can do to help - please let me know. Thanks R |
|
Hi, I'm having this problem on Linux Mint 18, too. I did try |
|
After much trial and error, my Xbox wireless controller is paired and connects to Retropie. Two things made the difference for me: 1) first connecting the controller to a Windows 10 VM vis USB and updating the firmware via the XBox Accessories app, and 2) running the |
|
@DigitalKrony Is your Xbox One S controller fully functional over Bluetooth? I can't get my Select button to be recognized in Input Configuration. Every other button is fine. What's more, if I press the Select button to initiate the configuration, it shows "Keyboard" rather than "Xbox Wireless Controller" on-screen. I know the physical button is okay because I have two controllers and both are fine wired and both exhibit the same Select button problem over Bluetooth. I have also done a fresh Retropie install. I am new to the platform and have run out of ideas of things to try. Any leads or ideas most welcome. Should I submit this as an issue here? |
|
After doing pretty much what @terramare did (upgrading the firmware via a VM and disabling ertm) I also managed to connect my Xbox One S controller via bluetooth. However, the mappings are all messed up with many games. I have found one oddity that might be related to the problem: When using jstest-gtk, the controller is displayed as |
|
Yes, that's because the controller exposes an Android-friendly mapping over Bluetooth since the November firmware update. This is also the reason that some special buttons like back don't work correctly in some applications. They are now HID Consumer usages rather than HID Button usages. This is required to get the desired back and home behavior on Android's default keymap. I believe an SDL2 patch has been checked in to fix the inability to use consumer buttons in controller configurations. |
|
@terramare - I wasn't able to try things out til now. I've been denied permission by the system to run the bash task successfully. Trying to track down the case of that now. So as of right now, I've had not progress. |
|
@DigitalKrony Do you mean when you are trying to run the echo command? Depending on your distro, first type |
|
@terramare - Thanks for that. I got it connect. Solid light on the Controller but no access in RetroPie. When I run jstest-gtk the Controller throws numbers so I know it's connected and is sharing data. However, on restart of the PI, I loosed the capability to connect to the controller. Also, because it's not showing up in RetroPie, it's not building a *.cfg file so I can't set the appropriate button mappings. |
|
Ok, general update. I did fresh RetroPie install. Anyone have any ideas? P.S. when I run the echo bash command from |
|
@DigitalKrony Your echo command is working as it should; this change does not persist a reboot on Retropie. You can add this command to your rc.local file and it will run each time your Pi reboots. Open the file in a text editor:
and then add:
near the bottom of the file, but before the This should get you to the same boat I'm in, which is a non-functional Select button, but otherwise working bluetooth controller. Please confirm if this is the case. Would love to know of a workaround. |
|
@terramare - Got it. I was able to get things up and running. As for the Utilizing
EDIT |
|
I've managed to connect mine up to the point where everything works except the select button, and binding the triggers never seems to work correctly in emulation station. Has anyone managed to get these working? Also the only way I can get the controller to pair is by using the echo command mentioned above, followed by going into bluetoothctl and running the agent on commands, as well as removing and repairing the controller. Is there any way to run these commands on boot? |
|
Hey guys which version of bluez do you use. I have no success with my 5.37 version. connect, pair, trust all combinations of it didn't seem to work. Also using register-profile with the given HID uuid didn't work for me. I also tried with updating the firmware of the gamepad to the newest version, but still not working. I using an ODROID C2 instead of pi2 or pi3. |
|
@DigitalKrony how did you manage to get the select working via Bluetooth? |
|
@mauriliodc I gotta be honest, I didn't do anything special. I was using a Raspberry Pi 2 and a Bluetooth Dongle. But when I moved the SD card with the active OS loaded on it to a Pi 3 and a built-in BT, I got totally different button mappings and the select button no longer worked. |
|
The issue with the keys is more than only the back, homepage, gas, brake codenames issue. When using with usb cable the module used is xpad, and it works as expected, I mean, the buttons and axes the pad have are detected. When using with bluetooth connection xpad is not used, I suppouse that there is a generic bluetooth hid, and the problem is that despite select becames back and mode becames homepage, there are buttons detected that doesn't exists in the pad. This makes A button0, B button 1, X button 3 and Y button 4, and the button 2 doesn't exists in the pad. With evtest and usb you can see: And with bluetooth: So over bluetooth there are 17 buttons where the pad only have 11, BTN_C, BTN_Z, BTN_TL2, BTN_TR2, BTN_SELECT and BTN_MODE shouldn't appear. Also over usb with xpad there are events for force feedback to work, but they aren't over bluetooth. And over bluetooth event msc scan appears. I don't know where to file bug for the bluetooth mapping get corrected. Also using MAME under windows it shows button names, for example, Joy 1 button 0 is shown in linux but in Windows shows something like this Joy 1 Button A. |
|
All- libretro/RetroArch#4692 - MERGED RetroPie/SDL-mirror#4 The last three have not been merged, despite the fact that the code in the pull requests is actually just backported code that has already been accepted into libsdl upstream. I encourage you to comment on these and encourage @joolswills to test/merge them. |
|
The problem about appearing more buttons than the pad have over bluetooth is not related to that patches. |
|
@howl the problem at least in Retropie is that the emulators and their libraries are not expecting to scan for key codes outside of a very specific range, and the Xbox One pad via Bluetooth is sending these keys. So these patches fix that. The main problem folks were reporting there was the lack of a select button, which is one of these other key codes. |
|
I know that issue, moreover there should be also lack of MODE button as it's HOMEPAGE button over bluetooth, also I don't know in retropie, but it's very possible to be also a problem with the button order, as there are buttons detected over bluetooth than doesn't exists in the pad. Also if we are 100% purist, all this issue is not related to xpad, and that's what i'm asking for, where is the code for the mapping of the pad over bluetooth? In BlueZ layer? or evdev input layer? Because there are more issues over bluetooth to address, I repeat not related to xpad, like your patches that also are not related to xpad. |
|
I have found that in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/input/gamepad.rst says the mapping scheme for gamepads over the kernel. There are discrepancies with the xbox one buttons over usb and over bluetooth as north and west buttons are swapped, Y should be north button but it's west, and X should be west but it's north. Also with xbox 360 pads north and west are also swapped. Also If I understand it right DPAD should be buttons instead axis, as hat axis are for pressure buttons and at least the xbox pads I could test are just 0 1 buttons. |
|
Hi there folks, |
|
@BlackVodka I've been facing this problem yesterday. I've found that the Xbox One S controller probably has two modes for Bluetooth. One intended for Android (which causes these problems) and one intended for Windows (which works correctly). My assumption is that these modes are set via some signal from the host (that xpad does not send). I managed to switch the controller into "Windows mode" by connecting it to a Windows machine via Bluetooth. edit: fix typo |
|
@Spiffyk Thanks for your quick response. |
|
@BlackVodka Well I haven't tried it with a Pi, I use Ubuntu on my laptop but I don't think this behaviour would be affected by this. I also assume the vendor of your Bluetooth receiver has nothing to do with this, I'd say this is a software issue (may or may not have to do with xpad directly, I don't know what xpad does and does not deal with exactly). Regarding your question: I think I did unpair the controller from my laptop before trying to connect it to a Windows PC. Basically what I did was unpair the controller from my laptop, paired it with the Windows machine, waited for Windows to identify the device as an Xbox Controller, then unpaired it from the Windows machine and paired it back to the laptop and since then it worked as intended. |
|
@BlackVodka FYI the receiver is actually 802.11 not bluetooth. |
|
Hi guys, I guess this is a known issue? Does anyone have any updated advice for getting the Xbox One Bluetooth Controller to properly work on Ubuntu 16.04 (I'm on kernel 4.15.0-38-generic x86_64)? Does anyone know if it works properly on Ubuntu 18.04 or is it literally a problem that is inherent with Linux? I'd love to get this problem solved, my 360 controller works fine of course. Honestly, I might even be willing to pay a bit of money to someone who can fix this problem if it helps out because this is something I definitely want to see working on Ubuntu 16.04, it's literally the only thing I can think of that doesn't work... I'm new to Bluetooth and I just ordered some Bluetooth headphones, hopefully it is plug-n-play and Bluetooth isn't just inherently broken on Linux... Thanks guys. |
|
Xpad is used for xinput devices. The XBox One S gamepad isn't an XInput device when it's used in Bluetooth mode. In bluetooth mode, the xpad driver isn't even aware of it. Instead, the Bluetooth HID drivers on the system perform the mapping. Those drivers don't reflect Microsoft's button mapping properly, which is what causes the confusing behavior Edit: see #53 (comment) above, particularly the sections Controller is detected as a generic HID device and Incorrect button mapping and Back and Home buttons don't work |
|
Thanks for explaining the issue, and so quickly too. I'm glad it's a common issue and it's not just me, I guess that means it's more likely for this to be fixed. Has anyone found a solution? |
|
Looks like you may need to apply these patches to the kernel source code and then rebuild a custom kernel with the patches. And here's a guide for building kernel from source code |
|
@ipkpjersi You could try the Here's my kernel patch to build it right into the kernel: |
|
Thanks for all the information. Hmm... I'm guessing there's probably a zero percent chance I will ever see this in Ubuntu 16.04 standard kernels, or is it still possible? Does this work in Ubuntu 18.04? |
|
One of these gentlemen might be able to set up an automated daily build recipe on launchpad mirroring the git repos for their custom kernels, and then you'd be able to get the latest build by just adding their PPA to your sources. Something similar to this. As for official, official? Not likely... if you don't see these kernel patches packaged in Ubuntu Bionic then they probably won't be backported to Xenial-backports |
|
@lowlyocean @ipkpjersi I think @atar-axis added DKMS support to his project, including instructions how to use it. I'm using Gentoo which builds from source anyway, so no need for DKMS. But since Ubuntu is Debian-based, it should work. |
|
nice! with DKMS support I think following instructions here will be the way to go. I assume there's no need to blacklist any kernel modules that could conflict with this |
|
@lowlyocean I think with the kernel patch you mentioned the gamepad would generally work but support no rumble. At least back when I started working on it, this was the case with that patch. |
|
@kakra With DKMS, does that mean it will survive kernel upgrades? That means I shouldn't need to keep re-patching it, I just install it once with the install.sh script and then it's done? @lowlyocean Wait, do you mean Ubuntu 18.04 does not have this controller supported officially currently? Will it ever be supported officially? Would that I guess overall what I'm asking is, are there any "downsides" or known limitations to Thanks for all the quick responses guys, I really appreciate it! |
Yes, that's the idea
AFAIK, Ubuntu 18.04 does not have this controller officially supported. I don't know if it will be supported. I suspect that xpadneo would work fine on Ubuntu 18.04 especially since it's a kernel module not a userspace driver
No idea- TBH I haven't used xpadneo myself but it appears to work as expected with Bluetooth (maybe not USB) |
|
@ipkpjersi I'm using Not sure how DKMS works internally but I think it's designed to rebuild modules upon kernel updates. @lowlyocean |
|
@ipkpjersi BTW: You may need to upgrade the firmware version of the controller first using a Windows machine... The different firmware versions mess around with the button mappings. The latest firmware seems to have stabilized wrt the mappings. |
|
I've never heard of the wifi-direct dongle- the controller has bluetooth built-in. I wouldn't spend much energy if I were @atar-axis on getting the dongle to work just for audio purposes. A case of diminishing returns, I think. Spoofing the version/serial identifier is a clever solution to avoiding bespoke workarounds |
|
I actually have an Xbox One X so I used that to update the firmware of my controller, I tried out this DKMS |
|
@ipkpjersi BTW |
|
I can't say I know any games that do support this. Is it possible to turn the rumble off? I find I don't like rumble most of the time. Is there any way to turn it off globally, or is it something that'd have to be done on a per-game basis only? |
|
I prefer rumble as a haptic feedback in many games (like in Tomb Raider when you're nearby some hidden treasure). So, I never felt the urge to disable it globally. Maybe ask in the |
|
Hi folks, I`ve tried many times xpadneo driver and it works properly in Debian and Raspbian. As far as I could investigate about it, it´s because in OSMC they don't recommend install DKMS and even installing it, you got errors when installing headers (in this case rbp2 headers). I´m working disabling ertm on my OS but as you guys mentioned above, home and select buttons are not working at all. Have you guys made work Xbox One S controller on OSMC via bluetooth properly? |
|
I switched back to Raspbian because OSMC wasn't much more than Raspbian with pre-installed Kodi media center and auto-boot to Kodi. OSMC guys also made some radical deviations from Raspbian that kept causing me issues |
|
feel free to open a new issue at xpadneo @chivigoku, I will then give it a try to come up with a solution. |
|
Unfortunately the |
|
@atar-axis sweet, worked out of the box! a ppa for ubuntu would be nice ;) |
|
@amueller Feel free to open a new issue - or even better: a pull request ;) |
|
meanwhile no additional hacks are needed to get the BT controllers working |


This is a question more than an issue,
Is there any information on pairing and connecting the new XBox One Wireless controller released with the
S?While using
bluetoothctlpairthe controllertrustlistconnectto the controller, I get abluezerror.The text was updated successfully, but these errors were encountered: