Package Details: xboxdrv 0.8.8-7

Git Clone URL: (read-only, click to copy)
Package Base: xboxdrv
Description: Userspace gamepad driver for Linux
Upstream URL:
Licenses: GPL3
Submitter: None
Maintainer: anthraxx (nvllsvm)
Last Packager: nvllsvm
Votes: 250
Popularity: 1.64
First Submitted: 2009-11-17 12:07
Last Updated: 2021-11-01 00:46

Pinned Comments

anthraxx commented on 2017-11-07 23:55

use extra-x86_64-build from devtools to build this project

Latest Comments

1 2 3 4 5 6 ... Next › Last »

psypherium commented on 2021-10-11 03:57

After doing some research and installing "pip" the workaround now works to get this compiled. This package should be considered "broken" until the workaround steps are integrated into the package itself. Packages which require manual intervention should be classed as "broken".

parin commented on 2021-09-21 16:20

@lygamac Solution works , Follow the 6 steps menition in his comment Below

antonrud commented on 2021-09-15 18:03

@lygamac thx! Your instructions worked for me.

slack_twot commented on 2021-08-30 01:59

Clean build fails when compiling XBoxdrv with scons errors:

scons: *** [src/xboxdrv_vfs.hpp] AttributeError : 'SConsEnvironment' object has no attribute 'has_key'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/SCons/", line 1279, in execute
    result = self.execfunction(target=target, source=rsources, env=env)
  File "/var/tmp/pamac-build-spongebob/xboxdrv/src/xboxdrv-0.8.8/SConstruct", line 39, in build_bin2h
    if env.has_key("BIN2H_NAMESPACE"):
  File "/usr/lib/python3.9/site-packages/SCons/", line 2384, in __getattr__
    attr = getattr(self.__dict__['__subject'], name)
AttributeError: 'SConsEnvironment' object has no attribute 'has_key'
In file included from /usr/include/boost/bind.hpp:30,
                 from src/controller.cpp:21:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
      | ^~~~~~~~~~~~~~~~~~~~
src/chatpad.cpp: In constructor ‘Chatpad::Chatpad(libusb_device_handle*, uint16_t, bool, bool)’:
src/chatpad.cpp:62:9: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
   62 |   memset(m_keymap, 0, 256);
      |   ~~~~~~^~~~~~~~~~~~~~~~~~
scons: building terminated because of errors.
==> ERROR: A failure occurred in build().

Zimmy commented on 2021-08-20 16:16

i installed everything correctly, got xboxdrv working but my system is still not detecting any input, any clues? It does vibrate (through steam gamepad controll only)

Doubl33n commented on 2021-08-17 16:02

@hardas When I tried running the patch -p1 < pkgbuild.patch command, it complained that the latter patch file is invalid Hunk #2 FAILED at 34. I think the different metadata you get when creating it makes the patch file invalid for makepkg.

But it is not going to be an issue once you run sha512sum fix-99-scons-unsupported-has_key.patch inside the source directory, copy the resulting sha512 sum, and replace 7ba08694be005eae98320957e4be6a84ff77f8b2ea2973dafc300527380074cdb6a3e0692d6c1e285d919cb6f795c494955997782c59a30e9672b65548c86a2f with your new sum.

Once I did this, it worked absolutely fine. So thanks a lot for this, I was eagerly waiting for a fix and just created this account to respond!

hardas commented on 2021-08-16 11:20

The way I installed it was as follows:

Download the file using the helper script of my choice (trizen) trizen -G xboxdrv

Create a new patch file with the necessary changes by running the following:

cat > fix-99-scons-unsupported-has_key.patch <<EOF
--- a/SConstruct        2015-11-09 12:19:35.000000000 +0200
+++ b/SConstruct        2021-08-16 13:47:50.103369128 +0300
@@ -36,7 +36,7 @@
     with open(target[0].get_path(), "w") as fout:
         fout.write("// autogenerated by scons Bin2H builder, do not edit by hand!\n\n")

-        if env.has_key("BIN2H_NAMESPACE"):
+        if "BIN2H_NAMESPACE" in env:
             fout.write("namespace %s {\n\n" % env["BIN2H_NAMESPACE"])

         # write down data
@@ -62,7 +62,7 @@
                                     for src in source], ",\n"))

-        if env.has_key("BIN2H_NAMESPACE"):
+        if "BIN2H_NAMESPACE" in env:
             fout.write("} // namespace %s\n\n" % env["BIN2H_NAMESPACE"])

         fout.write("/* EOF */\n")

Modify the existing PKGBUILD file to apply the new patch

cat > pkgbuild.patch << EOF
--- a/PKGBUILD  2021-08-16 14:10:44.000000000 +0300
+++ b/PKGBUILD  2021-08-16 14:09:15.904713382 +0300
@@ -18,13 +18,15 @@
-        xboxdrvctl-py3.patch)
+        xboxdrvctl-py3.patch
+        fix-99-scons-unsupported-has_key.patch)
-            '4e6de460523c1ddfc608b3bd6fb211a7ca0516b64a2d91e01b51deaa4fcc57d64985bb2ccfca43873efef4987e0d04741f0e97dbd6b77037a4417a97cb8d0bf9')
+            '4e6de460523c1ddfc608b3bd6fb211a7ca0516b64a2d91e01b51deaa4fcc57d64985bb2ccfca43873efef4987e0d04741f0e97dbd6b77037a4417a97cb8d0bf9'
+            '7ba08694be005eae98320957e4be6a84ff77f8b2ea2973dafc300527380074cdb6a3e0692d6c1e285d919cb6f795c494955997782c59a30e9672b65548c86a2f')

 prepare() {
   cd ${pkgname}-${pkgver}
@@ -32,6 +34,7 @@
   patch -p1 < "${srcdir}/fix-60-sec-delay.patch"
   patch -p1 < "${srcdir}/scons-py3.patch"
   patch -p1 < "${srcdir}/xboxdrvctl-py3.patch"
+  patch -p1 < "${srcdir}/fix-99-scons-unsupported-has_key.patch"

 build() {

Apply the modifications patch -p1 < pkgbuild.patch

Build and install the package makepkg -si

(Updated to fix invalid sha512sum and typos)

lygamac commented on 2021-08-11 18:51

SCons has dropped support for has_key. I bypassed this error by adding has_key = __contains__ in the python file. However, a new error appears (a variable wasn't declared).

@Wodger If you want to install the package now, try this, which worked for me:

  1. Clone this repo
  2. Open the PKGBUILD file with your favorite editor
  3. Where makedepends, remove scons
  4. Where build(), change scons to python3 ~/.local/bin/scons
  5. save the file
  6. pip install 'scons==4.1' and makepkg -si

Wodger commented on 2021-08-06 05:59

Fails to build at the moment:

File "/usr/lib/python3.9/site-packages/SCons/", line 2384, in getattr attr = getattr(self.dict['__subject'], name) AttributeError: 'SConsEnvironment' object has no attribute 'has_key' scons: building terminated because of errors. ==> ERROR: A failure occurred in build(). Aborting...

nautes commented on 2021-05-18 01:05

Steps provided by Papyrus works out of the box, however, I made a few changes to them to make them easier for the peeps giving their first steps:

  1. Download the package build. I use yay, so the command would be yay -G xboxdrv (a similar command will exist in your AUR helper). Alternatively, you can also download it from this page (Download snapshot option, then untar it: tar -zxvf /path/to/file/xboxdrv.tar.gz)
  2. Open the PKGBUILD file with your favorite text editor and edit the depends section of the package as mentioned by Papyrus (replace 'python2-dbus' with 'python-dbus')
  3. Execute makepkg -si to install the package while syncing its dependencies

Notice that pip install SCons can be ommited as the package builds perfectly with the version provided in extra (3.1.2-4 at the time this comment was written) and some folks might want to avoid pip if they are giving their first steps / are unsure on how pip packages works.

Also, it seems they forgot (or left behind the version-tagging) as there have been a few fixes in the develop branch since the last version was released, package xboxdrv-develop-git seems to be following that branch, so you may want to check that package should you stumble accross any bugs while using this application (though it will need some fine-tunning on the PKGBUILD as well...)