[SRU] digimend-dkms 10-4: digimend kernel module failed to build

Bug #2052708 reported by Ricardo-Franco Mendoza-Garcia
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
digimend-dkms (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

digimend-dkms fails to install if the user is using the hwe kernel which is v6.5 as the dkms module will fail to build during installation.
The error being:

/var/lib/dkms/digimend/10/build/hid-uclogic-params.c: In function ‘uclogic_params_init’:
/var/lib/dkms/digimend/10/build/hid-uclogic-params.c:1030:17: error: implicit declaration of function ‘hid_is_using_ll_driver’ [-Werror=implicit-function-declaration]
 1030 | || !hid_is_using_ll_driver(hdev, &usb_hid_driver)
      | ^~~~~~~~~~~~~~~~~~~~~~

[ Test Plan ]

This needs to be done on both the hwe kernel (v6.5) and the generic kernel (v5.15) to ensure it works on both.

* install digimend-dkms
* successfull installation will mean the build failure has been fixed.
* As a very basic test, try to load the module "sudo modprobe hid-polostar" and "sudo modprobe hid-viewsonic"

Ideally someone with the hardware should test and confirm.

[ Where problems could occur ]

This change is only affecting the users of hwe kernel (v6.5) and the only change is using the new function which upstream has defined. Similar changes has been done to other upstream drivers as can be seen at the upstream kernel patch link and has little chance of regression due to this.

[ Other Info ]

 * The new function has been added in upstream linux kernel by https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f83baa0cb6cfc92ebaf7f9d3a99d7e34f2e77a8a
 * The old function has been removed by https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d9ca84ce034960707b62ce7d5ca75d04f8db91a

[ Original Bug Description ]

No idea.

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: digimend-dkms 10-4
ProcVersionSignature: Ubuntu 6.5.0-17.17~22.04.1-generic 6.5.8
Uname: Linux 6.5.0-17-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
DKMSKernelVersion: 6.5.0-17-generic
Date: Thu Feb 8 11:16:48 2024
DuplicateSignature: dkms:digimend-dkms:10-4:/var/lib/dkms/digimend/10/build/hid-uclogic-params.c:1030:17: error: implicit declaration of function ‘hid_is_using_ll_driver’ [-Werror=implicit-function-declaration]
InstallationDate: Installed on 2021-05-26 (988 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
PackageVersion: 10-4
Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.2
 apt 2.4.11
SourcePackage: digimend-dkms
Title: digimend-dkms 10-4: digimend kernel module failed to build
UpgradeStatus: Upgraded to jammy on 2022-09-08 (517 days ago)

Revision history for this message
Ricardo-Franco Mendoza-Garcia (rimen05) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Jammy attached.

Changed in digimend-dkms (Ubuntu):
status: New → Fix Released
Changed in digimend-dkms (Ubuntu Jammy):
status: New → Confirmed
assignee: nobody → Sudip Mukherjee (sudipmuk)
summary: - digimend-dkms 10-4: digimend kernel module failed to build
+ [SRU] digimend-dkms 10-4: digimend kernel module failed to build
description: updated
Changed in digimend-dkms (Ubuntu Jammy):
assignee: Sudip Mukherjee (sudipmuk) → nobody
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

This is related to the sync request in bug #2054214

wrt. debdiff:

Is it correct that we add two #if statements, which just a single #endif?

-#if KERNEL_VERSION(4, 14, 0) <= LINUX_VERSION_CODE
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)

Revision history for this message
Lukas Märdian (slyon) wrote :

Mantic apparently got handled in bug #2023298

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

That is correct. The debdiff is:
+-#if KERNEL_VERSION(4, 14, 0) <= LINUX_VERSION_CODE
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
++ || !hid_is_usb(hdev)
++#else
+ || !hid_is_using_ll_driver(hdev, &usb_hid_driver)
+ #endif
++#endif

It added one #if and added one #endif. The first #if is just changing the previous #if.
After applying the patch the code looks like this:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
            || !hid_is_usb(hdev)
#else
            || !hid_is_using_ll_driver(hdev, &usb_hid_driver)
#endif
#endif

The debdiff you pointed for Mantic is basically same, its using:
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE

and I am using:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)

Revision history for this message
Lukas Märdian (slyon) wrote :

Ugh... I missed the 2nd #endif. Sorry for that. Debdiff LGTM.

https://launchpad.net/ubuntu/jammy/+queue?queue_state=1&queue_text=digimend

Changed in digimend-dkms (Ubuntu Jammy):
status: Confirmed → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Ricardo-Franco, or anyone else affected,

Accepted digimend-dkms into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/digimend-dkms/10-4ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in digimend-dkms (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm that the digimend-dkms package in jammy-proposed has fixed the bug for me.

Test done:

1. Modify grub defauls to disable grub hidden timeout, and increase timeout
2. Install linux-generic to have both the kernel in the system
3. reboot to 5.15.0-97-generic kernel
3. Enable jammy-proposed
4. Install digimend-dkms, confirm that the modules builds for both the kernels 5.15.0-97-generic and 6.5.0-21-generic
5. Run the testplan:

$ sudo modprobe hid-polostar
$ sudo modprobe hid-viewsonic
$ lsmod | grep hid
hid_viewsonic 16384 0
hid_polostar 16384 0
hid 151552 2 hid_polostar,hid_viewsonic
mac_hid 16384 0
$ uname -r
5.15.0-97-generic

6. reboot to 6.5.0-21-generic
7. Rerun the same test:

$ sudo modprobe hid-polostar
$ sudo modprobe hid-viewsonic
$ lsmod | grep hid
hid_viewsonic 12288 0
hid_polostar 12288 0
hid 180224 2 hid_polostar,hid_viewsonic
mac_hid 12288 0
$ uname -r
6.5.0-21-generic

Test result: the errors with digimend-dkms has been fixed.

Package tested:

$ dpkg -l | grep digimend
ii digimend-dkms 10-4ubuntu0.1 all Collection of graphics tablet drivers by DIGImend project

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package digimend-dkms - 10-4ubuntu0.1

---------------
digimend-dkms (10-4ubuntu0.1) jammy; urgency=medium

  * Support linux kernel v6.5 (LP: #2052708)
    - d/p/support-linux-6.5.patch: Use hid_is_usb().

 -- Sudip Mukherjee <email address hidden> Sat, 17 Feb 2024 15:59:56 +0000

Changed in digimend-dkms (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for digimend-dkms has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.