[SRU][Jammy]Package firmware-sof-signed (not installed) failed to install/upgrade: trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197

Bug #1930868 reported by Domizio Demichelis
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
firmware-sof (Ubuntu)
Fix Released
High
Hui Wang
Jammy
Fix Released
High
Hui Wang
linux-firmware (Ubuntu)
Fix Released
High
Hui Wang
Jammy
Fix Released
High
Hui Wang

Bug Description

SRU template for firmware-sof-signed:
[Impact]
We put the Recommends: firmware-sof-signed (>= 1.9-1) in the
linux-firmware/debian/control, when upgrading the linux-firmware,
the firmware-sof-signed will be downloaded and unpacked first, this
will introduce below errors:
Unpacking firmware-sof-signed (1.9-1) ...
dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_1.9-1_all.deb (--unpack):
 trying to overwrite '/lib/firmware/intel/sof/sof-bdw.ri', which is also in package linux-firmware 1.202
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../linux-firmware_1.202+staging.1_all.deb ...
Unpacking linux-firmware (1.202+staging.1) over (1.202) ...
Errors were encountered while processing:
 /var/cache/apt/archives/firmware-sof-signed_1.9-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[Fix]
Need to put Replaces: linux-firmware (<= 1.203) in the debian/control,
and the sof-tplg is a symbol link in the firmware-sof-signed, when it
replaces the sof-tplg folder in the linux-firmware of old version, it will
generate an empty sof-tplg folder, there are no any topology files in the
folder and the symbol link is not generated. To solve it, modify the debian/rules
to change symbol link to a copy of folder.

[Test]
put the updated firmware-sof-signed and linux-firmware to my ppa,
and run sudo apt install linux-firmware, then the two packages are upgraded
and installed, reboot all audio function work as well as before.

[Where problems could occur]
The firmware-sof-signed doesn't contain all files that we plan to remove from
linux-firmware, but there is no evidence that those files are used by
any platforms, If some platforms fail to load the sof-firmware or topology
files and audio function fail to work, it is possibily this SRU introduce the
regression.

SRU template for linux-firmware:
[Impact]
In the past we put the sof-firmware files into the linux-firmware,
and about half year ago, the sof-firmware has its own debian package,
it is firmware-sof-signed, here we remove the sof-firmware files
from linux-firmware and replace them with the package firmware-sof-signed.

Here put Recommends: firmware-sof-signed (>= 1.9-1) in the
linux-firmware/debian/control, when upgrading the linux-firmware, the
firmware-sof-signed will be unpacked first, it will have conflicts
because this package update the same files in the linux-firmware of
old version, so apart of this pull-request to linux-firmware, also need to
do some change on firmware-sof-signed. Please see the debdiff for
firmware-sof-signed in the launchpad.

This is the error log when unpacking the firmware-sof-signed:
Unpacking firmware-sof-signed (1.9-1) ...
dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_1.9-1_all.deb (--unpack):
 trying to overwrite '/lib/firmware/intel/sof/sof-bdw.ri', which is also in package linux-firmware 1.202
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../linux-firmware_1.202+staging.1_all.deb ...
Unpacking linux-firmware (1.202+staging.1) over (1.202) ...
Errors were encountered while processing:
 /var/cache/apt/archives/firmware-sof-signed_1.9-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

[Fix]
remove the sof-firmware files from linux-firmware, and replace
them with a debian package firmware-sof-signed.

[Test]
put the updated firmware-sof-signed and linux-firmware to my ppa,
and run sudo apt install linux-firmware, then the two packages are upgraded
and installed, reboot all audio function work as well as before.

[Where problems could occur]
The firmware-sof-signed doesn't contain all files that we plan to remove from
linux-firmware, but there is no evidence that those files are used by
any platforms, If some platforms fail to load the sof-firmware or topology
files and audio function fail to work, it is possibily this SRU introduce the
regression.

(Reading database ... 220533 files and directories currently installed.)
Preparing to unpack .../firmware-sof-signed_1.6.1-2_all.deb ...
Unpacking firmware-sof-signed (1.6.1-2) ...
dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_1.6.1-2_all.deb (--unpack):
 trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197
Errors were encountered while processing:
 /var/cache/apt/archives/firmware-sof-signed_1.6.1-2_all.deb

Is there a work around?

ProblemType: Package
DistroRelease: Ubuntu 21.04
Package: firmware-sof-signed (not installed)
ProcVersionSignature: Ubuntu 5.11.0-18.19-generic 5.11.17
Uname: Linux 5.11.0-18-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu65.1
AptOrdering:
 firmware-sof-signed:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: pass
Date: Fri Jun 4 17:22:54 2021
DpkgTerminalLog:
 Preparing to unpack .../firmware-sof-signed_1.6.1-2_all.deb ...
 Unpacking firmware-sof-signed (1.6.1-2) ...
 dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_1.6.1-2_all.deb (--unpack):
  trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197
DuplicateSignature:
 package:firmware-sof-signed:(not installed)
 Unpacking firmware-sof-signed (1.6.1-2) ...
 dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_1.6.1-2_all.deb (--unpack):
  trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197
ErrorMessage: trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197
InstallationDate: Installed on 2021-06-02 (2 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
Python3Details: /usr/bin/python3.9, Python 3.9.5, python3-minimal, 3.9.4-1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.20.9ubuntu1
 apt 2.2.3
SourcePackage: firmware-sof
Title: package firmware-sof-signed (not installed) failed to install/upgrade: trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also in package linux-firmware 1.197
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Domizio Demichelis (domizio) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Hui Wang (hui.wang) wrote :

The current firmware-sof version 1.6.1-2 can't replace the sof-firmware in our linux-firmware package. At least an important firmware file is missing in the firmware-sof.

I have wrote an email to debian maintainer, he told me he is planning a higher version (1.7), once the 1.7 is ready, we could remove the sof-firmware in the linux-firmware and use the firmware-sof package.

Below is the reply from the maintainer:

Hi Hui,

I hadn't realised that's how it worked 🙂

So I had prepared a 1.7 version a month ago:
https://salsa.debian.org/mpearson/firmware-sof/-/commit/fdce28e87c495ab69c1cdfaaff19bc7aff70af5f

But I wasn't able to get this uploaded as there was a freeze on so the debian maintainer who has been helping me wouldn't take it. I'll see if that's possible now (and likely have to update to the latest...)

Mark

Revision history for this message
Domizio Demichelis (domizio) wrote :

Couldn't we just use 1.6 to do the same now? I read that 1.6 worked for who got it compiled/installed in some way.

The sof-firmware is missing/buggy since 20.10, so everybody with a 2020 DELL XPS/Precision laptop has not being able to get any input/output audio since months already.

Is there a way to get it installed manually now?

Revision history for this message
Hui Wang (hui.wang) wrote :

"The sof-firmware is missing/buggy since 20.10, so everybody with a 2020 DELL XPS/Precision laptop has not being able to get any input/output audio since months already".

Do you have bug link for those issues? I doubt it is not the sof-firmware's problem, maybe they are soundwire audio machines, need to upgrade the kernel.

BTW, the sof-firmware in the ubuntu linux-firmware is also from sof-bin v1.6.

Changed in firmware-sof (Ubuntu):
assignee: nobody → Hui Wang (hui.wang)
Changed in linux-firmware (Ubuntu):
assignee: nobody → Hui Wang (hui.wang)
Changed in firmware-sof (Ubuntu):
importance: Undecided → High
Changed in linux-firmware (Ubuntu):
importance: Undecided → High
Changed in firmware-sof (Ubuntu):
status: New → Triaged
Changed in linux-firmware (Ubuntu):
status: New → Triaged
Revision history for this message
jre (jre-phoenix) wrote :

Debian now has firmware-sof 1.9-1 and Ubuntu Impish has 1.7-1.

So I think you can remove sof from linux-firmware now (and maybe add a Recommends on firmware-sof instead).

Thanks and greets
jre

Hui Wang (hui.wang)
description: updated
Hui Wang (hui.wang)
tags: added: jammy
removed: hirsute
Hui Wang (hui.wang)
description: updated
Revision history for this message
Hui Wang (hui.wang) wrote :

Updated the debdiff, added "Breaks: linux-firmware (<= 1.202)" as Juerg suggested in this new debdiff. thx.

summary: - Package firmware-sof-signed (not installed) failed to install/upgrade:
- trying to overwrite '/lib/firmware/intel/sof/sof-apl.ri', which is also
- in package linux-firmware 1.197
+ [SRU][Jammy]Package firmware-sof-signed (not installed) failed to
+ install/upgrade: trying to overwrite '/lib/firmware/intel/sof/sof-
+ apl.ri', which is also in package linux-firmware 1.197
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

1) firmware-sof is good; note that breaks/replaces versions will need to be adjusted to the correct versions for every series upon every upload of this change, if it is SRUed.

2) the matching linux-firmware changes are good as well.

Juerg Haefliger (juergh)
Changed in linux-firmware (Ubuntu Jammy):
status: Triaged → Fix Committed
Changed in firmware-sof (Ubuntu Jammy):
status: Triaged → Fix Committed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

@ubuntu-archive please promote firwmare-sof from multiverse to restricted. As blobs are now removed from linux-firmware in favor of shipping them in firmware-sof.

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

This bug was fixed in the package firmware-sof - 1.9-1ubuntu1

---------------
firmware-sof (1.9-1ubuntu1) jammy; urgency=medium

  * Replace and Break the (linux-firmware <= 1.202) and change the
    symbol link to a copy of a folder. Otherwise unpacking will have
    conflicts since this package and linux-firmware change the same
    files and this package is unpacked ahead of the linux-firmware.
    (LP: #1930868)

 -- Hui wang <email address hidden> Fri, 26 Nov 2021 18:05:54 +0800

Changed in firmware-sof (Ubuntu Jammy):
status: Fix Committed → Fix Released
Juerg Haefliger (juergh)
Changed in linux-firmware (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Hui Wang (hui.wang) wrote :

Verified the new linux-firmware and firmware-sof-signed on the jammy:

A lenovo TGL laptop already installed the 22.04, run sudo apt-get update; sudo apt dist-upgrade; the output shows the firmware-sof-signed package will be installed and the linux-firmware will be upgraded. Input Y and press Enter button, the system will get those packages, unpack them and setup them. there is no any error during the process.

After the dist-upgrade finishes, run ls /lib/intel/sof/ -la and ls /lib/intel/sof-tplg/ -la, all files are installed as expected. reboot, the sof audio driver successfully loads the sof-tgl.ri and topology file and audio function works well.

Verification done.

Revision history for this message
kioftes (thstyl2000) wrote :

Many thanks for the fix! Is there any chance we'll see this backported to hirsute?

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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