Skip to content
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

fix: build on kernel v6.12 #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tskaar
Copy link

@tskaar tskaar commented Sep 30, 2024

Fixes the build issues related to:

snd_pcm_lib_alloc_vmalloc_buffer()
snd_pcm_lib_free_vmalloc_buffer()
snd_pcm_lib_get_vmalloc_page()

On kernel v6.12-rc1

The change for the helper can be found at "Drop of obsoloted vmalloc PCM buffer helper API" and the code that I implemented here was taken from the driver here

This also depends on the PR #48 for the v6.11 build fix.

Note: I don't have a headset to verify that the driver is working as expected, I only made the necessary changes to get it to build!

@dlundqvist
Copy link

I'll verify this once 6.12 lands in Debian experimental.

@claybie
Copy link

claybie commented Oct 1, 2024

Working here on linux-tkg 6.12-rc1

@gbluma
Copy link

gbluma commented Oct 3, 2024

Just adding another data point: I can confirm that the 6.11 fix worked for me (linux kernel 6.11.1-zen1-1-zen)

@nul9o9
Copy link

nul9o9 commented Oct 4, 2024

This worked for me as well, on kernel 6.11.1-arch1-1.

@lostiniceland
Copy link

lostiniceland commented Oct 9, 2024

Works on Suse Tumbleweed

@BeiNacht
Copy link

BeiNacht commented Oct 9, 2024

Works in NixOS with 6.11 and 6.12-rc kernels

How is it with the maintenance on this project? @medusalix is there a way to help?

@sh0ra1t
Copy link

sh0ra1t commented Oct 12, 2024

Files replaced in the original xone's folder and working properly on ArchLinux with 6.11.3-arch1-1.

@TarsiSurdi
Copy link

Confirmed working on Fedora 41 beta (kernel 6.11.3). Thank you for opening this PR 👏!

@hajnal-endot
Copy link

Confirmed working on Fedora 40, as well (we just got 6.11.3 a day or so ago).

@wayneyaoo
Copy link

Confirmed working on Debian Testing 6.11.2 (just got it today). Thank you for the PR :)

@tyumici
Copy link

tyumici commented Oct 16, 2024

Files replaced in the original xone's folder and working properly on ArchLinux with 6.11.3-arch1-1.

Confirming this as well

@GarethTheNerd
Copy link

Working on Fedora 41 KDE

@Juts2
Copy link

Juts2 commented Nov 16, 2024

Confirmed working on 6.12

OS: CachyOS Linux x86_64
Host: X870E Taichi Lite
Kernel: Linux 6.12.0-rc7-1-cachyos-autofdo

@prystoynyy
Copy link

Confirmed working on 6.11

OS: Fedora 41 Gnome
Kernel: 6.11.7-300.fc41.x86_64

@Mike710Shine
Copy link

Confirmed working on 6.12.0-2-cachyos

OS: CachyOS
Kernel: 6.12.0-2-cachyos (64-bit)

@bursterburster
Copy link

Confirmed working on Arch, 6.12.1-zen.

@adamdmoss
Copy link

confirmed working on ubuntu, 6.11.0-1009-oem

@jmfergeau
Copy link

I want to install this but i'm getting an error:

Building module(s).....(bad exit status: 2)
Failed command:
make -j6 KERNELRELEASE=6.12.4-1-MANJARO -C /usr/lib/modules/6.12.4-1-MANJARO/build M=/var/lib/dkms/xone/unknown/build

Error! Bad return status for module build on kernel: 6.12.4-1-MANJARO (x86_64)
Consult /var/lib/dkms/xone/unknown/build/make.log for more information.
DKMS make.log for xone/unknown for kernel 6.12.4-1-MANJARO (x86_64)
mar. 17 déc. 2024 11:50:59 CET
make : on entre dans le répertoire « /usr/lib/modules/6.12.4-1-MANJARO/build »
  CC [M]  /var/lib/dkms/xone/unknown/build/transport/wired.o
  CC [M]  /var/lib/dkms/xone/unknown/build/transport/dongle.o
  CC [M]  /var/lib/dkms/xone/unknown/build/transport/mt76.o
  CC [M]  /var/lib/dkms/xone/unknown/build/bus/bus.o
  CC [M]  /var/lib/dkms/xone/unknown/build/bus/protocol.o
  CC [M]  /var/lib/dkms/xone/unknown/build/auth/auth.o
/var/lib/dkms/xone/unknown/build/bus/bus.c:126:18: erreur: initialisation de « int (*)(struct device *, const struct device_driver *) » depuis le type pointeur « int (*)(struct device *, struct device_driver *) » qui est incompatible [-Wincompatible-pointer-types]
  126 |         .match = gip_bus_match,
      |                  ^~~~~~~~~~~~~
/var/lib/dkms/xone/unknown/build/bus/bus.c:126:18: note: (près de l'initialisation de « gip_bus_type.match »)
make[2]: *** [scripts/Makefile.build:229: /var/lib/dkms/xone/unknown/build/bus/bus.o] Error 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [/usr/lib/modules/6.12.4-1-MANJARO/build/Makefile:1936: /var/lib/dkms/xone/unknown/build] Error 2
make: *** [Makefile:224: __sub-make] Error 2
make : on quitte le répertoire « /usr/lib/modules/6.12.4-1-MANJARO/build »

@tskaar
Copy link
Author

tskaar commented Dec 17, 2024

@jmfergeau

I suspect that you haven't merged the patch(es) before building?
You can either check out my branch directly and build from there, or merge my branch on top of main here

@zolotvok
Copy link

I cloned your repository with git clone https://github.com/tskaar/xone but when I tried to install it, got this error message

`Building module(s)....(bad exit status: 2)
Failed command:
make -j16 KERNELRELEASE=6.12.4-200.fc41.x86_64 -C /lib/modules/6.12.4-200.fc41.x86_64/build M=/var/lib/dkms/xone/unknown/build

Error! Bad return status for module build on kernel: 6.12.4-200.fc41.x86_64 (x86_64)
Consult /var/lib/dkms/xone/unknown/build/make.log for more information.
DKMS make.log for xone/unknown for kernel 6.12.4-200.fc41.x86_64 (x86_64)
Tue Dec 17 06:23:36 PM CET 2024
make: Entering directory '/usr/src/kernels/6.12.4-200.fc41.x86_64'
CC [M] /var/lib/dkms/xone/unknown/build/transport/wired.o
CC [M] /var/lib/dkms/xone/unknown/build/transport/dongle.o
CC [M] /var/lib/dkms/xone/unknown/build/transport/mt76.o
CC [M] /var/lib/dkms/xone/unknown/build/bus/bus.o
CC [M] /var/lib/dkms/xone/unknown/build/bus/protocol.o
CC [M] /var/lib/dkms/xone/unknown/build/auth/auth.o
CC [M] /var/lib/dkms/xone/unknown/build/auth/crypto.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/common.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/gamepad.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/headset.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/chatpad.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/madcatz_strat.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/madcatz_glam.o
CC [M] /var/lib/dkms/xone/unknown/build/driver/pdp_jaguar.o
LD [M] /var/lib/dkms/xone/unknown/build/xone-gip-gamepad.o
/var/lib/dkms/xone/unknown/build/bus/bus.c:126:18: error: initialization of ‘int (*)(struct device *, const struct device_driver )’ from incompatible pointer type ‘int ()(struct device *, struct device_driver *)’ [-Wincompatible-pointer-types]
126 | .match = gip_bus_match,
| ^~~~~~~~~~~~~
/var/lib/dkms/xone/unknown/build/bus/bus.c:126:18: note: (near initialization for ‘gip_bus_type.match’)
make[2]: *** [scripts/Makefile.build:229: /var/lib/dkms/xone/unknown/build/bus/bus.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/xone/unknown/build/driver/headset.c: In function ‘gip_headset_pcm_hw_params’:
/var/lib/dkms/xone/unknown/build/driver/headset.c:93:16: error: implicit declaration of function ‘snd_pcm_lib_alloc_vmalloc_buffer’ [-Wimplicit-function-declaration]
93 | return snd_pcm_lib_alloc_vmalloc_buffer(sub,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/xone/unknown/build/driver/headset.c: In function ‘gip_headset_pcm_hw_free’:
/var/lib/dkms/xone/unknown/build/driver/headset.c:99:16: error: implicit declaration of function ‘snd_pcm_lib_free_vmalloc_buffer’; did you mean ‘snd_pcm_lib_malloc_pages’? [-Wimplicit-function-declaration]
99 | return snd_pcm_lib_free_vmalloc_buffer(sub);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| snd_pcm_lib_malloc_pages
/var/lib/dkms/xone/unknown/build/driver/headset.c: At top level:
/var/lib/dkms/xone/unknown/build/driver/headset.c:160:17: error: ‘snd_pcm_lib_get_vmalloc_page’ undeclared here (not in a function); did you mean ‘snd_pcm_lib_malloc_pages’?
160 | .page = snd_pcm_lib_get_vmalloc_page,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| snd_pcm_lib_malloc_pages
make[2]: *** [scripts/Makefile.build:229: /var/lib/dkms/xone/unknown/build/driver/headset.o] Error 1
make[1]: *** [/usr/src/kernels/6.12.4-200.fc41.x86_64/Makefile:1976: /var/lib/dkms/xone/unknown/build] Error 2
make: *** [Makefile:236: __sub-make] Error 2
make: Leaving directory '/usr/src/kernels/6.12.4-200.fc41.x86_64'
`

@tskaar
Copy link
Author

tskaar commented Dec 17, 2024

@zolotvok;

You need to clone the specific branch, and not main: Main is currently tracking the xone repo 1:1, hence it has the same issue, retry with either:

git clone https://github.com/tskaar/xone -b fix-6.12,
Or go into your pulled git repo and run:

git switch fix-6.12

@Kidlike
Copy link

Kidlike commented Dec 20, 2024

Confirming that this fixes the core functionality on Fedora 41 and kernel 6.12.

BUT, there used to be some features on kernel 6.9 that don't work anymore:

  • on system shutdown, xone was sending a poweroff signal to all connected controllers, so they also shutdown
  • controller input used to be recognized as system activity. Now, if the only active input is the controller, the system goes to sleep or screen-off, according on power management settings.

@Juts2
Copy link

Juts2 commented Dec 21, 2024

  • controller input used to be recognized as system activity. Now, if the only active input is the controller, the system goes to sleep or screen-off, according on power management settings.

This is a kde bug they have finally announced they are working on. Been that way for a decade. https://bugs.kde.org/show_bug.cgi?id=328987

Any workarounds were likely using utilities like joystickwake

@Kidlike
Copy link

Kidlike commented Dec 21, 2024

  • controller input used to be recognized as system activity. Now, if the only active input is the controller, the system goes to sleep or screen-off, according on power management settings.

This is a kde bug they have finally announced they are working on. Been that way for a decade. https://bugs.kde.org/show_bug.cgi?id=328987

Any workarounds were likely using utilities like joystickwake

I probably had a workaround that I don't remember then 😅

@jmfergeau
Copy link

@zolotvok;

You need to clone the specific branch, and not main: Main is currently tracking the xone repo 1:1, hence it has the same issue, retry with either:

git clone https://github.com/tskaar/xone -b fix-6.12, Or go into your pulled git repo and run:

git switch fix-6.12

Thanks. Silly of me, i didn't noticed there was a branch for it ^^'

It worked like a charm. Thanks. I don't get why this fix isn't pushed yet...

@PrimerFender
Copy link

Thank you this worked for me also 6.11.11-1-MANJARO

@purkhusid
Copy link

Any chance that this could be merged?

@drick0230
Copy link

drick0230 commented Jan 7, 2025

Seems to work fine on:

Fedora Linux 41 (Workstation Edition)
Linux 6.12.7-200.fc41.x86_64

Also, it seems to fulfill the following pull-requests:

@lmReef
Copy link

lmReef commented Jan 7, 2025

working on 6.12.8-arch1-1

@k0nm4
Copy link

k0nm4 commented Jan 8, 2025

Works like a charm on the 6.12.8-arch1-1, thank you so much mate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.