Similar to this question, my audio driver fails to initialize on a ThinkPad X1 Gen 12, booting a fresh Ubuntu 24.04 desktop install:
[ 6.818752] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 6.821741] sof-audio-pci-intel-mtl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 6.823542] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 6.823788] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 6.831774] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[ 6.950382] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 5
[ 6.950394] sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 6.950401] sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 6.950935] sof-audio-pci-intel-mtl 0000:00:1f.3: SOF firmware and/or topology file not found.
[ 6.951827] sof-audio-pci-intel-mtl 0000:00:1f.3: Supported default profiles
[ 6.951832] sof-audio-pci-intel-mtl 0000:00:1f.3: - ipc type 1 (Requested):
[ 6.951836] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[ 6.951838] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-hda-generic-2ch.tplg
[ 6.951840] sof-audio-pci-intel-mtl 0000:00:1f.3: Check if you have 'sof-firmware' package installed.
[ 6.951841] sof-audio-pci-intel-mtl 0000:00:1f.3: Optionally it can be manually downloaded from:
[ 6.951843] sof-audio-pci-intel-mtl 0000:00:1f.3: https://github.com/thesofproject/sof-bin/
[ 6.957860] sof-audio-pci-intel-mtl 0000:00:1f.3: error: sof_probe_work failed err: -2
And I'm not able to install the apt package for it either, though with a slightly different error than came up in the prior question about this:
$ sudo apt install firmware-sof-signed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
firmware-sof-signed
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3,906 kB of archives.
After this operation, 5,410 kB of additional disk space will be used.
(Reading database ... 110399 files and directories currently installed.)
Preparing to unpack .../firmware-sof-signed_2023.12.1-1ubuntu1_all.deb ...
Unpacking firmware-sof-signed (2023.12.1-1ubuntu1) over (2023.12.1-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/firmware-sof-signed_2023.12.1-1ubuntu1_all.deb (--unpack):
unable to create '/lib/firmware/intel/sof/community/sof-apl.ri.zst.dpkg-new' (while processing './lib/firmware/intel/sof
/community/sof-apl.ri.zst'): Read-only file system
dpkg: error while cleaning up:
unable to remove newly-extracted version of '/lib/firmware/intel/sof/community/sof-apl.ri.zst': Read-only file system
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/firmware-sof-signed_2023.12.1-1ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I hit the same read-only issue when I try to directly extract the archive from the sof-bin project on github. It's happening because the kernel is coming from a snap package, which is itself required as this is a secure boot machine with TPM-enabled FDE.
I was able to switch from the default 6.8 kernel to the 6.11 (from 24.10) one using the following invocation— just required using snap changes and snap abort # to clear out the in progress change:
$ sudo snap refresh pc-kernel --channel 24.10/stable
error: snap "pc-kernel" has "auto-refresh" change in progress
However, upon rebooting with 6.11, I still get the missing SOF firmware issue, so it seems like the firmware for the DSP is still a missing piece that isn't included.
Looks like there's something called kernel-firmware-control, which lets you specify a search path outside of /lib/firmware (kernel docs). This feels more like it's meant for developers iterating on a firmware binary or something, but could still be an escape hatch.
What is the path forward here? I see some noise online about building my own kernel snap, or perhaps a supplementary ("gadget") snap specific to this laptop's hardware? Like everything snap-related, the docs for this stuff seem to be pretty threadbare. But I'm surprised there isn't some fairly easy/standard procedure for patching/forking a snap, particularly for a use-case like this where it's basically contents of X preexisting snap + two additional files added in. Of course, I assume any "new kernel snap" option is going to include a signing/MOK workflow for secure boot too... sigh.
Even hackier, I could just bind-mount in the specific files that it's looking for. But surely such things should not be necessary to DIY on a Thinkpad that's supposed to have Ubuntu supported out of the box? Note though that the preinstalled version was 22.04 and didn't have FDE set up— the FDE requirement was why I blew it away and started over.
Is there some easy fix here that I'm missing?
Adding mount information, it's clear to see where the snaps are being mounted into the filesystem:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 1.6M 1 loop /snap/pc/184
/run/mnt/gadget
loop1 7:1 0 340.1M 1 loop /snap/pc-kernel/2023
/run/mnt/data/usr/lib/firmware
/usr/lib/firmware
/run/mnt/data/usr/lib/modules
/usr/lib/modules
/run/mnt/kernel
loop2 7:2 0 4K 1 loop /snap/bare/5
loop3 7:3 0 63.7M 1 loop /snap/core20/2434
loop5 7:5 0 73.9M 1 loop /snap/core22/1663
loop6 7:6 0 269.8M 1 loop /snap/firefox/4793
loop7 7:7 0 10.7M 1 loop /snap/firmware-updater/127
loop8 7:8 0 11.1M 1 loop /snap/firmware-updater/147
loop9 7:9 0 349.7M 1 loop /snap/gnome-3-38-2004/143
loop10 7:10 0 505.1M 1 loop /snap/gnome-42-2204/176
loop11 7:11 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop12 7:12 0 330.2M 1 loop /snap/pc-kernel/1938
loop13 7:13 0 10.5M 1 loop /snap/snap-store/1173
loop14 7:14 0 38.8M 1 loop /snap/snapd/21759
loop15 7:15 0 44.3M 1 loop /snap/snapd/23258
loop16 7:16 0 568K 1 loop /snap/snapd-desktop-integration/253
loop17 7:17 0 500K 1 loop /snap/snapd-desktop-integration/178
loop18 7:18 0 184.8M 1 loop /snap/spotify/81
loop19 7:19 0 73.9M 1 loop /snap/core22/1722
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 750M 0 part /run/mnt/ubuntu-seed
├─nvme0n1p2 259:2 0 750M 0 part /boot/grub
│ /run/mnt/ubuntu-boot
├─nvme0n1p3 259:3 0 32M 0 part
│ └─ubuntu-save-e84c3048-3395-49fc-9a32-c8b9019dd7d5 252:1 0 25M 0 crypt /var/lib/snapd/save
│ /run/mnt/ubuntu-save
└─nvme0n1p4 259:4 0 952.4G 0 part
└─ubuntu-data-f555e41a-e853-4970-8f11-d974212856fc 252:0 0 952.4G 0 crypt /
/run/mnt/data