Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

atar-axis/xpadneo

Repository files navigation

ko-fi

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

Build StatusAverage time to resolve an issuePackaging statusDiscord

Advanced Linux Driver for Xbox One Wireless Gamepad

xpadneo Logo

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 astudent project at fortiss GmbH and it is fully functional but does only support the connection via Bluetooth asyet - more will follow.

Many thanks toKai Krakow whosponsored me a Xbox One Wireless Controller 🎮 (including WirelessAdapter) and a pack of mouthwatering guarana cacao ☕

Other Projects

  • xone is a driver aiming for fully supporting all Microsoft GIP devices thusreplacing the xpad driver in the kernel. It supports Xbox One and Xbox Series X|S accessories.
  • xow is an unmaintained driver for the Xbox One S controllers, which has beensuperseded by xone. Kudos to@medusalix for working together on finding somework-arounds for controller firmware bugs.
  • xpad supports this and many other controllers in USB mode.
  • MissionControl aims to support the controller on Nintendo Switch viaBluetooth.

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

Heads Up

Package maintainers: Please seePackaging.

Breaking Changes

Kernel 4.18 or newer required

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

Paddle Button Codes Changed

To stay compatible with SDL and current kernel development, the button codes for the grip paddles of XBE2 controllershave been moved to the official kernel standards as of kernel 6.17. We will also reflect this change for older kernelversions so user-space can rely on a consistent mapping. If you remapped those buttons with third-party software, youwill need to redo those mappings.

SDL2 2.28 Compatibility

Thanks to@slouken from SDL2, xpadneo mappings are now auto-detected in the upcomingSDL2 2.28 release. This will fix long-standing problems with Steam Input and SDL2 games. With this release, we willalso have full paddle support.

If you still see problems, ensure that you didn't create custom controllerdb entries. See also:

Known issues:

  • The Share button will currently not be recognized by SDL2, scheduled to be fixed in xpadneo v0.11
  • If SDL2 uses hidraw, mappings will be wrong, exportSDL_JOYSTICK_HIDAPI=0 in your profile or find which softwareenabled hidraw device access to all drivers

Quirks by Design

With BLE firmware, all models switched to a unified HID report descriptor, only the XBE2 controller identifies withPID 0x0B22 while the other models identify with PID 0x0B13. This has some known consequences:

  • All non-XBE2 controllers will claim to have a Share button no matter if it physically exists. As HID doesn't reportthe internal model number, xpadneo cannot fix it currently. The button is currently mapped to F12, so this has noconsequences.
  • All XBE2 controllers will claim to have a full keyboard and the Share button is actually the Profile button. SinceShare is currently mapped to F12, this will have no consequences.

Advantages of this Driver

  • Supports Bluetooth
  • Supports most force feedback and all rumble effects through Linuxff-memless effect emulation
  • SupportsTrigger Force Feedback in every game by applying apressure-dependent effect intensity to the current rumble effect (not even supported in Windows)
  • Supports adjusting rumble intensity including disabling rumble
  • Offers a consistent mapping, even if the Gamepad was paired to Windows/Xbox before, and independent of softwarelayers (SDL2, Stadia via Chrome Gamepad API, etc)
  • Working paddles (buttons on the backside of the controller)
  • Correct axis range (signed, important for e.g. RPCS3)
  • Supports battery level indication (including the Play 'n Charge Kit)Battery Level Indication
  • Easy installation
  • Exposes the currently selected profile to user-space (Xbox Elite 2 controllers, or emulated)
  • Supports customization through profiles (work in progress)
  • Supports grip paddles (as shipped with the Xbox Elite 2 controller)
  • Optional high-precision mode for Wine/Proton users (disables dead zones so games don't apply an additional one)
  • Share button support on supported controllers

Unavailable Features

Across all models, xpadneo won't support audio features of the controllers because the firmware doesn't support audioin Bluetooth mode. In the future, xpadneo may support audio when USB and dongle support will be added.

Xbox One S Wireless Controller

This is the initial controller supported from the first version of xpadneo. All features are fully supported. Thiscontroller 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:

  • 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 staticallymapped to keyboard eventKEY_F12 to take screenshots with Steam. It will be configurable in the future. Thiscontroller 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 choppyinput 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 Yas labelled on the device. This is swapped compared to the original Xbox controller layout. However, this feature isnot enabled by default. If you want to use this feature, you have to add a quirk flag to the module options:

# /etc/modprobe.d/99-xpadneo-quirks.confoptions hid_xpadneo quirks=E4:17:D8:xx:xx:xx+32

where you replacexx:xx:xx with the values from your controller MAC (as shown indmesg). The value32 enablesNintendo 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. Fullsupport has been added for these controllers and broken mapping of previously versions no longer needs to beapplied. See also:SDL.

GuliKit KingKong Controller Family

This driver supports the GuliKit King Kong controller family, the driver was tested with model NS09 (using firmwarev2.0) and NS39 (aka KK3 MAX, firmware v3.6) but should work just fine for the older models, too. If in doubt, followthe firmware upgrade guides on the GuliKit home page to receive the latest firmware. Both the Android mode and theX-Input mode are supported but it may depend on your Bluetooth stack which mode works better for you (Android modedidn't pair for me).

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

# /etc/modprobe.d/99-xpadneo-quirks.confoptions hid_xpadneo quirks=98:B6:EA:xx:xx:xx+32

where you replacexx:xx:xx with the values from your controller MAC (as shown indmesg). The value32 enablesNintendo layout. If you'll want to add other quirk flags, simply add the values,e.g.32 +131 (default quirks for GuliKit) =163. After changing this, reload the driver or reboot.

However, alternatively the controller supports swapping the buttons on the fly, too: Just press and hold the settingsbutton, the click the plus button. Thus, the quirks flag is just a matter of setting the defaults.

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

GameSir T4 Cyclone Family

This driver supports the GameSir T4 Cyclone controller family, tested by the community. The Pro-models also supporttrigger rumble but since we cannot distinguish both models by the Bluetooth MAC OUI, we simply enable the triggerrumble protocol for both variants. This should not introduce any problems but if it does, and your model does not havetrigger rumble support, you can explicitly tell the driver to not use the trigger rumble motors by adding a quirk flag:

# /etc/modprobe.d/99-xpadneo-quirks.confoptions hid_xpadneo quirks=A0:5A:5D:xx:xx:xx+2

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

GameSir T4 Nova Lite Family

This driver supports the GameSir T4 Nova Lite controller family, tested by the community. These models have a quirk ofonly allowing rumble when all motor-enable bits are set and does not have trigger rumble motors. It looks like thesemodels are available with different MAC OUIs, so your particular controller may not be automatically detected. In thiscase, manually add the quirk flags for your controller:

# /etc/modprobe.d/99-xpadneo-quirks.confoptions hid_xpadneo quirks=3E:42:6C:xx:xx:xx+6

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

This manufacturer uses random MAC addresses, so we cannot rely on known OUIs. Heuristics try to detect this controller.

A Note About GameSir Devices

GameSir devices do not use officially registered MAC OUIs on the Bluetooth radio part, and they come with variousflaky firmware behavior and bugs, while mimicking all other identifiable feature of genuine Microsoft controllersperfectly. This makes such devices hard to detect to work around the bugs in the rumble implementation but we willneed a correct implementation in a future version of xpadneo. This means that xpadneo will probably drop officialsupport for GameSir devices in the future: Base functionality should work out of the box but advanced future rumblefeatures may show erratic behavior. There's nothing we can do about that and you should instead complain at themanufacturer: either properly implement the full rumble protocol, or just stick to officially registered OUIs.

If you've come here because your kernel loggedenabling heuristic GameSir Nova quirks but you don't have a GameSirdevice, try the following module option and report the incident on our issue tracker:

# /etc/modprobe.d/99-xpadneo-quirks.confoptions hid_xpadneo quirks=78:86:2E:xx:xx:xx+512

Profile Switching

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

The currently selected profile is exposed to user-space as an additional axisABS_PROFILE (supported since kernel6.0-rc1) with 4 positions, indicating which profile has currently been selected. For user-space to make full use ofthis knowledge, one would need to remap the paddles to distinctive, unique buttons in each profile. Otherwise you arelimited to the generic gamepad buttons. Thus, the "profile axis" can be used as a shift operator in software thatsupports it.

Native Profile Switching Support

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

  • The default profile (no LED) exposes the paddles as extra buttons.
  • The other three profiles behave the same way by default. While there is no support for modifying them currently,configurations set in theXbox Accessories app (Windows only)will carry over and operate as intended.

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.

Important: Emulated profile switching won't work if you disabled the shift-mode of the Xbox logo button (moduleparameterdisable_shift_mode).

Getting Started

Distribution Packages

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

Packaging status

Notes for Package Maintainers

To properly support module signing and UEFI secure boot,openssl andmokutil are required additionally to theprerequisites below. TheDKMS readme has more instructions.

Prerequisites

Make sure you have installeddkms,linux headers and a bluetooth implementation (e.g.bluez) and theirdependencies.

Kernel maintainers should also include theuhid module (CONFIG_UHID) because otherwise Bluetooth LE devices (allmodels with firmware 5.x or higher) cannot create the HID input device which is handled in user-space by the bluezdaemon.

  • OnArch and Arch-based distributions (likeEndeavourOS), trysudo pacman -S dkms linux-headers bluez bluez-utils
  • OnDebian based systems (like Ubuntu) you can install those packages by runningsudo apt-get install dkms linux-headers-`uname -r`
  • OnFedora, it issudo dnf install dkms make bluez bluez-tools kernel-devel-`uname -r` kernel-headers
  • OnManjaro trysudo pacman -S dkms linux-latest-headers bluez bluez-utils
  • OnopenSUSE (tested on Tumbleweed, should work for Leap), it issudo zypper install dkms make bluez kernel-devel kernel-source
  • OnOSMC you will have to run the following commandssudo apt-get install dkms rbp2-headers-`uname -r`\sudo ln -s "/usr/src/rbp2-headers-`uname -r`" "/lib/modules/`uname -r`/build" (as aworkaround)
  • OnRaspbian, it issudo apt-get install dkms raspberrypi-kernel-headersIf you recently updated your firmware usingrpi-update the above package may not yet include the header files foryour kernel. Please follow the steps describedhere in this case.
  • Ongeneric distributions, it doesn't need DKMS but requires a configured kernel source tree, then:cd hid-xpadneo && make modules && sudo make modules_install
  • Module singing and UEFI secure boot: If installing yourself, you may need to follow the instructions above forpackage maintainers.

Please feel free to add other distributions as well!

Installation

  • Download the Repository to your local machinegit clone https://github.com/atar-axis/xpadneo.git
  • cd xpadneo
  • If using DKMS, runsudo ./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 <MAC>
  • [bluetooth]# trust <MAC>
  • [bluetooth]# connect <MAC> (should usually not be needed but there areopen bugs)
  • The<MAC> parameter is optional if the command line already shows the controller name

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

If it doesn't, please check our documentation inTroubleshooting.

Configuration

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

Update

In order to update xpadneo, do the following

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

Uninstallation

  • If using DKMS: Runsudo ./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 Pagehttps://atar-axis.github.io/xpadneo/ which is generatedautomatically from the content of the/docs folder.

You will find there e.g. the following sections

About

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

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors41


[8]ページ先頭

©2009-2026 Movatter.jp