bbswitch-dkms fails with 5.6 kernels

Bug #1878603 reported by Liu Zeyang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bbswitch (Ubuntu)
Fix Committed
High
Unassigned
Focal
Fix Released
High
Alberto Milone

Bug Description

* Impact
the package fails to install when using a 5.6 kernel

* Test case
install a 5.6 kernel (linux-oem-20.04) and then install bbswitch-dkms, it should build without error

* Regression potential
the code is specific to newer kernel versions, it shouldn't create problems on existing systems

------------------------------------

when i install bumblebee on my labtop in ubuntu20.04LST, tell me that "dpkg: 处理软件包 bbswitch-dkms (--configure)时出错:已安装 bbswitch-dkms 软件包 post-installation 脚本 子进程返回错误状态 10"

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: bbswitch-dkms 0.8-8
Uname: Linux 5.6.11-050611-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
AptOrdering:
 dkms:amd64: Install
 bumblebee:amd64: Install
 bbswitch-dkms:amd64: Install
 primus-libs:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu May 14 20:28:26 2020
ErrorMessage: 已安装 bbswitch-dkms 软件包 post-installation 脚本 子进程返回错误状态 10
InstallationDate: Installed on 2020-05-11 (2 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18rc1, python-minimal, 2.7.12-1~16.04
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: bbswitch
Title: package bbswitch-dkms 0.8-8 failed to install/upgrade: 已安装 bbswitch-dkms 软件包 post-installation 脚本 子进程返回错误状态 10
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Liu Zeyang (hsly233) wrote :
Revision history for this message
Liu Zeyang (hsly233) wrote :

ERROR (dkms apport): kernel package linux-headers-5.6.11-050611-generic is not supported
Error! Bad return status for module build on kernel: 5.6.11-050611-generic (x86_64)
Consult /var/lib/dkms/bbswitch/0.8/build/make.log for more information.

Revision history for this message
smile (smileedx) wrote :

I have encountered same error during kernel update (5.5.15 -> 5.6.13). Latest version of 5.5.* compiles correctly (5.5.19). Looks like some breaking changes have been made within all 5.6.* kernel versions. Here are logs:

DKMS make.log for bbswitch-0.8 for kernel 5.6.13-050613-generic (x86_64)
Sat May 16 07:11:26 CEST 2020
make -C /lib/modules/5.6.13-050613-generic/build M="$(pwd)" modules
make[1]: Entering directory '/usr/src/linux-headers-5.6.13-050613-generic'
  CC [M] /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_init’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:460:63: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  460 | acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
      | ^~~~~~~~~~~~~~
      | |
      | struct file_operations *
In file included from ./include/acpi/acpi_bus.h:83,
                 from ./include/linux/acpi.h:32,
                 from /var/lib/dkms/bbswitch/0.8/build/bbswitch.c:32:
./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
   64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
      | ^~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:267: recipe for target '/var/lib/dkms/bbswitch/0.8/build/bbswitch.o' failed
make[2]: *** [/var/lib/dkms/bbswitch/0.8/build/bbswitch.o] Error 1
Makefile:1683: recipe for target '/var/lib/dkms/bbswitch/0.8/build' failed
make[1]: *** [/var/lib/dkms/bbswitch/0.8/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.6.13-050613-generic'
Makefile:13: recipe for target 'default' failed
make: *** [default] Error 2

Revision history for this message
Sebastien Bacher (seb128) wrote :
summary: - package bbswitch-dkms 0.8-8 failed to install/upgrade: 已安装 bbswitch-dkms
- 软件包 post-installation 脚本 子进程返回错误状态 10
+ bbswitch-dkms fails with 5.6 kernels
Changed in bbswitch (Ubuntu):
importance: Undecided → High
status: New → Fix Committed
Changed in bbswitch (Ubuntu Focal):
importance: Undecided → High
status: New → Fix Committed
assignee: nobody → Alberto Milone (albertomilone)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

There is no linux-5.6 kernel in Ubuntu today. Please include a complete step-by-step test case for which kernel you want users to install and how.

Changed in bbswitch (Ubuntu Focal):
status: Fix Committed → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

linux-oem-5.6 is available in both focal and groovy

description: updated
Changed in bbswitch (Ubuntu Focal):
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Liu, or anyone else affected,

Accepted bbswitch into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bbswitch/0.8-8ubuntu0.20.04.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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (bbswitch/0.8-8ubuntu0.20.04.1)

All autopkgtests for the newly accepted bbswitch (0.8-8ubuntu0.20.04.1) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

bbswitch/0.8-8ubuntu0.20.04.1 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#bbswitch

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I've tested the build against linux-oem-20.04 (5.6) kernel and it succeeded. The autopkgtest failure on armhf is irrelevant, since this package is not even useful on non-x86 and quite frankly shouldn't be built on !amd64.

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

This bug was fixed in the package bbswitch - 0.8-8ubuntu0.20.04.1

---------------
bbswitch (0.8-8ubuntu0.20.04.1) focal; urgency=medium

  * debian/patches/0001-Use-proc_ops-structure-for-kernel-version-5.6.0.patch,
    debian/patches/fix-clean.patch,
    debian/patches/series:
    - Add support for Linux 5.6 and fix the clean target to run
      against the kernel version used for building (LP: #1878603)

 -- Alberto Milone <email address hidden> Mon, 18 May 2020 10:47:19 +0200

Changed in bbswitch (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Update Released

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