bbswitch dkms build failure with 5.15 on armhf and ppc64el

Bug #1951583 reported by Andrea Righi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bbswitch (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

bbswitch is failing to build with the latest jammy kernel 5.15 on armhf and ppc64el.

The build error that we get looks like the following:

  CC [M] /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_off’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:271:13: error: implicit declaration of function ‘acpi_bus_get_device’; did you mean ‘acpi_get_gpe_device’? [-Werror=implicit-function-declaration]
  271 | r = acpi_bus_get_device(dis_handle, &ad);
      | ^~~~~~~~~~~~~~~~~~~
      | acpi_get_gpe_device
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:276:15: error: invalid use of undefined type ‘struct acpi_device’
  276 | if (ad->power.state == ACPI_STATE_UNKNOWN) {
      | ^~
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:278:15: error: invalid use of undefined type ‘struct acpi_device’
  278 | ad->power.state = ACPI_STATE_D0;
      | ^~

[Test case]

Install bbswitch-dkms.

[Fix]

It looks like bbswitch is using acpi_bus_get_device() on any architectures to check for suspend events, but this function is not available on armhf or ppc64el. The fix would be to avoid doing this check (and using acpi_bus_get_device()) on architectures that don't have this capability.

[Regression potential]

We should see potential bbswitch regressions on armhf or ppc64el if they have suspend events (similar problem that is addressed on amd64 / arm64).

Tags: patch
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1951583

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Andrea Righi (arighi) wrote :

Attached debdiff can fix the build error on armhf and ppc64el.

Andrea Righi (arighi)
no longer affects: linux (Ubuntu Jammy)
no longer affects: linux (Ubuntu)
tags: added: patch
Andrea Righi (arighi)
description: updated
Revision history for this message
Andrea Righi (arighi) wrote :

New debdiff in attach that relies on CONFIG_ACPI to determine if we need to check the power state in bbswitch_off().

Changed in bbswitch (Ubuntu Jammy):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bbswitch - 0.8-10ubuntu1

---------------
bbswitch (0.8-10ubuntu1) jammy; urgency=medium

  * Fix build error on architectures that don't have ACPI enabled
    (LP: #1951583)

 -- Andrea Righi <email address hidden> Mon, 29 Nov 2021 06:45:50 +0000

Changed in bbswitch (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.