If you're on the latest kernel of Arch Linux, it is currently recommended by the Discord Server to use xone-dlundqvist-dkms-git instead of xone-dkms or xone-dkms-git
Search Criteria
Package Details: xone-dkms 0.3-4
Package Actions
Git Clone URL: | https://aur.archlinux.org/xone-dkms.git (read-only, click to copy) |
---|---|
Package Base: | xone-dkms |
Description: | Modern Linux driver for Xbox One and Xbox Series X|S controllers |
Upstream URL: | https://github.com/medusalix/xone |
Licenses: | GPL2 |
Conflicts: | xone-dkms, xow |
Provides: | xone-dkms |
Submitter: | mkopec |
Maintainer: | mkopec |
Last Packager: | mkopec |
Votes: | 40 |
Popularity: | 1.21 |
First Submitted: | 2021-07-02 19:25 (UTC) |
Last Updated: | 2024-01-10 14:06 (UTC) |
Dependencies (3)
- dkms (dkms-gitAUR, dkms-fast-zstdAUR)
- xone-dongle-firmwareAUR
- git (git-gitAUR, git-glAUR) (make)
Required by (0)
Sources (2)
ioletsgo commented on 2024-10-19 08:16 (UTC)
JLSalvador commented on 2024-10-19 08:04 (UTC)
53.patch
From 28df566c38e0ee500fd5f74643fc35f21a4ff696 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?=
<16509259+tskaar@users.noreply.github.com>
Date: Tue, 30 Jul 2024 22:35:25 +0200
Subject: [PATCH 1/2] fix: build on kernel v6.11
---
bus/bus.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bus/bus.c b/bus/bus.c
index 4a6c64f..8dc9bbb 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -56,7 +56,11 @@ static struct device_type gip_client_type = {
.release = gip_client_release,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
static int gip_bus_match(struct device *dev, struct device_driver *driver)
+#else
+static int gip_bus_match(struct device *dev, const struct device_driver *driver)
+#endif
{
struct gip_client *client;
struct gip_driver *drv;
From d88ea1e8b430d4b96134e43ca1892ac48334578e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?=
<16509259+tskaar@users.noreply.github.com>
Date: Mon, 30 Sep 2024 21:07:13 +0200
Subject: [PATCH 2/2] fix: build on kernel v6.12
Upstream "Drop of obsoloted vmalloc PCM buffer helper API";
https://lore.kernel.org/all/20240807152725.18948-3-tiwai@suse.de/
Code taken from the driver;
https://lore.kernel.org/all/20240807152725.18948-2-tiwai@suse.de/
---
driver/headset.c | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/driver/headset.c b/driver/headset.c
index ebee92d..c736351 100644
--- a/driver/headset.c
+++ b/driver/headset.c
@@ -5,6 +5,7 @@
#include <linux/module.h>
#include <linux/hrtimer.h>
+#include <linux/vmalloc.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
@@ -90,13 +91,34 @@ static int gip_headset_pcm_close(struct snd_pcm_substream *sub)
static int gip_headset_pcm_hw_params(struct snd_pcm_substream *sub,
struct snd_pcm_hw_params *params)
{
- return snd_pcm_lib_alloc_vmalloc_buffer(sub,
- params_buffer_bytes(params));
+ struct snd_pcm_runtime *runtime = sub->runtime;
+ size_t size = params_buffer_bytes(params);
+
+ if (runtime->dma_area) {
+ if (runtime->dma_bytes >= size)
+ return 0; /* Already large enough */
+ vfree(runtime->dma_area);
+ }
+ runtime->dma_area = vzalloc(size);
+ if (!runtime->dma_area)
+ return -ENOMEM;
+ runtime->dma_bytes = size;
+ return 1;
}
static int gip_headset_pcm_hw_free(struct snd_pcm_substream *sub)
{
- return snd_pcm_lib_free_vmalloc_buffer(sub);
+ struct snd_pcm_runtime *runtime = sub->runtime;
+
+ vfree(runtime->dma_area);
+ runtime->dma_area = NULL;
+ return 0;
+}
+
+static struct page *gip_headset_pcm_get_page(struct snd_pcm_substream *sub,
+ unsigned long offset)
+{
+ return vmalloc_to_page(sub->runtime->dma_area + offset);
}
static int gip_headset_pcm_prepare(struct snd_pcm_substream *sub)
@@ -157,7 +179,7 @@ static const struct snd_pcm_ops gip_headset_pcm_ops = {
.prepare = gip_headset_pcm_prepare,
.trigger = gip_headset_pcm_trigger,
.pointer = gip_headset_pcm_pointer,
- .page = snd_pcm_lib_get_vmalloc_page,
+ .page = gip_headset_pcm_get_page,
};
static bool gip_headset_advance_pointer(struct gip_headset_stream *stream,
PKGFILE
# Maintainer: Michał Kopeć <michal@nozomi.space>
# Contributor: Michał Kopeć <michal@nozomi.space>
_pkgname=xone
pkgname=xone-dkms
pkgver=0.3.r57.29ec357
pkgrel=1
pkgdesc='Modern Linux driver for Xbox One and Xbox Series X|S controllers'
arch=('x86_64' 'aarch64')
url='https://github.com/medusalix/xone'
license=('GPL2')
depends=(
'dkms'
'xone-dongle-firmware'
)
makedepends=('git')
conflicts=(
'xone-dkms'
'xow'
)
provides=('xone-dkms')
source=(
https://github.com/medusalix/xone/archive/29ec3577e52a50f876440c81267f609575c5161e.zip
'53.patch'
)
sha256sums=(
'f022dfc7409f37376de945a42b130ed6c4062be4d039bfe58f3d355b0b290d9a'
'c1de0234948654a39b427dc6397225a788c56eb36cd203496a85a4dd57214602'
)
package() {
cd "${srcdir}/${_pkgname}-29ec3577e52a50f876440c81267f609575c5161e"
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = *.patch ]] || continue
echo "* Applying patch $src..."
patch -Np1 < "../$src"
done
find . -type f \( -name 'dkms.conf' -o -name '*.c' \) -exec sed -i "s/#VERSION#/$pkgver/" {} +
echo "* Copying module into /usr/src..."
install -dm755 "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
cp -r ${srcdir}/${_pkgname}-29ec3577e52a50f876440c81267f609575c5161e/* "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
echo "* Blacklisting xpad module..."
install -D -m 644 install/modprobe.conf "${pkgdir}/usr/lib/modprobe.d/xone-blacklist.conf"
}
JLSalvador commented on 2024-10-19 07:26 (UTC)
Hello @mkopec ,
I tried to send you an email to your profile email, but seems this domain does not exists. So I'm going to publish here my email:
Hello Michał,
Sorry to bother you. Can you add the patch that supports kernel 6.11.x (https://github.com/medusalix/xone/pull/48)? This patch is already tested by somes. There is a 6.12.x already (https://github.com/medusalix/xone/pull/53, I have not tested yet). Thank you.
The xone author is MISS from 1 May. :-(
Regards.
JLSalvador commented on 2024-10-11 08:41 (UTC)
PATCH for Linux 6.11 (tested by me): https://patch-diff.githubusercontent.com/raw/medusalix/xone/pull/48.patch
urbenlegend commented on 2024-10-05 18:32 (UTC)
It seems like this needs a patch for kernel 6.11.
koegounet commented on 2024-07-03 09:16 (UTC)
Same as @xarishark, the dongle can't be activated after install (+reboot). Thanks to him, xone-dkms-git works just fine.
xarishark commented on 2024-05-20 13:40 (UTC)
As of kernel 6.9.1 the dongle does not activate after package install (connected the dongle after installing the package and restarting in case it matters). xone-dkms-git works tho so I use that for now. would like to come back to your recipe when the problem is fixed.
skunkietronic commented on 2024-03-17 15:40 (UTC)
A fix needs to be applied in order to compile using kernel 6.8. Upstream commit https://github.com/medusalix/xone/commit/1b4344ab8d9d7891f843dc993b0c5447f46c9889
mkopec commented on 2024-01-10 14:08 (UTC)
@maxlefou Thanks for reporting, I've decided to just cherrypick the commit that fixes compilation on kernels v6.3+. Also updated the PKGBUILD:
- Download sources over HTTPS and verify sha256sums
- Added aarch64 to list of supported architectures
- Disabled DEBUG flag to make xone print fewer messages to dmesg
maxlefou commented on 2024-01-09 22:17 (UTC)
This specific version stops working past kernel 6.4.x. Using Linux LTS kernels was fixing it... Until LTS passed to 6.4.x. Still no new tag from dev so maybe mark this package as obsolete?
Pinned Comments
mkopec commented on 2024-01-10 14:08 (UTC)
@maxlefou Thanks for reporting, I've decided to just cherrypick the commit that fixes compilation on kernels v6.3+. Also updated the PKGBUILD:
mkopec commented on 2022-06-28 20:34 (UTC) (edited on 2022-06-28 20:34 (UTC) by mkopec)
Notice: The update to v0.3 split the dongle firmware into a separate package
xone-dongle-firmware
. This package conflicts with the previous version of the xone package, causing conflicts during update using certain AUR helpers:The recommended course of action is to first uninstall xone-dkms, and then install the updated version which will pull in
xone-dongle-firmware
as a dependency.Sorry for the breakage everyone, let's hope it doesn't again.