librem-ec-acpi-dkms FTBF with linux 6.2 in jammy

Bug #2023532 reported by Andrea Righi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
librem-ec-acpi (Ubuntu)
Fix Released
Medium
Unassigned
Jammy
Fix Released
Medium
Andrea Righi

Bug Description

[Impact]

librem-ec-acpi-dkms (EC ACPI in Purism Librem devices) fails to build on linux 6.2 in jammy with the following errors:

/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:276:24: error: initialization of ‘int (*)(struct power_supply *, struct acpi_battery_hook *)’ from incompatible pointer type ‘int (*)(struct power_supply *)’ [-Werror=incompatible-pointer-types]
  276 | .add_battery = librem_ec_battery_add,
      | ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:276:24: note: (near initialization for ‘librem_ec_battery_hook.add_battery’)
/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:277:27: error: initialization of ‘int (*)(struct power_supply *, struct acpi_battery_hook *)’ from incompatible pointer type ‘int (*)(struct power_supply *)’ [-Werror=incompatible-pointer-types]
  277 | .remove_battery = librem_ec_battery_remove,
      | ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:277:27: note: (near initialization for ‘librem_ec_battery_hook.remove_battery’)
/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:773:27: error: initialization of ‘void (*)(struct acpi_device *)’ from incompatible pointer type ‘int (*)(struct acpi_device *)’ [-Werror=incompatible-pointer-types]
  773 | .remove = librem_ec_remove,
      | ^~~~~~~~~~~~~~~~
/var/lib/dkms/librem_ec_acpi/0.9.1/build/librem_ec_acpi.c:773:27: note: (near initialization for ‘librem_ec_driver.ops.remove’)
cc1: some warnings being treated as errors

[Test case]

 $ sudo apt install librem-ec-acpi-dkms

With the fix applied:

 - hwe kernel 6.2:

...
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 librem-ec-acpi-dkms all 0.9.1-2ubuntu3 [7858 B]
...
Building for 6.2.0-26-generic
Building initial module for 6.2.0-26-generic
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
Done.

librem_ec_acpi.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.2.0-26-generic/updates/dkms/

 - release kernel 5.15:

...
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 librem-ec-acpi-dkms all 0.9.1-2ubuntu3 [7858 B]
...
Building for 5.15.0-79-generic
Building initial module for 5.15.0-79-generic
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
Done.

librem_ec_acpi.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-79-generic/updates/dkms/

[Fix]

Backport the right patch(es) from lunar to properly support the new linux 6.2 ABI.

[Regression potential]

librem-ec-acpi-dkms is the EC ACPI driver for Purism Librem devices, so we may experience potential kernel regressions only on these devices that are using ACPI.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: librem-ec-acpi-dkms 0.9.1-2ubuntu2
ProcVersionSignature: User Name 6.2.0-23.23~22.04.1-generic 6.2.12
Uname: Linux 6.2.0-23-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Mon Jun 12 07:43:56 2023
PackageArchitecture: all
SourcePackage: librem-ec-acpi
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andrea Righi (arighi) wrote :
Revision history for this message
Andrea Righi (arighi) wrote :

debdiff to support libre-ec-acpi with linux 6.2 in jammy.

tags: added: patch
Changed in librem-ec-acpi (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Andrea Righi (arighi)
Changed in librem-ec-acpi (Ubuntu):
status: New → Invalid
Revision history for this message
Robie Basak (racb) wrote :

Please fix the Test Plan to include testing for both the release kernel and the HWE kernel.

Changed in librem-ec-acpi (Ubuntu Jammy):
status: In Progress → Incomplete
Revision history for this message
Andrea Righi (arighi) wrote :

Test plan updated with results both with the release kernel and hwe kernel.

description: updated
Changed in librem-ec-acpi (Ubuntu Jammy):
status: Incomplete → In Progress
Andrea Righi (arighi)
Changed in librem-ec-acpi (Ubuntu):
status: Invalid → In Progress
Andrea Righi (arighi)
Changed in librem-ec-acpi (Ubuntu):
assignee: nobody → Robie Basak (racb)
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :

Please do not assign me to bugs for SRU review.

Changed in librem-ec-acpi (Ubuntu):
assignee: Robie Basak (racb) → nobody
Revision history for this message
Steve Langasek (vorlon) wrote :

This is fixed in lunar and later. (Please take care to document such things in the bug state accurately, as it's required that fixes land in the devel series before they are SRUed.)

Changed in librem-ec-acpi (Ubuntu):
status: In Progress → Fix Released
Changed in librem-ec-acpi (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted librem-ec-acpi into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/librem-ec-acpi/0.9.1-2ubuntu3 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.

Andrea Righi (arighi)
tags: added: verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

Swapping the tags back as this is still awaiting documented verification. Please see the instructions in comment 7.

tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Andrea Righi (arighi) wrote :

We do not have the hardware to validate this driver properly (it requires a Purism Librem 14 laptop), so the best we can do is to perform a test build.

Test plan (in the bug description at the top) has been updated reporting the exact version of the package that has been tested (0.9.1-2ubuntu3) and the positive test build result, both with the latest release kernel and the latest HWE 6.2 kernel.

description: updated
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Chris Halse Rogers (raof) wrote :

Again, please add verification details as a comment on the bug, not by editing the bug description.

Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for librem-ec-acpi 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package librem-ec-acpi - 0.9.1-2ubuntu3

---------------
librem-ec-acpi (0.9.1-2ubuntu3) jammy; urgency=medium

  * Support Linux 6.2 (LP: #2023532):
    - debian/patches/0001-fix-compilation-on-linux-6.2.1.patch

 -- Andrea Righi <email address hidden> Mon, 12 Jun 2023 07:48:03 +0000

Changed in librem-ec-acpi (Ubuntu Jammy):
status: Fix Committed → Fix Released
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.