#1142601 openrazer-driver-dkms: kernel 6.12.96+deb13-amd64 the DKMS compilation step fails

Package:
openrazer-driver-dkms
Source:
openrazer-driver-dkms
Submitter:
openrazer-driver-dkms
Date:
2026-08-02 21:49:02 UTC
Severity:
normal
Tags:
#1142601#5
Date:
2026-07-22 15:27:58 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#1142601#10
Date:
2026-07-22 16:32:21 UTC
From:
To:
Building module(s)...(bad exit status: 2)
Failed command:
make -j12 KERNELRELEASE=6.12.96+deb13-amd64 driver KERNELDIR=/lib/modules/6.12.9
6+deb13-amd64/build

Error! Bad return status for module build on kernel: 6.12.96+deb13-amd64 (x86_64
)
Consult /var/lib/dkms/openrazer-driver/3.10.2/build/make.log for more informatio
n.
Builds for the following kernel(s) failed: 6.12.95+deb13-amd64 6.12.96+deb13-amd
64
dpkg: error processing package openrazer-driver-dkms (--configure):
installed openrazer-driver-dkms package post-installation script subprocess ret
urned error exit status 10
Errors were encountered while processing:
openrazer-driver-dkmsError: Sub-process /usr/bin/dpkg returned an error code (1)

#1142601#15
Date:
2026-07-22 19:41:54 UTC
From:
To:
Hi,

openrazer-driver-dkms 3.10.2 fails to build against Debian's
6.12.96+deb13-amd64 kernel (and later 6.12.9x point releases). The
build fails in razerkbd_driver.c with:

razerkbd_driver.c: In function 'razer_raw_event_bitfield':
razerkbd_driver.c:3729:29: error: too few arguments to function
'hid_report_raw_event'
3729 | hid_report_raw_event(hdev, HID_INPUT_REPORT, xdata, sizeof(xdata), 0);
| ^~~~~~~~~~~~~~~~~~~~

Cause:

Debian's 6.12.96+deb13 kernel headers ship a backported change to
hid_report_raw_event() that splits the old single 'size' parameter
into two: 'bufsize' and 'size'. The current declaration in
/usr/include (and in the kernel headers package) is:

int hid_report_raw_event(struct hid_device *hid,
enum hid_report_type type, u8 *data,
size_t bufsize, u32 size, int interrupt);

razerkbd_driver.c still calls it with the old 5-argument form, so the
build fails on any kernel carrying this backport, even though the
kernel version itself (6.12.x) isn't the upstream version where this
change nominally landed.

Note this also affects systems with multiple kernels installed side
by side (e.g. 6.12.90+deb13 alongside 6.12.96+deb13): since the
change was backported partway through the 6.12 point releases rather
than tied to a clean version boundary, a single unconditional fix can
break the build for the older point release while fixing the newer
one. A proper fix upstream will likely need a configure-time / feature
probe (e.g. checking the header via checkpatch/autoconf-style probing)
rather than a LINUX_VERSION_CODE guard, since LINUX_VERSION_CODE can't
distinguish the pre-backport and post-backport builds of the same
6.12.9x point release.

Workaround (tested locally, builds and loads cleanly on
6.12.96+deb13-amd64):

In driver/razerkbd_driver.c, change both call sites of
hid_report_raw_event() from:

hid_report_raw_event(hdev, HID_INPUT_REPORT, xdata, sizeof(xdata), 0);

to:

hid_report_raw_event(hdev, HID_INPUT_REPORT, xdata, sizeof(xdata), sizeof(xdata), 0);

(passing sizeof(xdata) for both bufsize and size, since xdata is a
fixed-size buffer being reported in full).

This is only a local workaround, not a proper fix -- it will break
the build again on kernels with the old 5-argument signature. I'm
reporting this primarily so it's tracked; a real fix should detect
the signature at build time rather than assuming one or the other.

System information:
Kernel: 6.12.96+deb13-amd64
Distribution: Debian 13 (trixie)

Thanks,Emmi