Xbox one bluetooth linux

Содержание
  1. Геймпады с нативной поддержкой линукса.
  2. Xbox one bluetooth linux
  3. Arch Linux
  4. #1 2016-11-12 17:50:07
  5. Can’t connect to Xbox One S controller via Bluetooth
  6. #2 2016-11-17 22:17:38
  7. Re: Can’t connect to Xbox One S controller via Bluetooth
  8. #3 2016-11-19 16:31:50
  9. Re: Can’t connect to Xbox One S controller via Bluetooth
  10. #4 2016-11-20 23:47:34
  11. Re: Can’t connect to Xbox One S controller via Bluetooth
  12. #5 2016-11-22 11:42:31
  13. Re: Can’t connect to Xbox One S controller via Bluetooth
  14. xpadneo
  15. Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
  16. Advanced Linux Driver for Xbox One Wireless Gamepad
  17. Other Projects
  18. Breaking Changes
  19. Kernel 4.18 or newer required
  20. SDL 2.0.12 Breakage
  21. Advantages of this driver
  22. Xbox One S Wireless controller
  23. Xbox Elite Series 2 Wireless controller
  24. Xbox Series X|S Wireless controller
  25. 8BitDo controllers
  26. Profile switching
  27. Native profile switching support
  28. Emulated profile switching support
  29. Getting started
  30. Distribution packages
  31. Prerequisites
  32. Installation
  33. Connection
  34. Configuration
  35. Update
  36. Uninstallation
  37. Further information
  38. BT Dongles
  39. Bluetooth Low Energy
  40. Cambridge Silicon Radio
  41. Broadcom
  42. Qualcomm
  43. Intel
  44. Configuration
  45. Example
  46. Troubleshooting
  47. Gamepad does not connect properly
  48. Enhanced ReTransmission Mode is enabled
  49. High Latency or Lost Button Events with Bluetooth LE
  50. Incompatible Bluetooth Chipset
  51. Secure Boot
  52. Gamepad is connected but did not rumble
  53. Gamepad has quirks (i.e., wrong rumble behavior)
  54. Gamepad does not connect at all, runs a reconnect loop, or immediately disconnects
  55. Xbox Wireless controller
  56. Gamepad axes are swapped, seemingly unresponsive or strange behavior
  57. Debugging
  58. Environment
  59. Generated Events
  60. HID device descriptor (including checksum)
  61. Bluetooth Connection
  62. Working with Secure Boot
  63. Disabling Secure Boot
  64. Signing xpadneo with your own keys
  65. Third party Bugs
  66. SDL Mapping

Геймпады с нативной поддержкой линукса.

Собственно сабж, есть ли такие? Что бы подключил и пользуйся, без установки и\или компиляции кучи библиотек, с настройкой кучи конфигов?

Джойстики или геймпады? У меня был Logitech Rumble F510 и работал отлично. Купил Dualshock 4 rev.2 и Xbox One Controller rev.3. через USB заработали без проблем, через bluetooth пришлось чуть повозиться но заставил работать нормально.

расскажи как через bluetooth настраивал, если bluez-5.x

расскажи как через bluetooth настраивал, если bluez-5.x

Linux Mint 18.3. Для Xbox One отключал ertm у bluetooth: «echo 1 > /sys/module/bluetooth/parameters/disable_ertm»(я в grub добавил опцию bluetooth.disable_ertm=1) и установил https://github.com/atar-axis/xpadneo так как на третьей ревизии поменяли формат пакетов через bluetooth и часть кнопок не работало.
А Dualshock 4 второй ревизии вообще без проблем заработал через bluetooth, не помню чтоб я что-то для него настраивал.

Добавлено: Вспомнил, для Dualshock 4 я через xinput вырубал управления мышкой тачем, это меня раздражало.

У меня есть какой-то нонейм с двумя аналоговыми стиками и Logitech F710, оба работали из коробки всегда, даже с древними версиями ядер.

Источник

Xbox one bluetooth linux

Hi !
I recently acquired an Xbox One controller to use with Ubuntu 17.04. This controller worked out of the box with a USB cable.

However, it needed some kind of firmware update that only an Xbox One or Windows 10 PC could provide to allow a stable bluetooth connection. I did it, and it finally connected to my Ubuntu desktop.
Unfortunately, Microsoft made some changes to the input protocol used while in wireless mode.

This means two things are needed to properly support the controller : and update to the drivers (already in Ubuntu 17.04) and an update to every game supporting the controller to accommodate both wired and wireless modes.

In many games, that means they need to update from SDL2 2.0 to SDL2 2.1.
For FNA games such as NeuroVoider, I don’t know what’s needed, you might need to investigate.

Currently, the symptoms of NeuroVoider not supporting this controller in bluetooth mode on Linux are:
— a wrong mapping,
— some buttons seem to be permanently pressed by default,
— if you enable «Xbox One controller support» in Steam Big Picture controller options to enable remapping via Big Picture, the game sees the controller twice.

I’m willing to help you fix this (I did some bits of QA on Linux games in my previous job at some smaller competitor to Steam, talked to Ethan Lee/Flibitjibibo about controller issues in FNA already), so feel free to PM me about the issue.
It would also be interesting to get Ethan Lee in the loop, because FNA itself might need fixing.

Thank you for an amazing game !

First thing first, we’re using MonoGame, not FNA, but your post is still very relevant because both are using SDL 2 gamepad support and fixing this problem from one side is surely going to be shared with the other one.

I believe that MonoGame/FNA is missing the Linux device ID of the Xbox One bluetooth controller (which is different from the USB one).

There’s a neat tool that you can use to help us and locally fix the problem: http://www.generalarcade.com/gamepadtool/

Please run this tool with the bluetooth interface, configure the mapping, and share the text that will appear in the bottom text box.

This text is the raw SDL mapping needed to support natively the controller, once we add it to MonoGame, it’ll be working out-of-the-box.

You can also use the «set mapping as environment variable» option to globally fix your controller with all games running on SDL2.

I’m a MonoGame contributor so I’ll be able to push your findings there.
You can also send this text to Ethan, he’ll know what to do with it and will most probably roll out an update to the FNA games he manages.

Thank you for the help!

Unfortunately, the «select» and «home» (Xbox) buttons can’t be mapped by this tool as controller buttons. They send HID actions to the system instead (for example if Firefox is focused and I press the home button, the browser will take me to its home page).

There might be more to this issue, if you look at this, there are a bunch of interesting comments:
https://github.com/paroj/xpad/issues/53

Somehow the Steam client handles this controller properly, no idea how (probably a weird mix of proper SDL 2 bindings and HID handling), and also they added a bunch of workarounds in SteamOS to support it properly :
https://github.com/ValveSoftware/steamos_kernel/commit/549c3dc10fa3749b3999549a2672b14bf0e9786d

What a mess ! XD

Actually, it looks like SDL 2 has already been patched to support this controller, since the embedded controller DB has a full mapping for it already, and even «select» and «home» buttons are enabled:
https://hg.libsdl.org/SDL/file/d4fa79a1b32c/src/joystick/SDL_gamecontrollerdb.h

That explains that for some games (namely Hyper Light Drifter), you just have to delete the outdated libSDL from the game’s folder to enable the controller.


EDIT: My bad, found it. It’s getting late here.

EDIT 2: Deleted both from lib and lib64, but the mapping in game is still wrong. Weird.

We maintain our own controller DB so that we are not bound to a specific SDL 2 version. But well, that’s the theory and from time to time we may miss a mapping.
We’re on the bleeding-edge version of SDL 2, so I believe we’re good.

Thank for the mapping! I’ll push this to our next update.

(Steam does a lot of weird things with SDL. )

EDIT: the mapping will be wrong no matter if you replace the lib or not, because of how MonoGame injects its own mapping DB. I just have to add the line in the DB and rebuild MonoGame.

Also, we have a new MonoGame version ready which removes a lot of dependencies on Linux (all the imaging stuff). The only dependencies will be SDL2 and openal. This should greatly enhance the game compatibilty with some distro.

Источник

Arch Linux

You are not logged in.

#1 2016-11-12 17:50:07

Can’t connect to Xbox One S controller via Bluetooth

I’m experiencing a problem with my Xbox One S controller when I try to connect via Bluetooth. The connection stay switching between ON and OFF, until the controller turns off.

If anyone can help me with a tip, I’d appreciate it.

Log from bluetoothctl

#2 2016-11-17 22:17:38

Re: Can’t connect to Xbox One S controller via Bluetooth

I just got the same controller and my problem is I can’t pair to it, it asks me for a PIN which I don’t know.
And as I have read, it usually doesn’t request any PIN.

Seems like an old bluetooth dongle could be the problem ( I have an old adapter ), I just ordered a 4.0 one.

Post something if you manage to get it working!

#3 2016-11-19 16:31:50

Re: Can’t connect to Xbox One S controller via Bluetooth

I seem to have the same issue.
I’m using a Raspberry Pi 3 and when trying to connect an Xbox One controller I’m able to pair and trust it but as soon as I try to connect it jumps from connected: yes to connected: no. Additionally it says at first the ServicesResolved is yes and then no.

I’ve found the following thread Re: Can’t connect a Xbox one controller where someone has the same issue under Debian.
One comment suggested to disable ertm (echo 1 > /sys/module/bluetooth/parameters/disable_ertm) which helped the person in that thread but for me it did not.

If I can find anything else I’ll let you know.

#4 2016-11-20 23:47:34

Re: Can’t connect to Xbox One S controller via Bluetooth

I have a Steam Link and works fine in it, considering that the SO is based at Linux 3.8 kernel (https://github.com/ValveSoftware/steamlink-sdk).

#5 2016-11-22 11:42:31

Re: Can’t connect to Xbox One S controller via Bluetooth

Hey guys!
I just got my new BT adapter, it’s this one:

I tried to pair it some times but didn’t go well, at least this time I didn’t need to put any PIN.
After trying to disable ertm as @sanakan commented it all went smooooth and it finally paired!

I can see events on sdl2-jstest and on jstest-gtk, the bad part is that the xbox button and the ‘select’ one aren’t recognized, I push them and nothing happens. Using Steam if I press the xbox button it doesn’t go to Big Picture mode.

Читайте также:  Alfa adapter для кали линукс

Apart from that, a funny thing is that xboxdrv doesn’t recognized the game pad when connected with usb, so I keep using xpad when wired.

BTW, sometimes it seems that gets some time to pair it succesfully, using GNOME Bluetooth I had to remove device, turn off bluetooth, and try to pair again.

If I can help you in anything, or comment on any package version, or whatever, just tell me anything.

EDIT: Just trying things. when paired in bluetooth, and then connected to USB, it loses the BT connectiong. So for getting paired it again I had to unplug the USB, turn off bluetooth on my PC, turn it on (in the meantime I was pushing the pair button on the controller and kept pairing for some time until I hit it again during 3 seconds) and then it paired again.
Now the gamepad layout is different, the select button works, but the axis are similar when using it wired with xpad.

EDIT2: oh, and the other day I updated the controller’s firmware on Win10.

Last edited by Mixu (2016-11-22 11:55:03)

Источник

xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)

If you want to support me or accelerate the development of a special feature, consider a small donation :heart: Just leave a message if your donation is for a specific use (like a new hardware or a specific function).

Advanced Linux Driver for Xbox One Wireless Gamepad

Quote from @atar-axis (Florian Dollinger), creator of the initial driver:

This is the first driver for the Xbox One Wireless Gamepad (which is shipped with the Xbox One S). I wrote it for a student project at fortiss GmbH and it is fully functional but does only support the connection via Bluetooth as yet — more will follow.

Many thanks to Kai Krakow who sponsored me a Xbox One Wireless Controller :video_game: (including Wireless Adapter) and a pack of mouthwatering guarana cacao :coffee:

Other Projects

  • xow is a driver for the Xbox One S controllers, too, and supports the native dongles packaged with the controller. Kudos to @medusalix for working together on finding some work-arounds for controller firmware bugs.
  • xpad supports this and many other controllers in USB mode.
  • xone is a driver aiming for fully supporting all Microsoft GIP devices thus replacing the xpad driver in the kernel while adding support for additional types of hardware but it’s currently still lacking support for dongle, only wired devices are supported by now. It will replace xow at some time in the future and is a kernel driver instead of running in user space.
  • MissionControl aims to support the controller on Nintendo Switch via Bluetooth.

These other projects may not support some of the advanced features of xpadneo.

Breaking Changes

Kernel 4.18 or newer required

As of xpadneo v0.10, we require kernel 4.18 or later to utilize HID_QUIRK_INPUT_PER_APP which splits the gamepad into multiple sub-devices to fix problems and incompatibilities at several layers.

SDL 2.0.12 Breakage

As of SDL 2.0.12, SDL introduced a new HIDAPI which can read HID devices in raw mode, bypassing the drivers. Due to the way SDL works, and because xpadneo exposes hidraw devices as user-readable, SDL may see wrong button mappings because it may make wrong assumptions about the protocol mode of Xbox and compatible controllers. If you see wrong button mappings / missing buttons in SDL applications, or rumble does not work, you may need to turn off this behavior by setting an environment variable in your profile: SDL_JOYSTICK_HIDAPI=0

  • Wrong mappings when using newer SDL2 versions, should be fixed by latest xpadneo
  • Rumble doesn’t work at all, needs to be fixed by SDL2

Advantages of this driver

  • Supports Bluetooth
  • Supports all Force Feedback/Rumble effects through Linux ff-memless effect emulation
  • Supports Trigger Force Feedback in every game by applying a pressure-dependent effect intensity to the current rumble effect (not even supported in Windows)
  • Supports disabling FF
  • Supports multiple Gamepads at the same time (not even supported in Windows)
  • Offers a consistent mapping, even if the Gamepad was paired to Windows/Xbox before, and independent of software layers (SDL2, Stadia via Chrome Gamepad API, etc)
  • Working Select, Start, Mode buttons
  • Correct Axis Range (signed, important for e.g. RPCS3)
  • Supports Battery Level Indication (including the Play ‘n Charge Kit)
  • Easy Installation
  • Agile Support and Development
  • Supports customization through profiles (work in progress)
  • Optional high-precision mode for Wine/Proton users
  • Share button support on supported controllers
  • Works as a mouse if you’re are in couch-mode (press Guide + Select )

Xbox One S Wireless controller

This is the initial controller supported from the first version of xpadneo. All features are fully supported. This controller uses emulated profile switching support (see below).

Xbox Elite Series 2 Wireless controller

Basic support for the Xbox Elite Series 2 Wireless controller is present, covering all the features of the driver. The following features are missing:

  • The four paddles at the bottom are currently not supported.
  • Upload of profile mappings and sensitivity curves is currently not supported.

This controller uses native profile switching support (see below).

Xbox Series X|S Wireless controller

Full support for the Xbox Series X|S controller is present including the share button. This is currently mapped to keyboard event KEY_RECORD and may not work at all for any purpose. Thus, this implementation details may change during one of the next updates. This controller uses emulated profile switching support (see below).

This controller uses BLE (Bluetooth low energy) and can only be supported if your Bluetooth dongle also supports BLE.

Known problems: The controller may not properly set its connection parameters, resulting in laggy and choppy input experience. See also: Troubleshooting.

8BitDo controllers

This driver supports the Nintendo layout of those controllers to exposes them correctly as button A, B, X, and Y as labelled on the device. This is swapped compared to the original Xbox controller layout. However, this feature is not enabled by default. If you want to use this feature, you have to add a quirk flag to the module options:

where you replace xx:xx:xx with the values from your controller MAC (as shown in dmesg ). The value 32 enables Nintendo layout. If you’ll want to add other quirk flags, simply add the values, e.g. 32 + 7 (default quirks for 8BitDo) = 39 . After changing this, reload the driver or reboot.

This controller uses emulated profile switching support (see below).

Breaking change: Users of previous versions of the driver may want to remove their custom SDL mappings. Full support has been added for these controllers and broken mapping of previously versions no longer needs to be applied. See also: SDL.

Profile switching

The driver supports switching between different profiles, either through emulation or by using the hardware switch that comes with some models. This switching can be done at any time even while in a game. The API for customizing each profile does not exist yet.

Native profile switching support

The driver support native profile switching for the Xbox Elite Series 2 controller. However, the feature is not finalized yet:

  • All four profiles behave the same way currently, and there is no support for configuring them. This may be different if profiles have been configured in Windows already, that is still untested.

Emulated profile switching support

The driver emulates profile switching for controllers without a hardware profile switch by pressing buttons A, B, X, or Y while holding down the Xbox logo button. However, the following caveats apply:

  • Profiles currently behave all the same, and there is no support for configuring them.
  • Full support will be available once the Xbox Elite Series 2 controller is fully supported.
  • If you hold the button for too long, the controller will turn off — we cannot prevent that.

Getting started

Distribution packages

If your distribution has a maintained package, you can just use that and do not need to follow the manual install instructions below:

Prerequisites

Make sure you have installed dkms, linux headers and a bluetooth implementation (e.g. bluez) and their dependencies.

  • On Arch and Arch-based distros (like Antergos), try sudo pacman -S dkms linux-headers bluez bluez-utils
  • On Debian based systems (like Ubuntu) you can install those packages by running sudo apt-get install dkms linux-headers-`uname -r`
  • On Fedora, it is sudo dnf install dkms make bluez bluez-tools kernel-devel-`uname -r` kernel-headers-`uname -r`
  • On Manjaro try sudo pacman -S dkms linux-latest-headers bluez bluez-utils
  • 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» (as a workaround)
  • On Raspbian, it is sudo apt-get install dkms raspberrypi-kernel-headers If you recently updated your firmware using rpi-update the above package may not yet include the header files for your kernel. Please follow the steps described here in this case.
  • On generic distributions, it doesn’t need DKMS but requires a configured kernel source tree, then: cd hid-xpadneo && make modules && sudo make modules_install

Please feel free to add other Distributions as well!

Installation

  • Download the Repository to your local machine git clone https://github.com/atar-axis/xpadneo.git
  • cd xpadneo
  • If using DKMS, run sudo ./install.sh
  • If not using DKMS, follow steps above (generic distribution)
  • Done!

Connection

  • sudo bluetoothctl
  • [bluetooth]# scan on
  • wait until all available devices are listed (otherwise it may be hard to identify which one is the gamepad)
  • push the connect button on upper side of the gamepad, and hold it down until the light starts flashing fast
  • wait for the gamepad to show up in bluetoothctl, remember the address (e.g. `C8:3F:26:XX:XX:XX`)
  • [bluetooth]# scan off to stop scanning as it may interfere with properly pairing the controller
  • [bluetooth]# pair
  • [bluetooth]# trust
  • [bluetooth]# connect (should usually not be needed but there are open bugs)
  • The parameter is optional if the command line already shows the controller name
Читайте также:  Как убрать баннер с рабочего стола windows

You know that everything works fine when you feel the gamepad rumble 😉

Configuration

  • If using DKMS: Use sudo ./configure.sh to configure the driver as you wish. The script will guide you through the available options.

Update

In order to update xpadneo, do the following

  • Update your cloned repo: git pull
  • If using DKMS: Run sudo ./update.sh
  • otherwise follow the steps above (generic distribution)

Uninstallation

  • If using DKMS: Run sudo ./uninstall.sh to remove all installed versions of hid-xpadneo
  • otherwise follow the steps above (generic distribution)

Further information

For further information please visit the GitHub Page https://atar-axis.github.io/xpadneo/ which is generated automatically from the content of the /docs folder.

You will find there e.g. the following sections

BT Dongles

Please report your Dongles and how they work here

Bluetooth Low Energy

Some newer controller may work in Bluetooth low energy mode (BLE). One of those controllers is the XBOX Series X|S controller.

If your distribution supports the command, run btmgmt info and look for le in supported and current settings, example:

Cambridge Silicon Radio

  • Panda Bluetooth 4.0 USB Nano Adapter
    • Chipset: CSR .
    • ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    • Performance:
      • Re-Connection Problems
      • Reliable once connected
    • Reported by @ugly95 here
  • MIATONE Bluetooth Adapter Bluetooth CSR 4.0
    • Chipset: CSR 8510
    • ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    • Performance:
      • Re-Connection Problems
      • Reliable once connected
    • Reported by @ugly95 here
  • CSL — Bluetooth 4.0 USB Adapter
    • Chipset: CSR 8510 A10
    • ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    • Performance:
      • Re-Connection Problems
      • Initial Connection Problems
    • Reported by @germangoergs here and here
  • Sabrent USB Bluetooth 4.0 Micro Adapter for PC
    • Chipset CSR .
    • ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    • Performance:
      • Re-Connection Problems
      • Reliable once connected
    • Reported by @ugly95 here
  • Yizhet USB nano Bluetooth 4.0 Adapter
    • Chipset CSR 8510 A10
    • ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
    • Performance:
      • Re-Connection Problems
      • Reliable once connected
    • Reported by @NoXPhasma here

Broadcom

  • Plugable USB Bluetooth 4.0 Low Energy Micro Adapter
    • Chipset: BCM20702A0
    • ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
    • Performance:
      • Connection flawless
      • Sometimes laggy while Gameplay
    • Reported by @ugly95 here and here
  • Targus BT 4.0 USB adapter
    • Chipset: BCM20702A0
    • ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
    • Performance:
      • Connection flawless
      • Sometimes laggy while Gameplay
    • Reported by Zowayix here

Qualcomm

  • Unspecified model (https://github.com/atar-axis/xpadneo/issues/180):
    • btmon logs showed very low input report rate and high input lag (300ms+)

Intel

  • Status: incompatible (https://github.com/atar-axis/xpadneo/issues/270)
    • OUI: DC:1B:A1 (Intel)
    • Used as on-board chipset: Gigabyte B450 Aorus Pro WiFi 1.0 with integrated Bluetooth
  • Status: bluetoothd logs “Request attribute has encountered an unlikely error”
    • Chipset: AX200
    • Used as on-board chipset: ASUS B550-i

Configuration

Alternatively to using the config-script, you can also do it by hand:

The driver can be reconfigured at runtime by accessing the following sysfs files in /sys/module/hid_xpadneo/parameters :

  • disable_deadzones (default 0 )
    • 0 enables standard behavior to be compatible with joydev expectations
    • 1 enables raw passthrough of axis values without dead zones for high-precision use with modern Wine/Proton games
  • trigger_rumble_mode (default 0 )
    • 0 rumbles triggers by pressure and current rumble effect
    • 1 rumbles triggers by force direction (non-conformant)
    • 2 disables trigger rumble
  • rumble_attenuation (default 0,0 )
    • Attenuation the strength of the force feedback
    • 0 (none, full rumble) to 100 (max, no rumble)
    • If one or two values are given, the first value is the overall attenuation
    • If two values are given, the second value applies an extra attenuation to the triggers
    • Example 1: 0,100 turns trigger rumble off, 100,0 or 100 turn all rumble off
    • Example 2: 50,50 makes 50% rumble overall, and 25% for the triggers (50% of 50% = 25%)
    • Example 3: 50 makes 50% rumble overall (main and triggers)
    • Trigger-only rumble is not possible
  • quirks (default empty)
    • Let’s you adjust the quirk mode of your controller
    • Comma separated list of address:flags pairs (use +flags or -flags to change flags instead)
    • Specify your controller MAC address in the format 11:22:33:44:55:66
    • Specify the flags as sum of the following:
      • 1 if your controller does not support pulse parameters (i.e., 8BitDo controllers)
      • 2 if your controller does not support trigger rumble (most clones in compat-mode)
      • 4 if your controller does not support individual motor programming (i.e., 8BitDo controllers)
      • 8 if your controller supports hardware profiles (auto-detected, do not set manually)
      • 16 if your controller boots in Linux mode (auto-detected, do not change manually)
      • 32 if you prefer to use Nintendo button mappings (i.e., 8BitDo controllers, defaults to off)
      • 64 if your controller has a awkwardly mapped Share button (auto-detected, do not set manually)

Some settings may need to be changed at loading time of the module, take a look at the following example to see how that works:

Example

To disable trigger rumbling temporarily, run echo 2 | sudo tee /sys/module/hid_xpadneo/parameters/trigger_rumble_mode

To make the setting permanent and applied at loading time, try echo «options hid_xpadneo trigger_rumble_mode=2» | sudo tee /etc/modprobe.d/99-xpadneo-bluetooth.conf

Troubleshooting

Gamepad does not connect properly

Enhanced ReTransmission Mode is enabled

Obsolete: This section is scheduled for removal. Future kernels will include the proper fix for this.

Also, there seems to be a bug in the L2CAP handling of the kernel and you may need to force-disable this setting:

If it says N , write Y to the file and try again. You may need to remove your partially paired controller from your Bluetooth settings completely before pairing again.

High Latency or Lost Button Events with Bluetooth LE

Affected models: Xbox controllers using Bluetooth LE (Xbox Series X|S or later)

While using new Xbox Series X|S controller, you may experience laggy or choppy input, also button presses may be lost or delayed. This problem only affects Bluetooth LE controllers, the older models are not affected by these settings even if you think you may see such a problem.

A proper solution is still missing but we isolated it to the Bluetooth LE connection parameters for latency and intervals. The bluez developers say that the connected device should suggest the best settings, the bluez daemon only ships sensible default settings. It looks like the new Xbox controllers do not properly suggest their preferred connection parameters, some BLE mice show the same problem. You can work around it by changing the bluez defaults instead. This change is not recommended by the bluez developers but as long as you only use a very specific set of BLE devices, this change should be fine.

The controller uses 100 Hz internally for its protocol, so we decided to use intervals of 8.75..11.25ms. Each tick is 1.25ms, so we end up with MinConnectionInterval=7 and MaxConnectionInterval=9 . If you already use a similar work-around for other devices, you may need to adjust your settings to the proper bounds, i.e. do not increase the min value, do not lower the max value.

Edit the following file and restart the Bluetooth service or reboot:

  • https://www.novelbits.io/ble-connection-intervals/
  • https://github.com/bluez/bluez/issues/156
  • https://wiki.archlinux.org/title/Bluetooth_mouse#Mouse_lag

Incompatible Bluetooth Chipset

Some chipsets, e.g. the CSR 85xx, do have problems when you try to reconnect the Gamepad.

Some chipsets may need additional driver firmware to work correctly. Try installing linux-firmware from your distribution.

Secure Boot

Secure Boot may be enabled on your computer. On most Linux distribution, running mokutil —sb-state will tell you if it is the case. When Secure Boot is enabled, unsigned kernel module cannot be loaded. Two options are available:

  1. Disable Secure Boot.
  2. Sign the module yourself.

Instructions for both of these options are available here. Secure Boot is not enabled and pairing still fails? See Debugging.

Gamepad is connected but did not rumble

If the gamepad does connect but it doesn’t rumble, then mosty probably the wrong driver is loaded, or the gamepad is quirky and doesn’t fully support the protocol.

Check the output of the dmesg command to see whether xpadneo was loaded and logged your gamepad.

Gamepad has quirks (i.e., wrong rumble behavior)

You may want to try serveral combinations of quirk flags added to the module paramters. See Configuration and modinfo hid-xpadneo for more information. You may also want to use the hidraw testing utility which bypasses the driver and let’s you try different combination of parameters. The utility is located at misc/examples/c_hidraw .

Gamepad does not connect at all, runs a reconnect loop, or immediately disconnects

Check whether ERTM was disabled (see above). Also, some newer models use a different Bluetooth protocol “Bluetooth low energe” (BLE) which you may accidentally have disabled. Check the following settings in /etc/bluetooth/main.conf :

Xbox Wireless controller

The newest wireless controllers from Microsoft (Xbox One and Xbox Series X|S) are known to cause a reconnect loop and not pairing with Bluez. There are some specific workarounds:

  • Plug your controller to a Windows 10 computer via a USB cord. Download the Xbox Accessories application. When launching the app, it should ask you to update the firmware of the controller. When it’s done, your controller should work just fine with any Linux system.
  • If it didn’t work, you can try these two workarounds:
    • Use a Windows 10 computer on the same Bluetooth adapter to pair with the controller. It must absolutly be on the same Bluetooth adapter, i.e. the same computer (can be inside a virtual machine with Bluetooth passthrough) if it’s an internal Bluetooth adapter, or the same Bluetooth dongle. Then, you can get the pairing keys and install them within your Linux Bluetooth system.
    • Update to a newer kernel. Kernel 5.13 and higher might have patched a fix.
    • Use a different Bluetooth stack. Xbox controllers work fine with Fluoride (the bluetooth stack from Android). Sadly, it’s hard to install on another Linux, and Bluez is the only stack easily provided on most Linux distributions.
  • If none of these options worked, or you can’t try them, then the only solution is to plug the controller using a USB cord. As for now, it won’t load the xpadneo driver, but the default controller driver. USB support may be added soon to xpadneo.
Читайте также:  Windows virtual pc не удалось завершить установку

Gamepad axes are swapped, seemingly unresponsive or strange behavior

If you observe this problem with jstest , systemsettings joystick (KDE) or jstest-gtk , there’s usually nothing to do as these test programs use the old joydev API while most (modern) games use the evdev API. Some emulators, tho, use the joydev API and do not respect the axes naming from evdev . In this case, please run the following command to correct the axes mapping for the js interface:

Explanation: -u set the mapping for 8 axes to axes code 0,1,3,4. and for 10 buttons to button codes 304,305,307,308. . This only remaps the joydev API, not the evdev API. Making this change may have unexpected consequences for applications using both APIs.

IMPORTANT: Now test all your axes to collect calibration data. You can then use the following command to store the settings permanently:

If the gamepad does not restore the mapping after disconnecting and reconnecting it, i.e., your distribution doesn’t ship a proper udev rule for that, you may want to add the this udev rule, then reboot (see also /misc/examples/udev-rules/99-xpadneo-joydev.rules ):

From now on, connecting the gamepad should restore the values from /var/lib/joystick/joystick.state. If you messed up, simply remove your gamepad from the file and start over.

Please check, if jscal-restore is really in /usr/bin , otherwise use the correct path, found by running:

IMPORTANT NOTE: The Chrome gamepad API (used for Stadia and other browser games) is a hybrid user of both the joydev and the evdev API bit it uses a hard-coded axes mapping for each controller model. Thus, when you run the above commands, the API will be confused and now shows the problem you initially tried to fix. To use the Chrome gamepad API, you’d need to revert that settings. There is currently no known work-around.

Debugging

If you are asked to send debug info or want to fix bugs, follow the guide displayed when opening a new bug report. This has all the hints to get you started with debugging. You may also want to increase the kernel debug level if your distribution sets it very low. Otherwise, the driver reports most incidents, quirks, and fixes to dmesg .

Environment

Useful information can now be aquired with the commands:

  • dmesg : I advise you to run dmesg -wdH in a terminal while you connect your controller from a second terminal to get hardware information in realtime.
  • modinfo hid_xpadneo : get information on xpadneo as a kernel module.
  • When your gamepad is connected, get the HID report descriptor:

Generated Events

If you are asked to supply the events generated by xpadneo, please run the following command:

Do whatever you think does not behave correctly (e.g. move the sticks from left to right if you think the range is wrong) and upload the output.

HID device descriptor (including checksum)

If we ask you to supply the device descriptor, please post the output of the following command:

Bluetooth Connection

Some debugging needs a deeper low level look. You can do this by running btmon :

Then reproduce the problem you are observing.

We probably also need some information about the dongle:

  • Run lsusb and pick the device number of your dongle.
  • Run lsusb -v -s## | tee xpadneo-lsusb.txt where ## is the device number picked in the previous step.

Working with Secure Boot

Secure Boot is a verification mechanism used when your computer loads your operating system. The boot process of a Linux distribution usually goes like this: UEFI -> UEFI Shim loader -> your distribution. Now back to our two options: disabling Secure Boot or signing xpadneo with your own key.

Disabling Secure Boot

In order for Secure Boot to be active, it must be enabled both at the UEFI level and at the shim level. Which means you should be able to disable Secure Boot:

  • either in your firmware options. You can usually access them by pressing F1, F2 or F12 justa after turning on the computer.
  • or in the shim. Run sudo mokutil —disable-validation , and choose a password. Reboot your computer. You will be asked if you really want to disable Secure Boot. Press Yes and enter the password. You can now safely forget the password.

After choosing either of these two options, Secure Boot should be disabled. You may therefore try to connect your Xbox One gamepad.

Signing xpadneo with your own keys

If you do not wish to disable Secure Boot, you will need to get the Shim to trust xpadneo. The process goes this way:

  • generate a cryptographic key pair: a private key and a public key
  • sign the module with your private key
  • get the shim to trust your public key

Xpadneo will need to be re-signed every time it is updated, and every time the kernel is updated. To simplify this process, we provide scripts which will help you generate your keys and automatically sign xpadneo when needed.

if in the future you wish to remove your public key from the shim, run

Reboot, and follow the procedure.

using theses scripts, your private key will be kept unencrypted in the /root directory. This may pose a security risk. If you wish to password protect your private keys, use these scripts, written by dop3j0e. Be warned that you will be asked for your password every time the kernel gets an update.

Third party Bugs

While developing this driver we recognized some bugs in KDE and linux itself, some of which are fixed now — others are not:

  • Broken Battery Indicator in KDE fixed! https://www.kde.org/announcements/kde-frameworks-5.45.0.php
  • Cambridge Silicon Radio (CSR) chipsets do have problems while reconnecting (OUI 00:1A:7D)
    • Most of these problems may be fixed in kernel 5.10
  • Qualcomm chipsets may have performance and lag problems (OUI 9C:B6:D0)
  • Some Bluetooth dongles may need additional firmware for proper operation
    • Possible solution: try installing linux-firmware from your distribution

SDL Mapping

We fixed the following problem by pretending we are in Windows wireless mode by faking the input device PID to 0x02E0 . The original PID 0x02FD triggeres several unwanted fixups at multiple layers, i.e. SDL or the HTML5 game controller API. The following paragraphs document the originally wrong behaviour observed and we clearly don’t want our fixed mappings to be “fixed” again by layers detected a seemingly wrong button mapping:

Since after libSDL2 2.0.8, SDL contains a fix for the wrong mapping introduced by the generic hid driver. Thus, you may experience wrong button mappings again.

Also, Wine since version 3.3 supports using SDL for xinput*.dll , and with version 3.4 it includes a patch to detect the Xbox One S controller. Games running in Wine and using xinput may thus also see wrong mappings.

The Steam client includes a correction for SDL based games since some version, not depending on the SDL version. It provides a custom SDL mapping the same way we are describing here.

To fix this and have both SDL-based software and software using the legacy joystick interface using correct button mapping, you need to export an environment variable which then overrides default behavior:

You need to set this before starting the software. To apply it globally, put this line into your logon scripts.

The id 050000005e040000fd02000003090000 is crafted from your device id as four 32-bit words. It is, in LSB order, the bus number 5, the vendor id 045e , the device id 02fd , and the interface version or serial 0903 which is not a running number but firmware dependent. This version number is not the same as shown in dmesg as the fourth component.

You can find the values by looking at dmesg when xpadneo detects your device. In dmesg, find the device path, then change to the device path below /sys and look for the files in the id directory.

The name value after the id is purely cosmetical, you can name it whatever you like. It may show up in games as a visual identifier.

If running Wine games, to properly support xpadneo, ensure you have removed any previous xinput hacks (which includes redirecting xinput*.dll to native and placing a hacked xinput dll in the game directory. Also ensure your Wine built comes with SDL support compiled in.

If you do not want to apply this setting globally, you can instead put the SDL mapping inside Steam config.vdf . You can find this file in $STEAM_BASE/config/config.vdf . Find the line containing «SDL_GamepadBind» and adjust or add your own controller (see above). Ensure correct quoting, and Steam is not running while editing the file. This may not work for Steam in Wine because the Wine SDL layer comes first, you still need to export the variable before running Wine. An example with multiple controllers looks like this:

An alternative store location of user-defined mappings can be found here:

Источник

Оцените статью